While I'm still able to remember, I list below the other new
(albeit unsuccessful) Ruby solutions I found while searching
for the elusive 111 stroker.
It's possible I've missed something and one of these
attempts might be transformed from a loser into a winner.
The following solutions are all of a similar form to the
original 111 stroker, namely:
r=*$<;'XXXXXXXXXXXX'.each_byte{|i|$><<"%#{327%i/9}c"%
'hxmo'[(i-r.to_i)%12/~i^~r[3,2].to_i/5%i%12/11]+$/*(i/85)}
where
XXXXXXXXXXXX above is a string with ord values
120, 47, 253, 22, 194, 21, 183, 44, 196, 55, 125, 246.
For clarity below, I show only the
'hxmo'[expr] expressions:
'hxmo'[(i-r.to_i)%12/~i^~r[3,2].to_i/5%i%12/11]
'ohmx'[1>>(i-r.to_i)%12^2&2<<i%12-r[3,2].to_i/5]
'hxmo'[(i-r.to_i)%12/-i^0**(i%12^r[3,2].to_i/5)]
'mxho'[1>>(i-r.to_i)%12^(i%12^r[3,2].to_i/5)/-i]
'mxho'[(r[3,2].to_i/5-i)%12/-i^1>>(r.to_i-i)%12]
'hxmo'[(i-r.to_i)%12/-i^1>>(2*r[3]+r[4]/53-i)%12]
'mxho'[(2*r[3]+r[4]/53-i)%12/-i^1>>(i-r.to_i)%12]
'ohmx'[1>>(i-r.to_i)%12^(i%12==r[3,2].to_i/5).id]
And here are some other random attempts:
r=*$<;'XXXXXXXXXXXX'.each_byte{|i|printf"%*c"+$/*(i/85),
327%i/9,'hxmo'[(i-r.to_i)%12/~i^~r[3,2].to_i/5%i%12/11]}
r=*$<;'XXXXXXXXXXXX'.each_byte{|i|$><<" "*(318%i/9)+
'hxmo'[(i-r.to_i)%12/~i^~r[3,2].to_i/5%i%12/11,1]+$/*(i/85)}
/:/!~gets;'XXXXXXXXXXXX'.each_byte{|i|$><<"%#{327%i/9}c"%
'hxmo'[(i-$_.to_i)%12/~i^~$'.to_i/5%i%12/11]+$/*(i/85)}
r=*$<;$><<"%#{327%J/9}c"%'hxmo'[~r[3,2].to_i/5%J%12/11^
(J-r.to_i)%12/~J]+$/*(J/85)while J='ohXXXXXXXXXXXX'[$.+=1]
r=*$<;loop{i="hmXXXXXXXXXXXX"[$.+=1];$><<"%#{327%i/9}c"%
'hxmo'[(i-r.to_i)%12/~i^~r[3,2].to_i/5%i%12/11]+$/*(i/85)}
r=*$<;'XXXXXXXXXXXX'.each_byte{|i|$><<"%*c"%[327%i/9,
(i%12==r.to_i%12??x:?o)&(i%12==r[3,2].to_i/5??}:?o)]+$/*(i/85)}
gets=~/:/;'XXXXXXXXXXXX'.each_byte{|i|print" "*(318%i/9),
(111+(i%12==$_.to_i%12?9:0)&111+(i%12==$'.to_i/5?14:0)).chr,$/*(i/85)}
Note that in the solutions above using
318 rather than
327, the
XXXXXXXXXXXX string is a string with ord values:
120, 47, 253, 22, 194, 9, 183, 44, 196, 55, 125, 246.
-
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.