Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

An awful, horrible, evil idea..

by dynamo (Chaplain)
on Aug 18, 2007 at 20:39 UTC ( [id://633522] : perlmeditation . print w/replies, xml ) Need Help??

I was looking at this obfu, and after running it, and looking at it again, it occured to me how almost MVC this concept of a perl obfuscation was -- how completely separate the logic is from the presentation.

It's been at least implied that making an obfuscation is difficult and a mark of a talented (and perhaps dangerously obsessive) perl programmer. Might it not be a fun and dangerous experiment to crank it up a level of abstraction, and make an obfuscation maker? To bring the twisted art into the hands of the masses?

So suppose some madman were to start from a point of having a perl-aware context engine and something like a text editor ui. From that point you could change it into something like a painting program, allowing the user to draw arbitrarily, and as they draw, rewrite and reshape the text of the program while applying logically-harmless transitions to the text where needed to add more "ink" or to make certain areas darker or lighter. And while it would obviously cost something in performance, there's no reason it would have to change the functionality in any way (unless the performance timing affects the outcome - so you wouldn't want to use this thing on the core of a video encoding engine.)

Maybe while the user is painting, even try to (if this is even possible) arrange syntax elements in a pattern so that in a properly highlighting editor it will show a color image?

Can you imagine the labyrinthine obfus that could be produced with interactive graphical computer assistance? (cue maniacal laughter)

I don't want to be (solely) responsible for bringing such a thing into the world, but I don't mind planting the seed.. thoughts? For example, what transitions might be useful for "darkening" or "lightening"? One that comes to mind for darkening would be.. adding parenthesis around every expression element.

Replies are listed 'Best First'.
Re: An awful, horrible, evil idea..
by Errto (Vicar) on Aug 18, 2007 at 21:24 UTC
    As a starting point, you can take a look at Acme::EyeDrops. It doesn't do color nor does it have a GUI for the shapes, but those sound like things one could add.
      Thank you - I'd totally forgotten that existed. This just goes to show me, there are very very few truly new ideas under CPAN.

      EyeDrops looks perfect to use as a core engine to do the rendering as the user paints - you'd effectively be painting a shape file that could get fed into EyeDrops with each change and then show the result in the content area of the program.. nice.

      My take is that if you were to make this hypothetical thing, the proper way to do would not be to make a new engine to add darkness/brightness capabilities on top of the shape file, but to try to extend EyeDrops (in a fully backwards-compatible way) and still use it.

Re: An awful, horrible, evil idea..
by eyepopslikeamosquito (Archbishop) on Aug 19, 2007 at 00:55 UTC
      Wow, the collected wisdom and weirdom of CPAN is amazing. And.. that 3D stereogram node - that really, truly just blew me away. Thank you for pointing that out.