From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Bizarre languages ( was Re: Best language for low IQ programmers? )
Date: Sat, 24 Nov 2001 15:36:24 GMT
Date: 2001-11-24T15:36:24+00:00 [thread overview]
Message-ID: <3bffbe76.41a1$328@news.op.net> (raw)
In-Reply-To: mequvt8kgg8tl7mvr39jkfptcvbb7uk23n@4ax.com
In article <mequvt8kgg8tl7mvr39jkfptcvbb7uk23n@4ax.com>,
IsraelRT <israelrt@optushome.com.au> wrote:
>**" The effect of reading an Unlambda program is like habing
>your brains smashed out by a Lisp sexp wrapped around an ENIAC. You
>won't find anything like it west of Alpha Centauri.
>The Hitch-Hacker's Guide to Programming"
>
>"the following Unlambda program
>calculates and prints the Fibonacci numbers (as lines of
>asterisks)
>
>```s``s``sii`ki
> `k.*``s``s`ks
> ``s`k`s`ks``s``s`ks``s`k`s`kr``s`k`sikk
> `k``s`ksk
>
>"
This may entertain you. It's an implementation of an unlambda-like
language, as a Perl regex. (I left out the c operator, big surprise.)
The string in $_ is the program.
require 5.00553;
use re 'eval';
$|=1;
$z = qr{(?{local$d=1})
(?:`(?{$d++})
|.(?{$d--})
)+?
(?(?{$d})(?!))
}x;
$_="``As`SB``Ad``S``BS`BBI``Ae``B`SI`Ed``A?``C``CIi`pI``E?Z``BZZZZZ`KI
```CX`KIZZQZZZQZZZZZQZZZZQZ``BZZ```CX`KX`KXQ``Ee``EeZZZZZQZ```CX`KIZZQ
```CX`KIZZQZZZZQ```CXZ`KIZZQ``Ee```CX`KIZZQ``EdZZZQZ``BZZ```CX`KX`KXQ`
`BZ```CX`KIZZ`KXZQ``Ee```CX`KIZZQ``EdZZZQ``BZZZZ`KXQZ``BZZ```CX`KX`KXQ
``B```CXZ`KIZZ`KXQ``Ee``EeZZZZZQ``B``EeZZZ`KXQ``Ee``EdZZZQ``Ee```CX`KI
ZZQ``EdZZZQ``Ed``Ee```CX`KX`KI";
s/\n//g;s/Q/`KI``E?/g;s/X/IZZZ/g;s/Z/``Es/g;
1 while
s{`I($z) (?{$q=0})|``K($z)($z) (?{$q=1})
|```S($z)($z)($z)(?{$q=2})|```B($z)($z)($z) (?{$q=3})
|```C($z)($z)($z)(?{$q=4})|``A($z)($z) (?{$q=5})
|`i($z) (?{$R++,$q=6})|`p($z)(?{print(chr 120-$R), $R=0, $q=7})
|`E($z) (?{$q=8})|`V($z) (?{$q=9})
}
{local $^W;
$q<5 ?($1,$2,"``$4$6`$5$6","`$7`$8$9","``$10$12$11")[$q]
:$q==5?($bind{$13}=$14,"")
:($15,"",$bind{$17},"")[$q-6]
}ex;
__END__
Hope this helps.
Have a Turner combinatorial calulus day.
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
next prev parent reply other threads:[~2001-11-24 15:36 UTC|newest]
Thread overview: 92+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-05 19:54 Best language for low IQ programmers? Brian Metc
2001-11-05 20:10 ` Daniel Torreblanca
2001-11-05 20:29 ` Marc Bissonnette
2001-11-05 20:50 ` Marin David Condic
2001-11-06 19:01 ` Lou Moran
2001-11-06 21:20 ` Marin David Condic
2001-11-07 18:53 ` Ken Stauffer
2001-11-05 20:22 ` Gregory Toomey
2001-11-08 11:38 ` IsraelRT
2001-11-05 20:31 ` Marshall Spight
[not found] ` <9spjag$s6m$1@bob.news.rcn.net>
2001-11-16 5:55 ` no
2001-11-16 15:04 ` Greg Comeau
2001-11-05 20:38 ` arnet
2001-11-05 21:40 ` Jeff Connelly
2001-11-06 1:13 ` Logan Shaw
2001-11-05 20:56 ` Mario Grgic
2001-11-05 23:39 ` James Taylor
2001-12-14 16:58 ` Christian Menke
2001-12-14 18:02 ` Ilya Sterin
2001-12-14 19:42 ` Wes Groleau
2001-12-14 20:02 ` Mark Lundquist
2001-12-14 20:24 ` James Rogers
2001-12-16 4:33 ` Darren New
2001-12-14 20:23 ` James Rogers
2001-12-15 6:57 ` Marshall Spight
2001-12-17 8:29 ` Dmitry A. Kazakov
2001-12-18 13:44 ` Georg Bauhaus
2001-12-18 14:25 ` Josef Möllers
2001-12-18 17:24 ` Darren New
2001-12-18 19:48 ` Georg Bauhaus
2001-12-23 0:17 ` Lyndon
2001-12-24 2:19 ` Mark Henri
2001-11-05 20:56 ` Bruce Lewis
2001-11-05 21:04 ` Tim Hammerquist
2001-11-05 21:31 ` Alain D
2001-11-05 21:36 ` Jeff Connelly
2001-11-05 21:53 ` Marin David Condic
2001-11-09 22:22 ` nofreejack
2001-11-05 21:48 ` Charles Krug
2001-11-05 23:09 ` Richard Heathfield
2001-11-06 0:20 ` Thaddeus L Olczyk
2001-11-08 11:41 ` IsraelRT
2001-11-05 23:37 ` Patrick Doyle
2001-11-06 0:17 ` Thaddeus L Olczyk
2001-11-06 0:23 ` Thaddeus L Olczyk
2001-11-06 0:34 ` TheStonge
2001-11-06 0:46 ` Adrian Hoe
2001-11-06 7:11 ` Thaddeus L Olczyk
2001-11-06 2:05 ` Tim Hammerquist
2001-11-06 8:11 ` Best language for low self-esteem programmers? Dan Hinojosa
2001-11-07 17:50 ` Clinton A. Pierce
2001-11-11 0:12 ` Eircom News
2001-11-06 12:37 ` Best language for low IQ programmers? Kenny Chaffin
2001-11-06 15:29 ` karsten v.
2001-11-06 18:34 ` Tim Hammerquist
2001-11-08 11:42 ` IsraelRT
2001-11-06 12:49 ` peter
2001-11-06 16:18 ` Doug
2001-11-06 17:25 ` Gary Labowitz
2001-11-06 21:00 ` James Khan
2001-11-06 22:27 ` arnet
2001-11-06 22:58 ` Scott Peshak
2001-11-07 14:16 ` Ulrich Windl
2001-11-07 22:27 ` dmason
2001-11-08 5:50 ` Ken Stauffer
2001-11-08 19:07 ` Marin David Condic
2001-11-09 22:26 ` nofreejack
2001-11-16 14:23 ` nospam
2001-11-17 2:13 ` Kirsten Bayes
2001-11-17 15:05 ` Andrzej Jan Taramina
2001-11-24 1:34 ` Gregor
2001-11-24 9:58 ` Bizarre languages ( was Re: Best language for low IQ programmers? ) IsraelRT
2001-11-24 12:21 ` J French
2001-11-28 5:33 ` no
2001-11-24 15:36 ` Mark Jason Dominus [this message]
2001-11-28 5:32 ` no
2001-11-30 20:07 ` Mark Lundquist
2001-11-30 20:12 ` Marshall Spight
2001-11-30 20:34 ` E.Chang
2001-11-30 21:40 ` Carl G.
2001-12-01 18:07 ` Lance Purple
2001-12-02 0:28 ` Ada PROGRAMMING SKILLS IN HIGH DEMAND (once upon a time, in 1995 ) IsraelRT
2001-12-02 5:02 ` Bizarre languages ( was Re: Best language for low IQ programmers? ) Logan Shaw
2001-12-02 10:53 ` John R. Antley
2001-12-12 0:20 ` wallewek
2001-12-12 0:27 ` AV
2001-12-12 0:50 ` Hugh Laderman
2001-12-12 3:13 ` Mark Jason Dominus
2001-12-13 4:28 ` Leo Tohill
2001-12-12 2:37 ` Steven Rumbalski
2001-11-24 13:56 ` Best language for low IQ programmers? Patrick Doyle
2001-11-17 3:51 ` Alexandre
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox