[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] Prisoners' Perl



The notorious French literary group _Oulipo_ came up with
the following scenario: A prisoner has a very limited supply
of paper to write on, and so in order to conserve this scarce
resource he decides to use only those letters which extend
neither above nor below the line: aceimnorsuvwxz

Ian Monk's _a russian con's economic missive_
 (http://www.kitsite.com/~robin/ou-x-po/talk/prisoner.html)
is an example of writing within this constraint.


Naturally, I'd like to apply this idea to Perl. Because
non-alphabetic symbols are so important to us, it was
obviously necessary to extend the idea a little. I
analyzed my terminal font, and decided that the characters

  &+-.:<=>acemnorsuvwxz~ 

went neither too far up nor too far down. Naturally the results
may be a little different for other fonts, but I needed a
standard. So I started to program in this restricted Perl.

It's a frustrating little language, but rather beautiful.

A JAPH:

  s==x= && s==.er & xac.uc coer= && s==m--+m--+m--+m--=e &&
  s==xac.~o= && s=.+=<<x& evam=ee &&
  eva~
  x
  s=c.=c= && s=x=xz&<<o=e &&
  xm
  o
  s=x=x = && s=x=<<xc& <<xo =e&&
  x~
  xc
  xm
  xo
  s=x=xer= && s=x=xr& xu=e && s=x=xer = && s=x=xx & uc xn=e &&
  s=.=xu & <<o=e &&
  x~
  o
  s=x=x ano= && s=x=xu & <<o=e &&
  x~
  o
  s=x=xus= && s=x=xo & uc xz=e && s=
  == && s=.== && s=.+=reverse uc=e && s=.=
  r= && s=.+=reverse uc=se &&
  
  warn uc


I wonder whether it would be possible to write a Turing Machine
in this restricted language, demonstrating its algorithmic
completeness.

 .robin.


Notes:
 http://www.kitsite.com/~robin/ou-x-po/talk/perl-prisoner.html

Analyzing font metrics:
 http://www.kitsite.com/~robin/ou-x-po/fontm.c
 http://www.kitsite.com/~robin/ou-x-po/prisoner.pl 

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe