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

[FWP] [OT] Befunge rocks.



If you've not hippened yourself to this crazy language, do so now.

Here are two quines (they print themselves as output):

f6+#;::f6+\-0g,!#@_1-;

and

<;-1_@#,g0-\+6f::;#+6f

You might think that as a Perl program, such an obtuse language would
destroy your mind.  Well, it didn't do it to me.  But then, I've only been
using it for a day.  YMMV. ;)

Here's the shortest (non-empty) Perl quine I know of:

open+0;print<0>

That's kinda cheap, since it reads its source from the filesystem.
But Befunge lets you have direct access to the source code (you can modify
it as you go along) so I guess that might be cheating.  But still.

Oh, and here's a palindromic quine:

a5*::a5*\-0g,!#@_1-0f7+-jj-+7f0-1_@#!,g0-\*5a::*5a

Yay Befunge!

-- 
Jeff "japhy" Pinyan     japhy@pobox.com    http://www.pobox.com/~japhy/
CPAN - #1 Perl Resource  (my id:  PINYAN)       http://search.cpan.org/
PerlMonks - An Online Perl Community          http://www.perlmonks.com/
The Perl Archive - Articles, Forums, etc.   http://www.perlarchive.com/



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