This wasn't terribly hard.. :)
First step: uncompress the syntax.
$a = ord $/; $b = $a - 9; for( 483315457, 3759149058, 3883269635, 3794874370, 1647390720, 1644171264, 1912787457, 4277106435, 4100403459, 608567554, 608436482 ) { $c = 0; for( split//, substr unpack("B*", pack"L*", $_), 6 ) { $o[$c] += (ord d, ord 2, $a, $a, $a, $a, $a/2, $b, $b, $b, $b) +[$i] if $_; $c++; } $i++; } print chr for @o;
This doesn't look very daunting. Let's replace constants:
for( '01110011111100111000011100', '10000100000001000011100000', '11111111100111010111100111', '10001100000011000111100010', '00001100000011000101100010', '00000100000000000001100010', '01110100100000001001110010', '11011101111110111111111110', '11001100010110011111110100', '10000000010100011000100100', '10000000010100010000100100', ) { $c = 0; for( split//, $_ ) { $o[$c] += (100, 50, 10, 10, 10, 10, 5, 1, 1, 1, 1)[$i] if $_; $c++; } $i++; } print chr for @o;
Now it's pretty clear why it's titled "roman obfu". It's also obvious that $c selects one roman numeral from the list for each iteration of the outer loop. The inner loop iterates over @o and increments the current position by the value of the current roman digit if it has its bit set. Putting that in its own sub, we get the rather readable
sub increment_pos { my ($bitstring, $inc) = @_; my @bits = split //, $bitstring; for my $i (0 .. $#bitstring) { $o[$i] += $inc if $bitstring[$i]; } } increment_pos('01110011111100111000011100' => 100); increment_pos('10000100000001000011100000' => 50); increment_pos('11111111100111010111100111' => 10); increment_pos('10001100000011000111100010' => 10); increment_pos('00001100000011000101100010' => 10); increment_pos('00000100000000000001100010' => 10); increment_pos('01110100100000001001110010' => 5); increment_pos('11011101111110111111111110' => 1); increment_pos('11001100010110011111110100' => 1); increment_pos('10000000010100011000100100' => 1); increment_pos('10000000010100010000100100' => 1); print chr for @o;
In other words, the ASCII value for each character in Just another Perl hacker is expressed as a roman numeral.

Makeshifts last the longest.


In reply to Re: Roman Obfu (spoiler: unraveled) by Aristotle
in thread Roman Obfu by davido

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.