🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.apl
Article #33

example of self-replicating expression

#33
From: uwvaxgreg
Date: Mon, 26 Apr 1982 11:04
24 lines
1305 bytes
Jeff Shallit sent me several back issues of APL News, a publication of
APL Press, Box 27, Swarthmore, PA 19081,  (215) 328-9771 in response to
my request for an article on self-replicating APL expressions.
This is a fascinating, insightful newsletter on APL, and I highly
recommend it.
   A self-replicating expression is a character vector which
includes no alphabetics and which when typed in returns itself.
Formally, a vector C is self-replicating if

   ^/ ( C = execute C ),
      ~ C epsilon 'ABC...XYZ_delta_underscore A...underscore delta'

yields one.
(I use underbar to indicate that one symbol is ending and another is starting.)
The shortest example they give is the following:

     22_rho_1_transpose_11_rho_'_'_'22_rho_1_transpose_11_rho_'_'_'

If you write the above expression on your blackboard using apl characters,
you will notice that it is 22 characters long, and can be viewed either as a
character vector with some manipulations prepended or as a vector of 11
characters that is followed by a repitition of itself.
				- Greg Johnson
				  UW - Madison
Technical Details
Message-ID: <anews.Auwvax.343>
Path: arc1-ca.pugleaf.net!utzoo!decvax!harpo!uwvax!greg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!decvax!harpo!uwvax!greg
From: uwvax!greg
Newsgroups: net.lang.apl
Subject: example of self-replicating expression
Date: Mon, 26 Apr 1982 11:04:12 +0000
Message-ID: <anews.Auwvax.343>