Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Compression in Golf: Part I

by eyepopslikeamosquito (Archbishop)
on Oct 01, 2012 at 02:48 UTC ( [id://996573]=note: print w/replies, xml ) Need Help??


in reply to Compression in Golf: Part I

I just realized we can reduce my original packed 95-stroker:

map$c[$_*=.52,5.5-4.7*cos][8+7.4*sin]=($`%12^$_?o:x)&($'/+5^$ a.$_?o:v125),0..s//<>/e./:/;print"@$_\n"for@c
by two strokes:
map$c[$_*=.52,5.5-4.7*cos][8+7.4*sin]=($`%12^$_?o:x)&($'/5^$_ ?o:v125),0..s//<>/e./:/;print"@$_\n"for@c#```
As you can see from the table below, the "?" character, by pure fluke, is two before "A" in the ASCII table:

ordpacklenchr
6331?
6432@
653345A

So we can hijack pack's "?" length byte as part of our ternary expression! Note that we padded the source program with #``` at the end to keep its length at 45, the required multiple of four.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://996573]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-24 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found