Black Perl

Last updated

"Black Perl" is a code poem written using the Perl programming language. It was posted anonymously to Usenet on April 1, 1990, [1] and is popular among Perl programmers[ citation needed ] as a piece of Perl poetry. Written in Perl 3, the poem is able to be executed as a program.

Contents

Black Perl has been discussed in several scholarly works, [2] [3] [4] and is considered an example of generative literature, a genre of electronic literature.

Attribution

When posted to the comp.lang.perl newsgroup the poem was attributed to "a person who wishes to remain anonymous". [1] Sharon Rauenzahn (née Hopkins), another Perl poet, has been suspected to be the author but has since denied the claim. [5]

Result of program execution

When executed, Black Perl exits on line one, upon reaching the function exit. The remaining lines are parsed by the Perl interpreter but never actually executed. The program produces no output.

Though it will not parse under Perl 5, multiple independent updates to Black Perl to make it parsable in Perl 5 have been published. [6] [7]

"Black Perl"

BEFOREHAND:closedoor,eachwindow&exit;waituntiltime.openspellbook,study,read(scan,select,tellus);writeit,printthehexwhileeachwatches,reverseitslength,writeagain;killspiders,popthem,chop,split,killthem.unlinkarms,shift,wait&listen(listening,wait),sorttheflock(then,warnthe"goats"&killthe"sheep");killthem,dumpqualms,shiftmoralities,valuesaside,eachone;diesheep!dietoreversethesystemyouaccept(reject,respect);nextstep,killthenextsacrifice,eachsacrifice,wait,redoritualuntil"all the spirits are pleased";doit("as they say").doit(*everyone***must***participate***in***forbidden**s*e*x*).returnlastvictim;packagebody;exitcrypt(time,times&"half a time")&closeit,select(quickly)&warnyournextvictim;AFTERWORDS:tellnobody.wait,waituntiltime;waituntilnextyear,nextdecade;sleep,sleep,dieyourself,dieatlast

See also

Related Research Articles

MUMPS, or M, is an imperative, high-level programming language with an integrated transaction processing key–value database. It was originally developed at Massachusetts General Hospital for managing hospital laboratory information systems.

<span class="mw-page-title-main">Perl</span> Interpreted programming language first released in 1987

Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".

rn is a news client written by Larry Wall and originally released in 1984. It was one of the first newsreaders to take full advantage of character-addressable CRT terminals. Previous newsreaders, such as readnews, were mostly line-oriented and designed for use on the printing terminals which were common on the early Unix minicomputers where the Usenet software and network originated. Later variants of the original rn program included rrn, trn, and strn.

<span class="mw-page-title-main">Shell script</span> Script written for the shell, or command line interpreter, of an operating system

A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manipulation, program execution, and printing text. A script which sets up the environment, runs the program, and does any necessary cleanup or logging, is called a wrapper.

On Unix and Unix-like computer operating systems, a zombie process or defunct process is a process that has completed execution but still has an entry in the process table: it is a process in the "terminated state". This occurs for the child processes, where the entry is still needed to allow the parent process to read its child's exit status: once the exit status is read via the wait system call, the zombie's entry is removed from the process table and it is said to be "reaped". A child process initially becomes a zombie, only then being removed from the resource table. Under normal system operation, zombies are immediately waited on by their parent and then reaped by the system. Processes that stay zombies for a long time are usually an error and can cause a resource leak. Generally, the only kernel resource they occupy is the process table entry, their process ID. However, zombies can also hold buffers open, consuming memory. Zombies can hold handles to file descriptors, which prevents the space for those files from being available to the filesystem. This effect can be seen by a difference between du and df. While du may show a large amount of free disk space, df will show a full partition. If the zombies are not cleaned, this can fill the root partition and crash the system.

Ousterhout's dichotomy is computer scientist John Ousterhout's categorization that high-level programming languages tend to fall into two groups, each with distinct properties and uses: system programming languages and scripting languages – compare programming in the large and programming in the small. This distinction underlies the design of his language Tcl.

Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.

<span class="mw-page-title-main">Laurence Canter and Martha Siegel</span> 1994 originators of commercial spam; married American lawyers

Laurence A. Canter and Martha S. Siegel were partners in a husband-and-wife firm of lawyers who posted the first massive commercial Usenet spam on April 12, 1994.

<span class="mw-page-title-main">Raku (programming language)</span> Programming language derived from Perl

Raku is a member of the Perl family of programming languages. Formerly known as Perl 6, it was renamed in October 2019. Raku introduces elements of many modern and historical languages. Compatibility with Perl was not a goal, though a compatibility mode is part of the specification. The design process for Raku began in 2000.

In computer programming, the Schwartzian transform is a technique used to improve the efficiency of sorting a list of items. This idiom is appropriate for comparison-based sorting when the ordering is actually based on the ordering of a certain property of the elements, where computing that property is an intensive operation that should be performed a minimal number of times. The Schwartzian transform is notable in that it does not use named temporary arrays.

<span class="mw-page-title-main">Elvis (text editor)</span> Enhanced clone of the vi text editor

Elvis is an enhanced clone of the vi text editor, first released in January 1990. It introduced several new features, including syntax highlighting and built-in support for viewing nroff and HTML documents. Elvis is written by Steve Kirkendall and is distributed under the Clarified Artistic License (ClArtistic) which is used by Perl and is a GPL-compatible free software license.

Berkeley Yacc (byacc) is a Unix parser generator designed to be compatible with Yacc. It was originally written by Robert Corbett and released in 1989. Due to its liberal license and because it was faster than the AT&T Yacc, it quickly became the most popular version of Yacc. It has the advantages of being written in ANSI C89 and being public domain software.

<span class="mw-page-title-main">Leonard H. Tower Jr.</span> American activist

Leonard "Len" H. Tower Jr. is a free software activist and one of the founding board members of the Free Software Foundation, where he contributed to the initial releases of gcc and GNU diff. He left the Free Software Foundation in 1997.

A Usenet personality was a particular kind of Internet celebrity, being an individual who gained a certain level of notoriety from posting on Usenet, a global network of computer users with a vast array of topics for discussion. The platform is usually anonymous, although users can get celebrity status, usually by being deemed different from other posters in some way.

<span class="mw-page-title-main">Usenet</span> Worldwide computer-based distributed discussion system

Usenet, USENET, or "in full", User's Network, is a worldwide distributed discussion system available on computers. It was developed from the general-purpose Unix-to-Unix Copy (UUCP) dial-up network architecture. Tom Truscott and Jim Ellis conceived the idea in 1979, and it was established in 1980. Users read and post messages to one or more topic categories, known as newsgroups. Usenet resembles a bulletin board system (BBS) in many respects and is the precursor to the Internet forums that have become widely used. Discussions are threaded, as with web forums and BBSes, though posts are stored on the server sequentially.

Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that solves a certain problem. Code golf challenges and tournaments may also be named with the programming language used.

The Perl virtual machine is a stack-based process virtual machine implemented as an opcodes interpreter which runs previously compiled programs written in the Perl language. The opcodes interpreter is a part of the Perl interpreter, which also contains a compiler in one executable file, commonly /usr/bin/perl on various Unix-like systems or perl.exe on Microsoft Windows systems.

<span class="mw-page-title-main">Hamilton C shell</span>

Hamilton C shell is a clone of the Unix C shell and utilities for Microsoft Windows created by Nicole Hamilton at Hamilton Laboratories as a completely original work, not based on any prior code. It was first released on OS/2 on December 12, 1988 and on Windows NT in July 1992. The OS/2 version was discontinued in 2003 but the Windows version continues to be actively supported.

<span class="mw-page-title-main">Snake case</span> Words joined with underscores

Snake case is the naming convention in which each space is replaced with an underscore (_) character, and words are written in lowercase. It is a commonly used naming convention in computing, for example for variable and subroutine names, and for filenames. One study has found that readers can recognize snake case values more quickly than camel case. However, "subjects were trained mainly in the underscore style", so the possibility of bias cannot be eliminated.

Code poetry is literature that intermixes notions of classical poetry and computer code. Unlike digital poetry, which prominently uses physical computers, code poems may or may not run through executable binaries. A code poem may be interactive or static, digital or analog. Code poems can be performed by computers or humans through spoken word and written text.

References

  1. 1 2 Wall, Larry; Christiansen, Tom; Orwant, Jon (July 2000). Programming Perl, Third Edition. O'Reilly. p. 649. ISBN   0-596-00027-8.
  2. Segura, Cynthia Anne (2004). Perls of wisdom: Computer language and Perl poetry (Thesis). ProQuest   305162869.[ page needed ]
  3. Kerr, Chris; Holden, Daniel (2023). "Optimizing Code for Performance: Reading ./code --poetry". In Korecka, Magdalena Elisabeth; Vorrath, Wiebke (eds.). Poetry and contemporary visual culture: = Lyrik und zeitgenössische Visuelle Kultur. Poetry in the digital age. Berlin: De Gruyter. p. 172. ISBN   978-3-11-129933-4.
  4. Tomasula, Steve (30 December 2014). "Our Tools Make Us (And Our Literature) Post: Essai édité par Jean-Yves Pellegrin (Université Paris-Sorbonne)". Transatlantica (2). doi:10.4000/transatlantica.7102.
  5. Sharon Hopkins (1993-04-16). "Re: Forking a bunch of processes..." Newsgroup:  comp.lang.perl. Usenet:   1993Apr16.233742.21214@cheshire.oxy.edu . Retrieved December 5, 2014.
  6. jonadab (2003-02-21). "Black Perl updated for Perl 5" . Retrieved 2007-09-15.
  7. Ovid (2006-10-17). "Black Perl Revisited" . Retrieved 2007-09-15.