June 2016 Archives

Introducing SVG::Estimate

If you do anything with 2 dimensional CNC machines such as plotters, mills, or lasers, you’ve probably used some form of vector graphics. The most popular open source vector graphics type is called SVG or Scalable Vector Graphics. If you’re doing this professionally, you need to know how to charge for that work, and if you know the length of the shapes included in that vector file, you can do a pretty good job of preparing an estimate for a customer. That’s where SVG::Estimate comes in. It does the mind melting math…

Missing Smart Match

I know that smart match is considered experimental at best and is likely going away at worst, but I hate that! In what world is:

if( grep $_ eq $scalar, @array ) { }

Better than this?

if( $scalar ~~ @array ) { }

The former doesn’t even shortcut. Some will say that I should use any like this:

use List::MoreUtils qw/any/;
if( {$scalar eq $_} @array ) { }

But any damn fool can see that it’s 2 li…

About JT Smith

user-pic My little part in the greater Perl world.