Pathologically Eclectic Rubbish Lister PerlMonks

### Emily Dickenson in perl

by diotalevi (Canon)
 on Oct 14, 2002 at 04:32 UTC Need Help??

```my \$d;
my \$c = sub {
print
chr( shift() - 1 - \$d + unpack "V", unpack "P4", pack "V", 4 + s
+hift );
};
\$d = 1 + unpack "V", unpack "P4", pack "V", 4 + \$c;
{ my \$F1 = \$c; \$c->( 64, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 112, \$c ) }{ my \$F1 = \$c; \$c->(
+ 100, \$c ) }
{ \$c->( 112, \$c ) }{ my \$F1 = \$c; \$c->(
+ 96, \$c ) }
{ \$c->( 108, \$c ) }{ \$c->( 44,  \$c ) }
+
{ \$c->( 32,  \$c ) }{ \$c->( 112, \$c ) }
+
{ my \$F1 = \$c; \$c->( 100, \$c ) }{ \$c->( 116, \$c ) }
+
{ my \$F1 = \$c; \$c->( 96, \$c ) }{ \$c->( 108, \$c ) }
+
{ \$c->( 44,  \$c ) }{ \$c->( 32,  \$c ) }
+
{ my \$F1 = \$c; \$c->( 96, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 108, \$c ) }
{ \$c->( 100, \$c ) }{ \$c->( 32,  \$c ) }
+
{ my \$F1 = \$c; \$c->( 96, \$c ) }{ \$c->( 32,  \$c ) }
+
{ \$c->( 116, \$c ) }{ \$c->( 104, \$c ) }
+
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 108, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 112, \$c ) }
{ my \$F1 = my \$F2 = \$c; \$c->( 108, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 8,   \$c ) }
{ my \$F1 = \$c; \$c->( 84, \$c ) }{ \$c->( 112, \$c ) }
+
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 108, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 108, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = \$c; \$c->(
+ 96, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 96,  \$c ) }
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 108, \$c ) }{ my \$F1 = \$c; \$c->(
+ 108, \$c ) }
{ my \$F1 = \$c; \$c->( 108, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 108, \$c ) }
{ my \$F1 = my \$F2 = \$c; \$c->( 108, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 112, \$c ) }{ my \$F1 = \$c; \$c->(
+ 116, \$c ) }
{ my \$F1 = \$c; \$c->( 108, \$c ) }{ my \$F1 = \$c; \$c->(
+ 108, \$c ) }
{ my \$F1 = \$c; \$c->( 100, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 112, \$c ) }
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 36,  \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 112, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = \$c; \$c->(
+ 108, \$c ) }
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 108, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 112, \$c ) }
{ my \$F1 = my \$F2 = \$c; \$c->( 108, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = \$c; \$c->( 44, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 8, \$c ) }
{ my \$F1 = \$c; \$c->( 64, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = my \$F2 = \$c; \$c->( 100, \$c ) }{ \$c->( 108, \$c ) }
+
{ my \$F1 = \$c; \$c->( 96, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 112, \$c ) }
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 104, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 108, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 100, \$c ) }
{ \$c->( 32, \$c ) }{ \$c->( 68, \$c ) }
+
{ my \$F1 = \$c; \$c->( 100, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 116, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = \$c; \$c->(
+ 44, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = \$c; \$c->(
+ 64, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 64, \$c ) }
{ my \$F1 = \$c; \$c->( 100, \$c ) }{ my \$F1 = \$c; \$c->(
+ 100, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 108, \$c ) }
{ my \$F1 = my \$F2 = \$c; \$c->( 112, \$c ) }{ \$c->( 32,  \$c ) }
+
{ \$c->( 116, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 116, \$c ) }
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 108, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = \$c; \$c->( 44, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 8, \$c ) }
{ my \$F1 = \$c; \$c->( 64, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = my \$F2 = \$c; \$c->( 64,  \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 112, \$c ) }
{ my \$F1 = \$c; \$c->( 100, \$c ) }{ my \$F1 = \$c; \$c->(
+ 100, \$c ) }
{ my \$F1 = my \$F2 = \$c; \$c->( 120, \$c ) }{ my \$F1 = \$c; \$c->(
+ 100, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = \$c; \$c->(
+ 44, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = \$c; \$c->(
+ 96, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 96, \$c ) }
{ my \$F1 = \$c; \$c->( 96, \$c ) }{ \$c->( 112, \$c ) }
+
{ my \$F1 = \$c; \$c->( 100, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 112, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = \$c; \$c->(
+ 104, \$c ) }
{ my \$F1 = my \$F2 = \$c; \$c->( 108, \$c ) }{ \$c->( 32,  \$c ) }
+
{ \$c->( 116, \$c ) }{ \$c->( 104, \$c ) }
+
{ my \$F1 = \$c; \$c->( 100, \$c ) }{ \$c->( 32,  \$c ) }
+
{ \$c->( 116, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 112, \$c ) }
{ my \$F1 = \$c; \$c->( 100, \$c ) }{ my \$F1 = \$c; \$c->(
+ 100, \$c ) }
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 112, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = \$c; \$c->( 44, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 8, \$c ) }
{ my \$F1 = \$c; \$c->( 64, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 108, \$c ) }
{ \$c->( 100, \$c ) }{ \$c->( 32,  \$c ) }
+
{ my \$F1 = \$c; \$c->( 72, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 36, \$c ) }
{ my \$F1 = \$c; \$c->( 108, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = \$c; \$c->( 96, \$c ) }{ \$c->( 32, \$c ) }
+
{ my \$F1 = my \$F2 = \$c; \$c->( 80, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 108, \$c ) }
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 112, \$c ) }{ my \$F1 = \$c; \$c->(
+ 100, \$c ) }
{ my \$F1 = \$c; \$c->( 32,  \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 8, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = \$c; \$c->(
+ 44, \$c ) }
{ \$c->( 32, \$c ) }{ my \$F1 = \$c; \$c->(
+ 68,  \$c ) }
{ my \$F1 = \$c; \$c->( 108, \$c ) }{ my \$F1 = \$c; \$c->(
+ 104, \$c ) }
{ \$c->( 108, \$c ) }{ my \$F1 = \$c; \$c->(
+ 120, \$c ) }
{ \$c->( 32, \$c ) }{ \$c->( 68, \$c ) }
+
{ my \$F1 = \$c; \$c->( 104, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 96,  \$c ) }
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 104, \$c ) }{ my \$F1 = \$c; \$c->(
+ 100, \$c ) }
{ my \$F1 = my \$F2 = \$c; \$c->( 108, \$c ) }{ my \$F1 = my \$F2 =
+my \$F3 = \$c; \$c->( 112, \$c ) }
{ my \$F1 = my \$F2 = my \$F3 = \$c; \$c->( 108, \$c ) }{ my \$F1 = my \$F2 =
+\$c; \$c->( 108, \$c ) }
{ my \$F1 = my \$F2 = \$c; \$c->( 8,   \$c ) }

Update 2009-09-01. Works on 5.10.0 and it's prettier.

Update 2002-10-17. This code makes assumptions about your perl runtime environment that may not be true. In particular your CPU should be little endian and use 32 bit pointers. Your compiler should not re-order structs. This means that the code as written works great on each of the platforms I tested it on. This is just a case where your mileage may vary.

Those environments are all ix86 using stock gcc-compiled perl unless otherwise stated:

• OpenBSD perl 5.6.1
• Cygwin perl 5.6.1
• Cygwin perl 5.8.0
• W2K ActiveState MSVC compiled perl 5.6.1.

Replies are listed 'Best First'.
Re: Emily Dickenson in perl
by krisahoch (Deacon) on Oct 15, 2002 at 22:53 UTC
```      Poetry in Perl
Obfuscation very well done
Is a Haiku next?

++ when I have more votes

Kristofer Hoch

Re: Emily Dickenson in perl
by diotalevi (Canon) on Oct 14, 2002 at 15:26 UTC

I do want to at least note that the initial compression layer is there only to keep the initial size down. It's not the intended obfuscation. The other part is better ;-)

```__SIG__
printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::
+svref_2object(sub{})->OUTSIDE
This
by diotalevi (Canon) on Nov 14, 2002 at 18:30 UTC

This node exists just to be 'this'. It'll go away if you ignore it. In fact, somone was probably lazy in their linking since you really ought not to be here unless you really *do* mean to be here in which case carry on. ;-) Also head on over to That node and check out the awesome sunset.

Re: Emily Dickenson in perl
by Willard B. Trophy (Hermit) on Oct 17, 2002 at 14:20 UTC
It's good to be reacquainted with that obscure but timeless classic: "Segmentation Fault (core dumped)".
Re: Emily Dickenson in perl
by jens (Pilgrim) on Oct 14, 2002 at 04:39 UTC
Update: never mind.
--
Microsoft delendum est.

Sorry about that. I just didn't remove my sigline from the bottom. I altered the original and if you /really/ care what my sig is, it's on this post. I've just sort assumed people would read __SIG__ and stop there but... oh well. Try it again.

```__SIG__
printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::
+svref_2object(sub{})->OUTSIDE

Create A New User
Node Status?
node history
Node Type: obfuscated [id://204972]
Approved by Len
Front-paged by jarich
help
Chatterbox?
 [Corion]: Oh yay. The (external, not guided by me) programmers have chosen Moose+DBIx::Class for some implementation, and now seem to do 1+n SELECT statements for each row, as is usual when using ORMs. [Corion]: So maybe I should investigate how to plug in a cache in front of DBIx::Class so I can do a ->selectall_hashre f and then satisfy the "sub"-selects from that cached single SELECT statement ...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2017-09-25 10:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
During the recent solar eclipse, I:

Results (279 votes). Check out past polls.

Notices?