in reply to Re: My First Good(?) Original(?) JaPh,s
in thread My First Good(?) Original(?) JaPh,s

To avoid relying on the presence of echo...

perl -pe "BEGIN{@ARGV='perl -le print+q~Just\ another\ Perl\ Hacker,~| +'}"

Yours is nicely obfuscated, but I guess that's not really what I was going for. I like those japhs that you look at and think, "huh?" because they are almost obvious but not quite. I especially like the ones that highlight a peculiarity or two of perl's. Ones that look too messy, usually discourage closer inspection, at least for me. Things like s((??{"\044"}));"...";e; increase the tedium factor but that's about it.

On the other hand, I liked your use of $^I and I really should have placed the pipe first and just used open too... good catch. How about:

perl -i'|echo\040Just\040another\040Perl\040hacker,' -e's//qq("$^I")/e +e;open _;'

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re^3: My First Good(?) Original(?) JaPh,s
by Aristotle (Chancellor) on May 24, 2003 at 15:51 UTC

    Doesn't seem obfuscated enough to me. Regardless even of the /ee it's pretty obvious what's going on.

    I think it's important to hide the pipe for this one, otherwise while the details are not immediately obvious, the mechanics remain apparent. That's why I chose such an unusual placement of the shell quotes. The caret and dollar used to edit the incoming line also give away a lot. And don't forget that the one who started with pure tedium measures was you. :) (Remember s();..;;)

    Obfuscations that rely purely on one or two arcane features don't work very well as far as I'm concerned. The trick is to hide your use of that arcane feature, and if possible even mislead the reader into thinking that something else entirely is going on. The best example I've ever seen is from Abigail: Things are not what they seem like.

    As an aside, the best obfu I've ever seen is also from him:

    A Japh that uses...
    • Computed goto.
    • eval
    • POD.
    • A loop with only unconditional jumps....
    • ... but it terminates anyway.
    • Self modifying code.
    • strict
    • -w
    • No more than one line.
    • No more than 80 characters.
    perl -Mstrict -we '$_ = "goto F.print chop;\n=rekcaH lreP rehtona tsuJ +";F1:eval'
    (From his Japhs talk.)

    Makeshifts last the longest.

      And don't forget that the one who started with pure tedium measures was you. :) (Remember s();..;;)

      You are absolutely right. And I actually prefer arthas's version of it.

      As far as hiding the pipe goes, I don't think it's necessary. I don't mind the underlying mechanism being transparent as long as the trip there takes a bit of thought. (And, mine admittedly doesn't take much...)

      Abigail's is a masterpiece. There's no denying it. And it certainly has the quality I like in that it looks simple at first and draws you in. It doesn't look like line noise.

      Even if we can agree on near perfection when we see it, I think we just have different tastes in japhs. :-)

      -sauoq
      "My two cents aren't worth a dime.";