Most paint-spatters are valid perl programs

I have no problem calling a paint splatter “Perl code”, but I do have a problem calling Perl code a “program”.

Across the board.




Sadly, the reverse is not true.


The co-author “Tim Toady” made me chuckle.

There’s more than one way to do it.

1 Like

I’ve come close in the past:

                   >12+>3+        >10+>11+>11+>12+>10+>10+>11+>3+>8+            
                 >10+>11+>      11+>3+>10+>10+>10+>11+>10+>11+>4+>+[<]          
              <-]2>4+>3->5                   +>4->2+>3-2>+   >4->4+>+>4+>       
           2+>4+>3- >->3-                                                       
       >+>4+>4+[    <]>[.                >  ]';$l=~                             
       s/ //g      ;$j=0                ;@c=('>','<','+'                        
                   ,'-',             '.',',','[',']');@v=('$P                   
                   ++;',            '$P--;'       ,'@B[$P]++;',                 
                   '@B[$P          ]--;','              print  chr              
                   (@B[$P         ]);','@B[$P]           =ord(getc              
                   (STDIN         ));','while            (@B[$P]                
                   ){',           '}');foreach           (@c){$p                
                  =$p.'$l         =~s/\\'.$_            .'/\\'.$_.              
                  '!/g;'           ;$i{$_}=@v        [$j];$j++;                 
                  }eval                $p;@a=split/!/,$l;foreach                
                  (@a){                 $h=chop$_;$_--;$q                       
                 =$q.$i                    {$h}x$_;$q                           
                 =$q.$i                      {$h};}                             

So the question now is, what program was the paint-splattering robot writing?

And could programming a paint splattering robot to OCR it’s own paint splatters and then respond to the commands the funnest way to bring about the singularity?


It strikes me as quite odd (maybe because of my age) that “smearing paint on the walls” and “learning to code” are here set up as opposites, or at least, as mutually exclusive.

When I was first learning something about BASIC programming at about 9, I was doing it because I was interested, because it was fun. It wasn’t supposed to be a job training exercise.

A very large fraction of my high school class took some kind of introductory computer programming course, and that was true again in college. Few of those students had any interest in turning that into a career, and few of them did, as far as I know.

Maybe “teaching kids to code” means something different now than it did when I was a kid learning about computers. I would have guessed it would involve something like Scratch, where it’s easy to make something silly for fun but almost impossible to make something serious or useful. It’s “coding” in the same way that “smearing paint on the walls” is “painting.”


My mom is someone for whom this dichotomy exists. I was born in '81, but as a kid was never exposed or encouraged to get into programming (or math or science) because of the dichotomy she perceived between creative expression and anything smelling of engineering. I didn’t start writing scripts until my animation professor in college showed us some actionScript. Luckily Lego snuck me some of the fundamentals growing up, but I do lament the lost time.


Do you think that Harry Q. Bovik would be proud of the legacy he has left behind?

What’s a pear and how is this connected in any way to paint splots. (Asking for a ludite)

But are most Mondrian paintings valid Piet programs?


Pear Programming is where two engineers sit at one desk and one of them eats a snack while the other works.


For the record, I’m usually the one snacking


A significant part of my job now is coding, and I think this whole idea of teaching everyone to code in elementary school is really stupid.

I didn’t teach myself to code until I was in my 30s, and more of my colleagues have formal qualifications in math and physics than in anything directly related to computers.

Basically, anyone with a solid grounding in math/ mathematical abstractions can teach themselves to code using google, and people without that grounding are going to have trouble with anything more sophisticated than patching together a website from a framework even if they do learn to code.

Having an elective in junior high or high school is a good idea, but as far as required classes go, a solid grounding in math and basic science is far more important than coding.


Wow. Back when we were learning C, there were horrible operators like ?: and += that could only have been designed to make your code impenetrable. We learned them, but we saw them as cruel jokes.

I am grateful Perl didn’t exist.


Hello world in perl:

package Earth;sub Greet{
~altime())?rotation?~q?The Worl
,$&;bless~~~~~~~~~~~~~~~c~~~~~~~ ~~~~~~~~~o~ntine~~~~~nt~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~s=\~~~~~~~~pangaea
;, YYsplit(\' ~~~~~~~~~~~~~~~~~\',{$;}~~~~~~~~~~~~~~~~~~)%3,YYsplit(
’;}^A=Ys ~~~~~~~~~~~~~~~~:\Q.\E:pack(~~~~~~~~~~~~~~~~~~~~~~\'h*\',j ~~~~~~~~~~~~~~~~~oin(q(),~~~~~~~~~~~~~~~~~~~~~~~grep{=

eval};Greet;‘the world’;


What’s wrong with +=? Or the ternary operator?


I have the merest suspicion that some of those tildes got treated as strikethroughs by the Discourse’s Markdown engine.


I’d suggest the CODE tag, but with Perl that might be inapt.


I’ve been working with computers since middle school and have been surrounded by very complex software and enterprise systems for the better part of 30 years. I agree that it is stupid to force kids into programming classes at young ages as there are many avenues to computer literacy besides coding.

I know how to code and have worked with many different languages over the years - Basic, VB, C, C++, Java, Perl, PHP, and now Python along with a slew of alphabetic protocols…however, I am notably very bad at programming. I know I suck at coding and will probably never improve much because coding, to me, is and always has been boring.

I can and still do hack around at various scripts and programs when necessary but put me in front of a blank screen with nothing but a set of requirements and I will never be able to deliver a working program. I need something to start with - a stubbed out function with comments, working examples, or better yet…“borrowed” code from someone else. Thankfully coding is not my primary job function.

Understanding system architectures and translating technical information into business value is what I’m good at and has afforded my a very productive career in software without having to actually produce code. I have the structural and foundational knowledge of programming which allows me to understand how and more importantly, why it works. This is very valuable for companies who need someone who can translate tech speak to customers without having to dress up code monkeys in suits and watch them sweat during sales calls.

In other words, I have people skills.