Skip to content

Instantly share code, notes, and snippets.

@mohawk2
mohawk2 / pdl-opengl.pl
Created January 19, 2025 19:34 — forked from vividsnow/pdl-opengl.pl
pdl opengl example
#!/usr/bin/env perl
use v5.40; use warnings;
use Syntax::Keyword::Match;
use OpenGL ':all';
use PDL;
use PDL::Constants qw'PI E I';
use PDL::Transform;
use Time::HiRes qw'gettimeofday tv_interval';
use IPC::Open2 'open2';
@mohawk2
mohawk2 / benchmark-param-validation-practical.pl
Last active September 24, 2017 03:11 — forked from tobyink/benchmark-param-validation-practical.pl
Speed comparison between Type::Params and Params::Validate (PP and XS) and Function::Parameters
use 5.012;
use Benchmark qw( cmpthese timethese );
use Test::Deep::NoTest;
use Scalar::Util qw(looks_like_number);
use Params::Validate qw(SCALAR HASHREF ARRAYREF);
my @SIG = (
{ type => SCALAR, callbacks => { looks_like_number => sub { looks_like_number($_[0]) } } },
{ type => HASHREF },