SlideShare a Scribd company logo
1 of 103
Coming Soon …
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
All Around the World
Curtis “Ovid” Poe
https://allaroundtheworld.fr/
https://fosstodon.org/@ovid
https://bsky.app/profile/ovid.bsky.social
https://twitter.com/OvidPerl
ovid@allroundtheworld.fr
curtis.poe@gmail.com
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Thank you!
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Question Policy
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Corinna is Coming
FULL-FEATURED NATIVE OOP IN PERL!
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
But first, a detour … TINY MISTAKES
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
The Journey’s Start
BASIC
6809 Assembler
C
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Perl’s Lambda
my @fs = map { my $i = $_; sub ($arg) { $i + $arg } } 0 .. 9;
say $fs[3](4);
# 7
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Python’s Lambda
fs = [(lambda n: i + n) for i in range(10)]
print(fs[3](4))
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Python’s Lambda
fs = [(lambda n: i + n) for i in range(10)]
print(fs[3](4))
# 13
https://math.andrej.com/2009/04/09/pythons-lambda-is-broken/
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Python’s Lambda
fs = [(lambda n, i=i: i + n) for i in range(10)]
print(fs[3](4))
# 7
https://math.andrej.com/2009/04/09/pythons-lambda-is-broken/
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Perl’s Lambda
my @fs = map { sub ($arg) { $arg + $_ } } 0 .. 9;
say $fs[3](4);
# Use of uninitialized value $_ in addition (+) at …
# 4
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Reversing a List in Prolog
reverse([],[]).
reverse([Head|Tail],Reversed) :-
reverse(Tail,ReversedTail),
append(ReversedTail,[Head],Reversed).
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Reversing a List in Prolog—O(n2)
reverse([],[]).
reverse([Head|Tail],Reversed) :-
reverse(Tail,ReversedTail),
append(ReversedTail,[Head],Reversed).
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Reversing a List in Prolog—O(n)
accRev([],Accumulator,Accumulator).
accRev([Head|Tail],Accumulator,Reversed):-
accRev(Tail,[Head|Accumulator],Reversed).
reverse(List,Reversed) :- accRev(List,[],Reversed).
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
HelloPain.java
public class HelloWorld {
public static void main(String[] args) {
JFrame frame = new JFrame("Hello, Verbosity!");
JLabel lblText = new JLabel("Hello World!", SwingConstants.CENTER);
frame.setMinimumSize(new Dimension(800, 400));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(lblText);
frame.pack();
frame.setVisible(true);
}
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
HelloPain.java
public class HelloWorld {
public static void main(String[] args) {
JFrame frame = new JFrame("Hello, Verbosity!");
JLabel lblText = new JLabel("Hello World!", SwingConstants.CENTER);
frame.setMinimumSize(new Dimension(800, 400))
.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
.getContentPane().add(lblText);
frame.pack()
.setVisible(true);
}
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
HelloPain.java
I called this SwingChains
It actually worked
It actually was stupid
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Try/Catch
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Before try/catch
sub do_it {
my ($args) = @_;
my $result;
eval { $result = might_die($args) };
if ($@) { ... }; # wrong
return $result;
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Before try/catch
sub do_it {
my ($args) = @_;
my $result;
eval { $result = might_die($args); 1 } or do { ... };
return $result;
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
try/catch
use Try::Tiny;
sub do_it($args) {
my $result;
try { $result = might_die($args) }
catch { ... }; <--- ARGH!
return $result;
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
We replaced …
sub do_it {
my ($args) = @_;
my $result;
eval { $result = might_die($args); 1 } or do { ... };
return $result;
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Try::Tiny versus …
package Try::Tiny; use 5.006; our $VERSION = '0.31'; use strict; use warnings; use Exporter 5.57 'import'; our @EXPORT =
our @EXPORT_OK = qw(try catch finally); use Carp; $Carp::Internal{+__PACKAGE__}++; BEGIN { my $su = $INC{'Sub/Util.pm'}
&& defined &Sub::Util::set_subname; my $sn = $INC{'Sub/Name.pm'} && eval { Sub::Name->VERSION(0.08) }; unless ($su ||
$sn) { $su = eval { require Sub::Util; } && defined &Sub::Util::set_subname; unless ($su) { $sn = eval { require
Sub::Name; Sub::Name->VERSION(0.08) }; } } *_subname = $su ? &Sub::Util::set_subname : $sn ? &Sub::Name::subname : sub
{ $_[1] }; *_HAS_SUBNAME = ($su || $sn) ? sub(){1} : sub(){0}; } my %_finally_guards; sub try (&;@) { my ( $try,
@code_refs ) = @_; my $wantarray = wantarray; my ( $catch, @finally ) = (); foreach my $code_ref (@code_refs) { if (
ref($code_ref) eq 'Try::Tiny::Catch' ) { croak 'A try() may not be followed by multiple catch() blocks' if $catch;
$catch = ${$code_ref}; } elsif ( ref($code_ref) eq 'Try::Tiny::Finally' ) { push @finally, ${$code_ref}; } else { croak(
'try() encountered an unexpected argument (' . ( defined $code_ref ? $code_ref : 'undef' ) . ') - perhaps a missing
semi-colon before or'); } } _subname(caller().'::try {...} ' => $try) if _HAS_SUBNAME; local $_finally_guards{guards} =
[ map Try::Tiny::ScopeGuard->_new($_), @finally ]; my $prev_error = $@; my ( @ret, $error ); my $failed = not eval { $@
= $prev_error; if ( $wantarray ) { @ret = $try->(); } elsif ( defined $wantarray ) { $ret[0] = $try->(); } else {
$try->(); }; return 1; }; $error = $@; $@ = $prev_error; if ( $failed ) { push @$_, $error for
@{$_finally_guards{guards}}; if ( $catch ) { for ($error) { return $catch->($error); } } return; } else { return
$wantarray ? @ret : $ret[0]; } } sub catch (&;@) { my ( $block, @rest ) = @_; croak 'Useless bare catch()' unless
wantarray; _subname(caller().'::catch {...} ' => $block) if _HAS_SUBNAME; return ( bless($block, 'Try::Tiny::Catch'),
@rest,); } sub finally (&;@) { my ( $block, @rest ) = @_; croak 'Useless bare finally()' unless wantarray;
_subname(caller().'::finally {...} ' => $block) if _HAS_SUBNAME; return ( bless($block, 'Try::Tiny::Finally'), @rest,);
} { package Try::Tiny::ScopeGuard; use constant UNSTABLE_DOLLARAT => ("$]" < '5.013002') ? 1 : 0; sub _new { shift;
bless [ @_ ]; } sub DESTROY { my ($code, @args) = @{ $_[0] }; local $@ if UNSTABLE_DOLLARAT; eval { $code->(@args); 1; }
or do { warn "Execution of finally() block $code resulted in an exception, which " . '*CAN NOT BE PROPAGATED* due to
fundamental limitations of Perl. ' . 'Your program will continue as if this event never took place. ' . "Original
exception text follows:nn" . (defined $@ ? $@ : '$@ left undefined...') . "n" ; } } }
eval { ... }
or do { ... };
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Try::Tiny issues
Can’t return from inside the code blocks
Clumsy to step into the code blocks
Forgetting the trailing semicolon
Error line number often misleading
Slow!
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Try::Tiny issues
Can’t return from inside the code blocks
Clumsy to step into the code blocks
Forgetting the trailing semicolon
Error line number often misleading
Slow!
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
IT WAS EASIER
TO GET THE
CORRECT
BEHAVIOR
try/catch
use Try::Tiny;
sub do_it($args) {
my $result;
try { $result = might_die($args) }
catch { ... };
return $result;
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
try/catch
use Feature::Compat::Try; # v5.14.0 and above
sub do_it($args) {
my $result;
try { $result = might_die($args) }
catch ($error) { ... }
return $result;
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
try/catch
use Feature::Compat::Try; # v5.14.0 and above
sub do_it($args) {
my $result;
try { $result = might_die($args) }
catch ($error) { ... }
return $result;
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
try/catch
sub do_it($args) {
try { return might_die($args) }
catch ($error) { ... }
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
try/catch
sub do_it($args) {
try { return might_die($args) }
catch ($error) { ... }
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Go With The Flow
•Not about verbosity
•It’s about correctness
•Using a language/tool’s strengths
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Corinna Status 2023
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Corinna
Bringing modern OOP to Perl
Largest change to the language in three decades
Being implemented in the core now
leonerd++
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Corinna Team/Influencers
(Incomplete list by first name)
Curtis “Ovid” Poe
Damian Conway
Dan Book
Graham Knop
Harald Jörg
Matt Trout
Paul Evans
Sawyer X
Stevan Little
13 août 2023 COPYRIGHT 2022, HTTP://WWW.ALLAROUNDTHEWORLD.FR/
Corinna Today
class Cache::LRU {
use Hash::Ordered;
field $cache = Hash::Ordered->new;
field $max_size :param = 20;
method exists ($key) {
return $cache->exists($value);
}
method set ( $key, $value ) {
$cache->unshift( $key, $value );
if ( $cache->keys >= $max_size ) {
$cache->pop;
}
}
method get($key) {
return unless $cache->exists($key);
my $value = $cache->get($key);
$self->set( $key, $value );
return $value;
}
}
Sanity-checking removed to reduce
code size.
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Instead of …
1. bless
2. @ISA
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Simplicity
1. class
2. role
3. method
4. field
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
KIM Syntax
KEYWORD, IDENTIFIER, MODIFIER
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
KIM Grammar
KEYWORD IDENTIFIER MODIFIERS? SETUP?
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
KIM Grammar
KEYWORD IDENTIFIER MODIFIERS? SETUP?
class Cache::LRU {
use Hash::Ordered;
field $cache = Hash::Ordered->new;
field $max_size :param = 20;
…
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
KIM Grammar
KEYWORD IDENTIFIER MODIFIERS? SETUP?
class Cache::LRU {
use Hash::Ordered;
field $cache = Hash::Ordered->new;
field $max_size :param = 20;
…
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
KIM Grammar
KEYWORD IDENTIFIER MODIFIERS? SETUP?
class Cache::LRU {
use Hash::Ordered;
field $cache = Hash::Ordered->new;
field $max_size :param = 20;
…
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
KIM Grammar
KEYWORD IDENTIFIER MODIFIERS? SETUP?
class Cache::LRU {
use Hash::Ordered;
field $cache = Hash::Ordered->new;
field $max_size :param = 20;
…
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
The Seven
Stages
Perl v5.38.0
July 3rd, 2023
1.Classes (done)
2.Inheritance (done)
3.Roles
4.Convenience attributes*
5.Field initializer blocks (done)
6.MOP
7.Method modifiers
https://github.com/Ovid/Cor/blob/master/rfc/mvp.md
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
The Seven
Stages
Perl v5.38.0
July 3rd, 2023
We’re going to learn new idioms
We don’t (yet) know what they are
It’s going to be challenging
https://github.com/Ovid/Cor/blob/master/rfc/mvp.md
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Rogue!
In Perl …
https://github.com/perigrin/perl-games-
rot
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Chris Prather—Rogue
Setup — https://chris.prather.org/perl-roguelike-part-0.html
Movement — https://chris.prather.org/perl-roguelike-part-1.html
Entities and Obstacles — https://chris.prather.org/perl-roguelike-part-2.html
Generative Dungeon — https://chris.prather.org/perl-roguelike-part-3.html
Field of View — https://chris.prather.org/perl-roguelike-part-4.html
Enemies — https://chris.prather.org/perl-roguelike-part-5.html
Combat — https://chris.prather.org/perl-roguelike-part-6.html
And more!
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Nice, clean code
class MeleeAttackAction :isa(Action) {
use Games::Dice qw(roll);
field $defender :param;
method perform() {
my $attacker = $self->entity;
my $attack_roll = roll('1d20') + $attacker->stats->attack;
my $defense_roll = roll('1d20') + $defender->stats->armor;
if ( $attack_roll > $defense_roll ) {
$defender->stats->change_hp($defense_roll - $attack_roll);
}
return;
}
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Stevan Little-Actor
Event Loop Orchestra — https://github.com/stevan/ELO
Porting to Corinna — https://github.com/stevan/Stella
All in One Gist —
https://gist.github.com/stevan/06a091d8ce775181e8c023864
beba173
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Nice, clean code
class PingPong :isa(Stella::Actor) {
use Stella::Util::Debug; # import LOG_LEVEL, INFO, WARN, etc.
field $name :param; # so I can identify myself in the logs
field $max :param; # the max number of ping/pong(s) to allow
# counters for ping/pong(s)
field $pings = 0;
field $pongs = 0;
field $logger;
ADJUST {
# create a logger if logging is enabled
$logger = Stella::Util::Debug->logger if LOG_LEVEL;
}
method Ping ($ctx, $message) {
if ($pings < $max) {
...
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Nice, clean code
sub init ($ctx) {
# spawn 10 sets of Ping/Pong actors
foreach my $i ( 1 .. 10 ) {
# give them a random max-pings
my $max = int(rand(10));
my $Ping = $ctx->spawn( PingPong->new( name => "Ping($i)", max => $max ) );
my $Pong = $ctx->spawn( PingPong->new( name => "Pong($i)", max => $max ) );
# start up this pair ...
$Ping->send( $Pong, Stella::Event->new( symbol => *PingPong::Pong ) );
}
}
Stella::ActorSystem->new( init => &init )->loop;
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Principle of Parsimony
We made mistakes
We don’t know what they are
We had to be conservative
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Dr. Michel Koenig
michelkoenig06@gmail.com
Mathematician
Computer Scientist
Security and Privacy
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Your Data is Not Yours
GDPR
PII
PCI-Compliance
“Right to be forgotten”
Numerous US state-level laws
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Costs
Development—How much does it cost to remove your data?
Personnel—How many more people do you need to manage
that data?
Reputation—If you get it wrong, people get mad
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Threats
Compliance Costs
GDPR bankruptcy
PCI Violations
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
What if you could
“loan” your data?
MADNESS!
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Start Lies
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Lattice-based
Cryptography
Developed in1996 by Miklós Ajtai
Cannot be decrypted quantum computers
2006, Craig Gentry, homomorphic encryption
This is not how he did it
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
End Lies
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Perl?
The actual idea is simple
Could do it in Perl
Cannot afford to get wrong
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Perl? No.
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Perl? Not yet.
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Why not Perl?
<secret>
Performance
Data integrity
Trust
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
His Prototype Works
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Perl 5
OBJECTS
REFERENCES
LEXICALS
MODULES
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Perl 7 CORINNA?
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Perl 8 WHAT’S NEXT?
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
What do we want?
Concurrency
Multisubs/methods
Metaprogramming
Applications
Core Exceptions
Core Stack Traces
Graphics/GUIs
Data Types
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
What do we want?
Concurrency
Multisubs/methods
Metaprogramming
Applications***
Exceptions
Core Stack Traces
Graphics/GUIs
Data Types ← ← ← ← ← ← ←
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
perldoc –f my
my VARLIST
my TYPE VARLIST
my VARLIST : ATTRS
my TYPE VARLIST : ATTRS
A "my" declares the listed variables to be
local (lexically) to the enclosing block,
file, or "eval". If more than one variable
is listed, the list must be placed in …
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Let’s Play
“Make
Believe”
… AND SEE WHAT
THAT GETS US.
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Yes, please!
my INT @array = (4,5,6);
$array[1] = "foo"; # BOOM!
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Cache::LRU
class Cache::LRU { # this example is NAÏVE!
use Hash::Ordered;
field $cache = Hash::Ordered->new;
field $max_size :param :reader = 20;
method set( $key, $value ) {
$cache->unshift( $key, $value );
if ( $cache->keys > $max_size ) {
$cache->pop;
}
}
method get($key) {
return unless $cache->exists($key);
my $value = $cache->get($key);
$self->set( $key, $value );
return $value;
}
}
No data control
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Cache::LRU
package Cache::LRU;
use Hash::Ordered;
sub new ( $class, $max_size ) {
bless {
cache => Hash::Ordered->new,
max_size => $max_size,
} => $class;
}
sub _cache ($self) { $self->{cache} }
sub max_size ($self) { $self->{max_size} }
sub set ( $self, $key, $value ) {
$self->_cache->unshift( $key, $value );
if ( $self->_cache->keys > $self->max_size ) {
$self->_cache->pop;
}
}
sub get ( $self, $key ) {
return unless $self->_cache->exists($key);
my $value = $self->_cache->get($key);
$self->set( $key, $value );
return $value;
}
No data control
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Oops
What if we pass a reference for $max_size? if ($num_keys > $max_size) {...}
$cache->set( %value, $key ) silently succeeds.
$cache->get( %value ) fails for the wrong reasons
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Boundaries
Fixed by checking your data.
You would never write code like that.
What about the people who use your code?
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Cache::LRU
package Cache::LRU;
use Hash::Ordered;
sub new ( $class, $max_size ) {
bless {
cache => Hash::Ordered->new,
max_size => $max_size,
} => $class;
}
sub _cache ($self) { $self->{cache} }
sub max_size ($self) { $self->{max_size} }
sub set ( $self, $key, $value ) {
$self->_cache->unshift( $key, $value );
if ( $self->_cache->keys > $self->max_size ) {
$self->_cache->pop;
}
}
sub get ( $self, $key ) {
return unless $self->_cache->exists($key);
my $value = $self->_cache->get($key);
$self->set( $key, $value );
return $value;
}
No data control
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Let’s Dream
package Cache::LRU;
sub new (CLASS[Cache::LRU] $class, UINT $max_size) {
...
}
sub _cache ($self) { ... }
sub max_size (OBJ[Cache::LRU] $self) UINT { ... }
sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value)
OBJ[Cache::LRU] | VOID
{
...
}
sub get(OBJ[Cache::LRU] $self, STR $key) !VOID {
...
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Let’s Dream
package Cache::LRU;
sub new (CLASS[Cache::LRU] $class, UINT $max_size) {
...
}
sub _cache ($self) { ... }
sub max_size (OBJ[Cache::LRU] $self) UINT { ... }
sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value)
OBJ[Cache::LRU] | VOID
{
...
}
sub get(OBJ[Cache::LRU] $self, STR $key) !VOID {
...
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Let’s Dream
package Cache::LRU;
sub new (CLASS[Cache::LRU] $class, PosInt $max_size) {
...
}
sub _cache ($self) { ... }
sub max_size (OBJ[Cache::LRU] $self) UINT { ... }
sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value)
OBJ[Cache::LRU] | VOID
{
...
}
sub get(OBJ[Cache::LRU] $self, STR $key) !VOID {
...
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Let’s Dream
package Cache::LRU;
sub new (CLASS[Cache::LRU] $class, UINT $max_size) {
...
}
sub _cache ($self) { ... }
sub max_size (OBJ[Cache::LRU] $self) UINT { ... }
sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value)
OBJ[Cache::LRU] | VOID
{
...
}
sub get(OBJ[Cache::LRU] $self, SRE $key) !VOID {
...
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Let’s Dream
package Cache::LRU;
sub new (CLASS[Cache::LRU] $class, PosInt $max_size) {
...
}
sub _cache ($self) { ... }
sub max_size (OBJ[Cache::LRU] $self) PosInt { ... }
sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value)
OBJ[Cache::LRU]|void
{
...
}
sub get(OBJ[Cache::LRU] $self, STR $key) !VOID {
...
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Let’s Dream
package Cache::LRU;
sub new (CLASS[Cache::LRU] $class, UINT $max_size) {
...
}
sub _cache ($self) { ... }
sub max_size (OBJ[Cache::LRU] $self) UINT { ... }
sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value)
OBJ[Cache::LRU] | VOID
{
...
}
sub get(OBJ[Cache::LRU] $self, STR $key) !VOID {
...
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Let’s Dream
package Cache::LRU;
sub new ($class, UINT $max_size ) {
...
}
sub _cache ($self) { ... }
sub max_size ($self) { ... }
sub set ($self, STR $key, DEF $value){
...
}
sub get($self, STR $key) !VOID {
...
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Let’s Dream
class Cache::LRU;
field $cache = HashOrdered->new;
field UINT $max_size :param = 20;
method set (STR $key, DEF $value){
...
}
method get(STR $key) !VOID {
...
}
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Project Oshun WTF?
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Oshun
Orisha (deity) of the Nigerian Yoruba
River deity. Fertility goddes:!s.
Depicted as protector, savior, or nurturer
https://www.britannica.com/topic/Oshun
Image CC by 3.0. Sailko, Candomblé nel Museu Afro-Brasileiro, Salvador
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Oshun Will Protect Your Data
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Ceçi n’est pas un type
“Computer scientists have discussions about type systems.
Computer programmers have screaming matches.”
–Ovid, 9 CE (±~2K years)
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Rama, Cc-by-sa-2.0-fr
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Rama, Cc-by-sa-2.0-fr
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Oshun History
First pass was a December 23, 2022 gist
Followed by an email to Damian
“I am not competant to design a type system.” (Ovid)
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
PPC Process
Send pre-PPC email to P5P list
Summarize the problem
Present your solution
Get it summarily rejected with a “this should be a CPAN module
first.”
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
PPC Process
Send pre-PPC email to P5P list
Summarize the problem
Present your solution
Get it summarily rejected with a “this should be a CPAN module
first.”
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Oshun History
Damian’s first design arrived January 9, 2023
Months of discussion tweaking the design
Damian wrote Data::Checks
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Data::Checks use Data::Checks;
sub total :returns(INT) ($times :of(UINT)) {
my $total :of(INT) = 0;
foreach my $i (1..$times) {
$total += get_result($i);
}
return $total;
}
Not on the CPAN!
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Data::Checks
https://github.com/Ovid/oshun
Almost 200,000 tests
24 built-in types checks
User-defined checks specced but not implemented
Coercions specced but not implemented
Not on the CPAN!
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Oshun Team
Branislav Zahradník (happy-barney)
Chris Prather (perigrin)
Curtis Poe (Ovid)
Dr. Damian Conway (thoughtstream)
Elvin Aslanov (rwp0)
Peter Mottram (syspete)
Dr. Ruud van Tol (druud)
Toby Inkster (tobyink)
Veesh Goldman (rabbiveesh)
Yves Orton (demerphq)
13 août 2023 COPYRIGHT 2022, HTTP://WWW.ALLAROUNDTHEWORLD.FR/
Why do we need this?
Safer code
Keep Perl 5.0’s Promise
Self-documenting
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Summary
Corinna is partially implemented in Perl core
We’re going to have to relearn how we do OO
We might get data checks in the future
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
Questions?
COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.

More Related Content

Similar to Coming Soon - All Around the World

Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Jeff Carouth
 
Great Developers Steal
Great Developers StealGreat Developers Steal
Great Developers StealBen Scofield
 
PHP 5.3 And PHP 6 A Look Ahead
PHP 5.3 And PHP 6 A Look AheadPHP 5.3 And PHP 6 A Look Ahead
PHP 5.3 And PHP 6 A Look Aheadthinkphp
 
What's New in PHP 5.5
What's New in PHP 5.5What's New in PHP 5.5
What's New in PHP 5.5Corey Ballou
 
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Masahiro Nagano
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr PasichPiotr Pasich
 
Implicit parameters, when to use them (or not)!
Implicit parameters, when to use them (or not)!Implicit parameters, when to use them (or not)!
Implicit parameters, when to use them (or not)!Julien Truffaut
 
Network security Lab manual
Network security Lab manual Network security Lab manual
Network security Lab manual Vivek Kumar Sinha
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Stephan Schmidt
 
Bologna Developer Zone - About Kotlin
Bologna Developer Zone - About KotlinBologna Developer Zone - About Kotlin
Bologna Developer Zone - About KotlinMarco Vasapollo
 
Ioc container | Hannes Van De Vreken | CODEiD
Ioc container | Hannes Van De Vreken | CODEiDIoc container | Hannes Van De Vreken | CODEiD
Ioc container | Hannes Van De Vreken | CODEiDCODEiD PHP Community
 
Realm: Building a mobile database
Realm: Building a mobile databaseRealm: Building a mobile database
Realm: Building a mobile databaseChristian Melchior
 
Practical pig
Practical pigPractical pig
Practical pigtrihug
 

Similar to Coming Soon - All Around the World (20)

Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4
 
Fantom and Tales
Fantom and TalesFantom and Tales
Fantom and Tales
 
Great Developers Steal
Great Developers StealGreat Developers Steal
Great Developers Steal
 
PHP 5.3 And PHP 6 A Look Ahead
PHP 5.3 And PHP 6 A Look AheadPHP 5.3 And PHP 6 A Look Ahead
PHP 5.3 And PHP 6 A Look Ahead
 
ES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript SkillsES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript Skills
 
What's New in PHP 5.5
What's New in PHP 5.5What's New in PHP 5.5
What's New in PHP 5.5
 
Rust ⇋ JavaScript
Rust ⇋ JavaScriptRust ⇋ JavaScript
Rust ⇋ JavaScript
 
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
 
Perl Dancer, FPW 2010
Perl Dancer, FPW 2010Perl Dancer, FPW 2010
Perl Dancer, FPW 2010
 
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr Pasich
 
Implicit parameters, when to use them (or not)!
Implicit parameters, when to use them (or not)!Implicit parameters, when to use them (or not)!
Implicit parameters, when to use them (or not)!
 
Network security Lab manual
Network security Lab manual Network security Lab manual
Network security Lab manual
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
 
Bologna Developer Zone - About Kotlin
Bologna Developer Zone - About KotlinBologna Developer Zone - About Kotlin
Bologna Developer Zone - About Kotlin
 
PHP Tips & Tricks
PHP Tips & TricksPHP Tips & Tricks
PHP Tips & Tricks
 
Ioc container | Hannes Van De Vreken | CODEiD
Ioc container | Hannes Van De Vreken | CODEiDIoc container | Hannes Van De Vreken | CODEiD
Ioc container | Hannes Van De Vreken | CODEiD
 
Realm: Building a mobile database
Realm: Building a mobile databaseRealm: Building a mobile database
Realm: Building a mobile database
 
Practical pig
Practical pigPractical pig
Practical pig
 

More from Curtis Poe

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
life-off-earth.pptx
life-off-earth.pptxlife-off-earth.pptx
life-off-earth.pptxCurtis Poe
 
Corinna Status 2022.pptx
Corinna Status 2022.pptxCorinna Status 2022.pptx
Corinna Status 2022.pptxCurtis Poe
 
Rummaging in the clOOset
Rummaging in the clOOsetRummaging in the clOOset
Rummaging in the clOOsetCurtis Poe
 
Rescuing a-legacy-codebase
Rescuing a-legacy-codebaseRescuing a-legacy-codebase
Rescuing a-legacy-codebaseCurtis Poe
 
Perl 6 For Mere Mortals
Perl 6 For Mere MortalsPerl 6 For Mere Mortals
Perl 6 For Mere MortalsCurtis Poe
 
Disappearing Managers, YAPC::EU 2014, Bulgaria, Keynote
Disappearing Managers, YAPC::EU 2014, Bulgaria, KeynoteDisappearing Managers, YAPC::EU 2014, Bulgaria, Keynote
Disappearing Managers, YAPC::EU 2014, Bulgaria, KeynoteCurtis Poe
 
How to Fake a Database Design
How to Fake a Database DesignHow to Fake a Database Design
How to Fake a Database DesignCurtis Poe
 
Are Managers An Endangered Species?
Are Managers An Endangered Species?Are Managers An Endangered Species?
Are Managers An Endangered Species?Curtis Poe
 
The Lies We Tell About Software Testing
The Lies We Tell About Software TestingThe Lies We Tell About Software Testing
The Lies We Tell About Software TestingCurtis Poe
 
A/B Testing - What your mother didn't tell you
A/B Testing - What your mother didn't tell youA/B Testing - What your mother didn't tell you
A/B Testing - What your mother didn't tell youCurtis Poe
 
Test::Class::Moose
Test::Class::MooseTest::Class::Moose
Test::Class::MooseCurtis Poe
 
A Whirlwind Tour of Test::Class
A Whirlwind Tour of Test::ClassA Whirlwind Tour of Test::Class
A Whirlwind Tour of Test::ClassCurtis Poe
 
Agile Companies Go P.O.P.
Agile Companies Go P.O.P.Agile Companies Go P.O.P.
Agile Companies Go P.O.P.Curtis Poe
 
Testing With Test::Class
Testing With Test::ClassTesting With Test::Class
Testing With Test::ClassCurtis Poe
 
Logic Progamming in Perl
Logic Progamming in PerlLogic Progamming in Perl
Logic Progamming in PerlCurtis Poe
 
Inheritance Versus Roles - The In-Depth Version
Inheritance Versus Roles - The In-Depth VersionInheritance Versus Roles - The In-Depth Version
Inheritance Versus Roles - The In-Depth VersionCurtis Poe
 
Inheritance Versus Roles
Inheritance Versus RolesInheritance Versus Roles
Inheritance Versus RolesCurtis Poe
 
Turbo Charged Test Suites
Turbo Charged Test SuitesTurbo Charged Test Suites
Turbo Charged Test SuitesCurtis Poe
 

More from Curtis Poe (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
life-off-earth.pptx
life-off-earth.pptxlife-off-earth.pptx
life-off-earth.pptx
 
Corinna Status 2022.pptx
Corinna Status 2022.pptxCorinna Status 2022.pptx
Corinna Status 2022.pptx
 
Rummaging in the clOOset
Rummaging in the clOOsetRummaging in the clOOset
Rummaging in the clOOset
 
Rescuing a-legacy-codebase
Rescuing a-legacy-codebaseRescuing a-legacy-codebase
Rescuing a-legacy-codebase
 
Perl 6 For Mere Mortals
Perl 6 For Mere MortalsPerl 6 For Mere Mortals
Perl 6 For Mere Mortals
 
Disappearing Managers, YAPC::EU 2014, Bulgaria, Keynote
Disappearing Managers, YAPC::EU 2014, Bulgaria, KeynoteDisappearing Managers, YAPC::EU 2014, Bulgaria, Keynote
Disappearing Managers, YAPC::EU 2014, Bulgaria, Keynote
 
How to Fake a Database Design
How to Fake a Database DesignHow to Fake a Database Design
How to Fake a Database Design
 
Are Managers An Endangered Species?
Are Managers An Endangered Species?Are Managers An Endangered Species?
Are Managers An Endangered Species?
 
The Lies We Tell About Software Testing
The Lies We Tell About Software TestingThe Lies We Tell About Software Testing
The Lies We Tell About Software Testing
 
A/B Testing - What your mother didn't tell you
A/B Testing - What your mother didn't tell youA/B Testing - What your mother didn't tell you
A/B Testing - What your mother didn't tell you
 
Test::Class::Moose
Test::Class::MooseTest::Class::Moose
Test::Class::Moose
 
A Whirlwind Tour of Test::Class
A Whirlwind Tour of Test::ClassA Whirlwind Tour of Test::Class
A Whirlwind Tour of Test::Class
 
Agile Companies Go P.O.P.
Agile Companies Go P.O.P.Agile Companies Go P.O.P.
Agile Companies Go P.O.P.
 
Econ101
Econ101Econ101
Econ101
 
Testing With Test::Class
Testing With Test::ClassTesting With Test::Class
Testing With Test::Class
 
Logic Progamming in Perl
Logic Progamming in PerlLogic Progamming in Perl
Logic Progamming in Perl
 
Inheritance Versus Roles - The In-Depth Version
Inheritance Versus Roles - The In-Depth VersionInheritance Versus Roles - The In-Depth Version
Inheritance Versus Roles - The In-Depth Version
 
Inheritance Versus Roles
Inheritance Versus RolesInheritance Versus Roles
Inheritance Versus Roles
 
Turbo Charged Test Suites
Turbo Charged Test SuitesTurbo Charged Test Suites
Turbo Charged Test Suites
 

Recently uploaded

SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 

Recently uploaded (20)

SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 

Coming Soon - All Around the World

  • 1. Coming Soon … COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 2. All Around the World Curtis “Ovid” Poe https://allaroundtheworld.fr/ https://fosstodon.org/@ovid https://bsky.app/profile/ovid.bsky.social https://twitter.com/OvidPerl ovid@allroundtheworld.fr curtis.poe@gmail.com COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 3. Thank you! COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 4. Question Policy COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 5. Corinna is Coming FULL-FEATURED NATIVE OOP IN PERL! COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 6. But first, a detour … TINY MISTAKES COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 7. The Journey’s Start BASIC 6809 Assembler C COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 8. Perl’s Lambda my @fs = map { my $i = $_; sub ($arg) { $i + $arg } } 0 .. 9; say $fs[3](4); # 7 COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 9. Python’s Lambda fs = [(lambda n: i + n) for i in range(10)] print(fs[3](4)) COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 10. Python’s Lambda fs = [(lambda n: i + n) for i in range(10)] print(fs[3](4)) # 13 https://math.andrej.com/2009/04/09/pythons-lambda-is-broken/ COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 11. Python’s Lambda fs = [(lambda n, i=i: i + n) for i in range(10)] print(fs[3](4)) # 7 https://math.andrej.com/2009/04/09/pythons-lambda-is-broken/ COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 12. Perl’s Lambda my @fs = map { sub ($arg) { $arg + $_ } } 0 .. 9; say $fs[3](4); # Use of uninitialized value $_ in addition (+) at … # 4 COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 13. Reversing a List in Prolog reverse([],[]). reverse([Head|Tail],Reversed) :- reverse(Tail,ReversedTail), append(ReversedTail,[Head],Reversed). COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 14. Reversing a List in Prolog—O(n2) reverse([],[]). reverse([Head|Tail],Reversed) :- reverse(Tail,ReversedTail), append(ReversedTail,[Head],Reversed). COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 15. Reversing a List in Prolog—O(n) accRev([],Accumulator,Accumulator). accRev([Head|Tail],Accumulator,Reversed):- accRev(Tail,[Head|Accumulator],Reversed). reverse(List,Reversed) :- accRev(List,[],Reversed). COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 16. HelloPain.java public class HelloWorld { public static void main(String[] args) { JFrame frame = new JFrame("Hello, Verbosity!"); JLabel lblText = new JLabel("Hello World!", SwingConstants.CENTER); frame.setMinimumSize(new Dimension(800, 400)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(lblText); frame.pack(); frame.setVisible(true); } } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 17. HelloPain.java public class HelloWorld { public static void main(String[] args) { JFrame frame = new JFrame("Hello, Verbosity!"); JLabel lblText = new JLabel("Hello World!", SwingConstants.CENTER); frame.setMinimumSize(new Dimension(800, 400)) .setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) .getContentPane().add(lblText); frame.pack() .setVisible(true); } } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 18. HelloPain.java I called this SwingChains It actually worked It actually was stupid COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 19. Try/Catch COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 20. Before try/catch sub do_it { my ($args) = @_; my $result; eval { $result = might_die($args) }; if ($@) { ... }; # wrong return $result; } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 21. Before try/catch sub do_it { my ($args) = @_; my $result; eval { $result = might_die($args); 1 } or do { ... }; return $result; } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 22. try/catch use Try::Tiny; sub do_it($args) { my $result; try { $result = might_die($args) } catch { ... }; <--- ARGH! return $result; } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 23. We replaced … sub do_it { my ($args) = @_; my $result; eval { $result = might_die($args); 1 } or do { ... }; return $result; } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 24. Try::Tiny versus … package Try::Tiny; use 5.006; our $VERSION = '0.31'; use strict; use warnings; use Exporter 5.57 'import'; our @EXPORT = our @EXPORT_OK = qw(try catch finally); use Carp; $Carp::Internal{+__PACKAGE__}++; BEGIN { my $su = $INC{'Sub/Util.pm'} && defined &Sub::Util::set_subname; my $sn = $INC{'Sub/Name.pm'} && eval { Sub::Name->VERSION(0.08) }; unless ($su || $sn) { $su = eval { require Sub::Util; } && defined &Sub::Util::set_subname; unless ($su) { $sn = eval { require Sub::Name; Sub::Name->VERSION(0.08) }; } } *_subname = $su ? &Sub::Util::set_subname : $sn ? &Sub::Name::subname : sub { $_[1] }; *_HAS_SUBNAME = ($su || $sn) ? sub(){1} : sub(){0}; } my %_finally_guards; sub try (&;@) { my ( $try, @code_refs ) = @_; my $wantarray = wantarray; my ( $catch, @finally ) = (); foreach my $code_ref (@code_refs) { if ( ref($code_ref) eq 'Try::Tiny::Catch' ) { croak 'A try() may not be followed by multiple catch() blocks' if $catch; $catch = ${$code_ref}; } elsif ( ref($code_ref) eq 'Try::Tiny::Finally' ) { push @finally, ${$code_ref}; } else { croak( 'try() encountered an unexpected argument (' . ( defined $code_ref ? $code_ref : 'undef' ) . ') - perhaps a missing semi-colon before or'); } } _subname(caller().'::try {...} ' => $try) if _HAS_SUBNAME; local $_finally_guards{guards} = [ map Try::Tiny::ScopeGuard->_new($_), @finally ]; my $prev_error = $@; my ( @ret, $error ); my $failed = not eval { $@ = $prev_error; if ( $wantarray ) { @ret = $try->(); } elsif ( defined $wantarray ) { $ret[0] = $try->(); } else { $try->(); }; return 1; }; $error = $@; $@ = $prev_error; if ( $failed ) { push @$_, $error for @{$_finally_guards{guards}}; if ( $catch ) { for ($error) { return $catch->($error); } } return; } else { return $wantarray ? @ret : $ret[0]; } } sub catch (&;@) { my ( $block, @rest ) = @_; croak 'Useless bare catch()' unless wantarray; _subname(caller().'::catch {...} ' => $block) if _HAS_SUBNAME; return ( bless($block, 'Try::Tiny::Catch'), @rest,); } sub finally (&;@) { my ( $block, @rest ) = @_; croak 'Useless bare finally()' unless wantarray; _subname(caller().'::finally {...} ' => $block) if _HAS_SUBNAME; return ( bless($block, 'Try::Tiny::Finally'), @rest,); } { package Try::Tiny::ScopeGuard; use constant UNSTABLE_DOLLARAT => ("$]" < '5.013002') ? 1 : 0; sub _new { shift; bless [ @_ ]; } sub DESTROY { my ($code, @args) = @{ $_[0] }; local $@ if UNSTABLE_DOLLARAT; eval { $code->(@args); 1; } or do { warn "Execution of finally() block $code resulted in an exception, which " . '*CAN NOT BE PROPAGATED* due to fundamental limitations of Perl. ' . 'Your program will continue as if this event never took place. ' . "Original exception text follows:nn" . (defined $@ ? $@ : '$@ left undefined...') . "n" ; } } } eval { ... } or do { ... }; COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 25. Try::Tiny issues Can’t return from inside the code blocks Clumsy to step into the code blocks Forgetting the trailing semicolon Error line number often misleading Slow! COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 26. Try::Tiny issues Can’t return from inside the code blocks Clumsy to step into the code blocks Forgetting the trailing semicolon Error line number often misleading Slow! COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD. IT WAS EASIER TO GET THE CORRECT BEHAVIOR
  • 27. try/catch use Try::Tiny; sub do_it($args) { my $result; try { $result = might_die($args) } catch { ... }; return $result; } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 28. try/catch use Feature::Compat::Try; # v5.14.0 and above sub do_it($args) { my $result; try { $result = might_die($args) } catch ($error) { ... } return $result; } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 29. try/catch use Feature::Compat::Try; # v5.14.0 and above sub do_it($args) { my $result; try { $result = might_die($args) } catch ($error) { ... } return $result; } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 30. try/catch sub do_it($args) { try { return might_die($args) } catch ($error) { ... } } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 31. try/catch sub do_it($args) { try { return might_die($args) } catch ($error) { ... } } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 32. Go With The Flow •Not about verbosity •It’s about correctness •Using a language/tool’s strengths COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 33. Corinna Status 2023 COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 34. Corinna Bringing modern OOP to Perl Largest change to the language in three decades Being implemented in the core now leonerd++ COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 35. Corinna Team/Influencers (Incomplete list by first name) Curtis “Ovid” Poe Damian Conway Dan Book Graham Knop Harald Jörg Matt Trout Paul Evans Sawyer X Stevan Little 13 août 2023 COPYRIGHT 2022, HTTP://WWW.ALLAROUNDTHEWORLD.FR/
  • 36. Corinna Today class Cache::LRU { use Hash::Ordered; field $cache = Hash::Ordered->new; field $max_size :param = 20; method exists ($key) { return $cache->exists($value); } method set ( $key, $value ) { $cache->unshift( $key, $value ); if ( $cache->keys >= $max_size ) { $cache->pop; } } method get($key) { return unless $cache->exists($key); my $value = $cache->get($key); $self->set( $key, $value ); return $value; } } Sanity-checking removed to reduce code size. COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 37. Instead of … 1. bless 2. @ISA COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 38. Simplicity 1. class 2. role 3. method 4. field COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 39. KIM Syntax KEYWORD, IDENTIFIER, MODIFIER COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 40. KIM Grammar KEYWORD IDENTIFIER MODIFIERS? SETUP? COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 41. KIM Grammar KEYWORD IDENTIFIER MODIFIERS? SETUP? class Cache::LRU { use Hash::Ordered; field $cache = Hash::Ordered->new; field $max_size :param = 20; … COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 42. KIM Grammar KEYWORD IDENTIFIER MODIFIERS? SETUP? class Cache::LRU { use Hash::Ordered; field $cache = Hash::Ordered->new; field $max_size :param = 20; … COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 43. KIM Grammar KEYWORD IDENTIFIER MODIFIERS? SETUP? class Cache::LRU { use Hash::Ordered; field $cache = Hash::Ordered->new; field $max_size :param = 20; … COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 44. KIM Grammar KEYWORD IDENTIFIER MODIFIERS? SETUP? class Cache::LRU { use Hash::Ordered; field $cache = Hash::Ordered->new; field $max_size :param = 20; … COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 45. The Seven Stages Perl v5.38.0 July 3rd, 2023 1.Classes (done) 2.Inheritance (done) 3.Roles 4.Convenience attributes* 5.Field initializer blocks (done) 6.MOP 7.Method modifiers https://github.com/Ovid/Cor/blob/master/rfc/mvp.md COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 46. The Seven Stages Perl v5.38.0 July 3rd, 2023 We’re going to learn new idioms We don’t (yet) know what they are It’s going to be challenging https://github.com/Ovid/Cor/blob/master/rfc/mvp.md COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 48. Chris Prather—Rogue Setup — https://chris.prather.org/perl-roguelike-part-0.html Movement — https://chris.prather.org/perl-roguelike-part-1.html Entities and Obstacles — https://chris.prather.org/perl-roguelike-part-2.html Generative Dungeon — https://chris.prather.org/perl-roguelike-part-3.html Field of View — https://chris.prather.org/perl-roguelike-part-4.html Enemies — https://chris.prather.org/perl-roguelike-part-5.html Combat — https://chris.prather.org/perl-roguelike-part-6.html And more! COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 49. Nice, clean code class MeleeAttackAction :isa(Action) { use Games::Dice qw(roll); field $defender :param; method perform() { my $attacker = $self->entity; my $attack_roll = roll('1d20') + $attacker->stats->attack; my $defense_roll = roll('1d20') + $defender->stats->armor; if ( $attack_roll > $defense_roll ) { $defender->stats->change_hp($defense_roll - $attack_roll); } return; } } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 50. Stevan Little-Actor Event Loop Orchestra — https://github.com/stevan/ELO Porting to Corinna — https://github.com/stevan/Stella All in One Gist — https://gist.github.com/stevan/06a091d8ce775181e8c023864 beba173 COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 51. Nice, clean code class PingPong :isa(Stella::Actor) { use Stella::Util::Debug; # import LOG_LEVEL, INFO, WARN, etc. field $name :param; # so I can identify myself in the logs field $max :param; # the max number of ping/pong(s) to allow # counters for ping/pong(s) field $pings = 0; field $pongs = 0; field $logger; ADJUST { # create a logger if logging is enabled $logger = Stella::Util::Debug->logger if LOG_LEVEL; } method Ping ($ctx, $message) { if ($pings < $max) { ... COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 52. Nice, clean code sub init ($ctx) { # spawn 10 sets of Ping/Pong actors foreach my $i ( 1 .. 10 ) { # give them a random max-pings my $max = int(rand(10)); my $Ping = $ctx->spawn( PingPong->new( name => "Ping($i)", max => $max ) ); my $Pong = $ctx->spawn( PingPong->new( name => "Pong($i)", max => $max ) ); # start up this pair ... $Ping->send( $Pong, Stella::Event->new( symbol => *PingPong::Pong ) ); } } Stella::ActorSystem->new( init => &init )->loop; COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 53. Principle of Parsimony We made mistakes We don’t know what they are We had to be conservative COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 54. Dr. Michel Koenig michelkoenig06@gmail.com Mathematician Computer Scientist Security and Privacy COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 55. Your Data is Not Yours GDPR PII PCI-Compliance “Right to be forgotten” Numerous US state-level laws COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 56. Costs Development—How much does it cost to remove your data? Personnel—How many more people do you need to manage that data? Reputation—If you get it wrong, people get mad COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 57. Threats Compliance Costs GDPR bankruptcy PCI Violations COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 58. What if you could “loan” your data? MADNESS! COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 59. Start Lies COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 60. Lattice-based Cryptography Developed in1996 by Miklós Ajtai Cannot be decrypted quantum computers 2006, Craig Gentry, homomorphic encryption This is not how he did it COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 61. End Lies COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 62. Perl? The actual idea is simple Could do it in Perl Cannot afford to get wrong COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 63. Perl? No. COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 64. Perl? Not yet. COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 65. Why not Perl? <secret> Performance Data integrity Trust COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 66. His Prototype Works COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 68. Perl 7 CORINNA? COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 69. Perl 8 WHAT’S NEXT? COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 70. What do we want? Concurrency Multisubs/methods Metaprogramming Applications Core Exceptions Core Stack Traces Graphics/GUIs Data Types COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 71. What do we want? Concurrency Multisubs/methods Metaprogramming Applications*** Exceptions Core Stack Traces Graphics/GUIs Data Types ← ← ← ← ← ← ← COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 72. perldoc –f my my VARLIST my TYPE VARLIST my VARLIST : ATTRS my TYPE VARLIST : ATTRS A "my" declares the listed variables to be local (lexically) to the enclosing block, file, or "eval". If more than one variable is listed, the list must be placed in … COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 73. Let’s Play “Make Believe” … AND SEE WHAT THAT GETS US. COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 74. Yes, please! my INT @array = (4,5,6); $array[1] = "foo"; # BOOM! COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 75. Cache::LRU class Cache::LRU { # this example is NAÏVE! use Hash::Ordered; field $cache = Hash::Ordered->new; field $max_size :param :reader = 20; method set( $key, $value ) { $cache->unshift( $key, $value ); if ( $cache->keys > $max_size ) { $cache->pop; } } method get($key) { return unless $cache->exists($key); my $value = $cache->get($key); $self->set( $key, $value ); return $value; } } No data control COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 76. Cache::LRU package Cache::LRU; use Hash::Ordered; sub new ( $class, $max_size ) { bless { cache => Hash::Ordered->new, max_size => $max_size, } => $class; } sub _cache ($self) { $self->{cache} } sub max_size ($self) { $self->{max_size} } sub set ( $self, $key, $value ) { $self->_cache->unshift( $key, $value ); if ( $self->_cache->keys > $self->max_size ) { $self->_cache->pop; } } sub get ( $self, $key ) { return unless $self->_cache->exists($key); my $value = $self->_cache->get($key); $self->set( $key, $value ); return $value; } No data control COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 77. Oops What if we pass a reference for $max_size? if ($num_keys > $max_size) {...} $cache->set( %value, $key ) silently succeeds. $cache->get( %value ) fails for the wrong reasons COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 78. Boundaries Fixed by checking your data. You would never write code like that. What about the people who use your code? COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 79. Cache::LRU package Cache::LRU; use Hash::Ordered; sub new ( $class, $max_size ) { bless { cache => Hash::Ordered->new, max_size => $max_size, } => $class; } sub _cache ($self) { $self->{cache} } sub max_size ($self) { $self->{max_size} } sub set ( $self, $key, $value ) { $self->_cache->unshift( $key, $value ); if ( $self->_cache->keys > $self->max_size ) { $self->_cache->pop; } } sub get ( $self, $key ) { return unless $self->_cache->exists($key); my $value = $self->_cache->get($key); $self->set( $key, $value ); return $value; } No data control COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 80. Let’s Dream package Cache::LRU; sub new (CLASS[Cache::LRU] $class, UINT $max_size) { ... } sub _cache ($self) { ... } sub max_size (OBJ[Cache::LRU] $self) UINT { ... } sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value) OBJ[Cache::LRU] | VOID { ... } sub get(OBJ[Cache::LRU] $self, STR $key) !VOID { ... } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 81. Let’s Dream package Cache::LRU; sub new (CLASS[Cache::LRU] $class, UINT $max_size) { ... } sub _cache ($self) { ... } sub max_size (OBJ[Cache::LRU] $self) UINT { ... } sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value) OBJ[Cache::LRU] | VOID { ... } sub get(OBJ[Cache::LRU] $self, STR $key) !VOID { ... } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 82. Let’s Dream package Cache::LRU; sub new (CLASS[Cache::LRU] $class, PosInt $max_size) { ... } sub _cache ($self) { ... } sub max_size (OBJ[Cache::LRU] $self) UINT { ... } sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value) OBJ[Cache::LRU] | VOID { ... } sub get(OBJ[Cache::LRU] $self, STR $key) !VOID { ... } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 83. Let’s Dream package Cache::LRU; sub new (CLASS[Cache::LRU] $class, UINT $max_size) { ... } sub _cache ($self) { ... } sub max_size (OBJ[Cache::LRU] $self) UINT { ... } sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value) OBJ[Cache::LRU] | VOID { ... } sub get(OBJ[Cache::LRU] $self, SRE $key) !VOID { ... } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 84. Let’s Dream package Cache::LRU; sub new (CLASS[Cache::LRU] $class, PosInt $max_size) { ... } sub _cache ($self) { ... } sub max_size (OBJ[Cache::LRU] $self) PosInt { ... } sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value) OBJ[Cache::LRU]|void { ... } sub get(OBJ[Cache::LRU] $self, STR $key) !VOID { ... } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 85. Let’s Dream package Cache::LRU; sub new (CLASS[Cache::LRU] $class, UINT $max_size) { ... } sub _cache ($self) { ... } sub max_size (OBJ[Cache::LRU] $self) UINT { ... } sub set (OBJ[Cache::LRU] $self, STR $key, DEF $value) OBJ[Cache::LRU] | VOID { ... } sub get(OBJ[Cache::LRU] $self, STR $key) !VOID { ... } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 86. Let’s Dream package Cache::LRU; sub new ($class, UINT $max_size ) { ... } sub _cache ($self) { ... } sub max_size ($self) { ... } sub set ($self, STR $key, DEF $value){ ... } sub get($self, STR $key) !VOID { ... } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 87. Let’s Dream class Cache::LRU; field $cache = HashOrdered->new; field UINT $max_size :param = 20; method set (STR $key, DEF $value){ ... } method get(STR $key) !VOID { ... } COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 88. Project Oshun WTF? COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 89. Oshun Orisha (deity) of the Nigerian Yoruba River deity. Fertility goddes:!s. Depicted as protector, savior, or nurturer https://www.britannica.com/topic/Oshun Image CC by 3.0. Sailko, Candomblé nel Museu Afro-Brasileiro, Salvador COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 90. Oshun Will Protect Your Data COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 91. Ceçi n’est pas un type “Computer scientists have discussions about type systems. Computer programmers have screaming matches.” –Ovid, 9 CE (±~2K years) COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 92. Rama, Cc-by-sa-2.0-fr COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 93. Rama, Cc-by-sa-2.0-fr COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 94. Oshun History First pass was a December 23, 2022 gist Followed by an email to Damian “I am not competant to design a type system.” (Ovid) COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 95. PPC Process Send pre-PPC email to P5P list Summarize the problem Present your solution Get it summarily rejected with a “this should be a CPAN module first.” COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 96. PPC Process Send pre-PPC email to P5P list Summarize the problem Present your solution Get it summarily rejected with a “this should be a CPAN module first.” COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 97. Oshun History Damian’s first design arrived January 9, 2023 Months of discussion tweaking the design Damian wrote Data::Checks COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 98. Data::Checks use Data::Checks; sub total :returns(INT) ($times :of(UINT)) { my $total :of(INT) = 0; foreach my $i (1..$times) { $total += get_result($i); } return $total; } Not on the CPAN! COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 99. Data::Checks https://github.com/Ovid/oshun Almost 200,000 tests 24 built-in types checks User-defined checks specced but not implemented Coercions specced but not implemented Not on the CPAN! COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 100. Oshun Team Branislav Zahradník (happy-barney) Chris Prather (perigrin) Curtis Poe (Ovid) Dr. Damian Conway (thoughtstream) Elvin Aslanov (rwp0) Peter Mottram (syspete) Dr. Ruud van Tol (druud) Toby Inkster (tobyink) Veesh Goldman (rabbiveesh) Yves Orton (demerphq) 13 août 2023 COPYRIGHT 2022, HTTP://WWW.ALLAROUNDTHEWORLD.FR/
  • 101. Why do we need this? Safer code Keep Perl 5.0’s Promise Self-documenting COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 102. Summary Corinna is partially implemented in Perl core We’re going to have to relearn how we do OO We might get data checks in the future COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.
  • 103. Questions? COPYRIGHT 2023, CC BY 4.0. ALL AROUND THE WORLD.

Editor's Notes

  1. Is a given sub a method or a sub?
  2. When I hit C, I didn’t understand why we didn’t have line numbers.
  3. By “lambda”, we often refer to subroutines (the map block) which create and return anonymous subroutines. Comes from Alonzo’s Church’s “lambda calculus” in the 1930s. Unlike Turing’s stateful machine, the lambda calculus was stateless, but Turing complete.
  4. Note: it’s possible, but awkward, to get multi-statement lambda in Python. In Perl, we use lambdas all the time (even if we don’t call them that), but it’s trickier in Python.
  5. Note: it’s possible, but awkward, to get multi-statement lambda in Python. In Perl, we use lambdas all the time (even if we don’t call them that), but it’s trickier in Python.
  6. Code blocks, not statement blocks, so you can’t return.
  7. Syntax::Keyword::Try::Deparse
  8. The ”done” items will be in Perl 5.38
  9. The ”done” items will be in Perl 5.38
  10. YAGNI. Single inheritance. Inheriting from non-Cor. Protected methods.
  11. Politicians are paying more attention. More public pressure. Getting expensive for companies.
  12. Brussels, 22 May - Following the EDPB’s binding dispute resolution decision of 13 April 2023, Facebook received a 1.2 billion euro fine following an inquiry into its Facebook service, by the Irish Data Protection Authority (IE DPA). This fine, which is the largest GDPR fine in history.
  13. This is one way this could be done. Your data is never decrypted! Not proven to be unbreakable. Most libraries not prod-ready. They’re slow.
  14. <secret> Performance Data Integrity
  15. <secret> Performance Data Integrity
  16. It’s one of those ideas that’s obvious, but only in retrospect. I thought about a Perl prototype.
  17. Greater scalability (and the timing of the web) is what made Perl great.
  18. Mo/ose has isa. The biggest benefit (to me) of Moose is the biggest weakness of Corinna.
  19. When was the last time you saw a test verifying that a Java signature protected the code?