Black Perl, a poem in perl 3


#1

[Permalink]


#2

Yes, doesn't compile in Perl 5:

perl black.pl
Hash %window missing the % in argument 1 of each() at black.pl line 1.
Hash %watches missing the % in argument 1 of each() at black.pl line 3.
Array @them missing the @ in argument 1 of pop() at black.pl line 5.
String found where operator expected at black.pl line 7, near "the "goats""
(Do you need to predeclare the?)
String found where operator expected at black.pl line 7, near "the "sheep""
(Do you need to predeclare the?)
Array @moralities missing the @ in argument 1 of shift() at black.pl line 8.
Hash %aside missing the % in argument 1 of values() at black.pl line 9.
Hash %one missing the % in argument 1 of each() at black.pl line 9.
Hash %sacrifice missing the % in argument 1 of each() at black.pl line 13.
Use of "do" to call subroutines is deprecated at black.pl line 15.
Use of "do" to call subroutines is deprecated at black.pl line 16.
Can't modify select in read at black.pl line 2, near "us)"
Missing comma after first argument to reverse function at black.pl line 4, near "again;"
Missing comma after first argument to kill function at black.pl line 7, near ""sheep")"
Missing comma after first argument to warn function at black.pl line 7, near ""sheep")"
Missing comma after first argument to reverse function at black.pl line 11, near ");"
Missing comma after first argument to die function at black.pl line 11, near ");"
Missing comma after first argument to die function at black.pl line 11, near ");"
Missing comma after first argument to kill function at black.pl line 14, near "redo ritual until"
Missing comma after first argument to warn function at black.pl line 19, near "next victim;"
Missing comma after first argument to die function at black.pl line 25, at EOF
black.pl has too many errors.


#3

This post doesn't display nicely on my screen - I have to horizontally scroll the code bit in order to see it all. This problem is compounded by the fact that I have to scroll the entire poem off the screen to get down to that horizontal scroll bar in the first place.

Is Boing Boing officially incompatible with "small" browser windows? For what it's worth, I'm working with a browser window that's over 1100px wide and it's still no good. I realize higher res displays are all the rage, but comeon.


#4

Most poems survive the transition to different editions / versions of 'book' or 'paper' don't they?


#5

That's . . . kind of awesome.


#6

They don't always survive changes in language. Do we really understand the Epic of Gilgamesh without native Sumerian speakers around?


#7

I give it a c++.


#8

I don't have any way to run this. What's the output look like?


#9

It produces no output.

Source: http://en.wikipedia.org/wiki/Black_Perl


#10

Meh. (Thanks for the link though).


#12

There have been versions updated to run under Perl5. See http://www.perlmonks.org/?node_id=237465


#13

There's no output if you run it in Perl3. It exits on the first line. The rest of the poem is parsed but not run.


#14

I first started programming when I was 8, but between age 13 and 20 I had a period where I didn't really have access to computers. When I got back to computing, Perl was my first new language. The book Learning Perl was my Bible for years, and the introduction in which Larry Wall explains that all programming languages are just human languages gave me a way to think about programming as a second language which fit in well with what I'd been doing during my teens (ie learning lots of foreign languages). Larry Wall's conception of programming languages as human languages and the tradition of Perl Poetry is what led to the way that I teach students to program today. "It's all just language. Learn the vocabulary. Learn the syntax. Talk to the computer."

It's great to see this poem here.

I think Python is to modern programming what Perl was to programming in the 90's. I'd love to see some Python poetry.


#15

A lovely bit of nostalgia


#16

Black perl makes me proud to be a perl programmer. I believe that the version that compiles under perl 5 has not sacrificed aesthetics for modernisation.


#17

I think the $scan sort of throws a wrench into the works. Perhaps there's some way to work in some commentary on material wealth?


#18

This topic was automatically closed after 5 days. New replies are no longer allowed.