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:
ord | pack | len | chr |
63 | 31 | | ? |
64 | 32 | | @ |
65 | 33 | 45 | A |
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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|