70
The future of Presented by Southampton Perl Mongers Perl is a very popular programming language used in web development, software integration, data conversion, system administration, and many other areas. This talk will discuss Perl capabilities, applications, use in industry, and job prospects and ways to excel. Wednesday 29 October 1-2pm Room A2.08 Anglesea building Where is your language in the food chain?

The *on-going* future of Perl5

Embed Size (px)

Citation preview

Page 1: The *on-going* future of Perl5

The future ofPresented by

Southampton Perl Mongers

Perl is a very popular programming language used in web development, software integration, data conversion, system administration, and many other areas. This talk will discuss Perl capabilities, applications, use in industry, and job prospects and ways to excel.

Wednesday29 October

1-2pmRoom A2.08

Anglesea building

Where is your language in the food chain?

Page 2: The *on-going* future of Perl5

The *on-going* future of Perl5

Southampton Perl MongersSlides are available at http://goo.gl/5v8nXl

Page 3: The *on-going* future of Perl5

About us

Page 5: The *on-going* future of Perl5

Why we are here..

Page 6: The *on-going* future of Perl5

Why we are here..

Page 7: The *on-going* future of Perl5

source: http://xkcd.com/519/

Page 8: The *on-going* future of Perl5

Agenda

● Part 1: Perl jobs & trends

● Part 2: Perl awesomeness

Page 9: The *on-going* future of Perl5

Who is using Perl?

Page 10: The *on-going* future of Perl5

What’s Perl?An awesome programminglanguage that allowsyou to quicklyachieve varioustasks in your way!

Page 11: The *on-going* future of Perl5

Perl influenced...

Page 12: The *on-going* future of Perl5

Perl influenced...● Windows PowerShell

Page 13: The *on-going* future of Perl5

Perl influenced...● Windows PowerShell● Ruby

Page 14: The *on-going* future of Perl5

Perl influenced...● Windows PowerShell● Ruby● JavaScript

Page 15: The *on-going* future of Perl5

Perl influenced...● Windows PowerShell● Ruby● JavaScript● and more...

see http://en.wikipedia.org/wiki/Perl for more

Page 16: The *on-going* future of Perl5

What can you do with Perl?● Amazing web applications that are easy to

scale, develop and deploy in different environments with great frameworks like Mojolicious, Catalyst, Dancer, etc.

Page 17: The *on-going* future of Perl5

What can you do with Perl?● Scientific computing (Perl Data Language)● Controlling your UAV (UAV-Pilot)● Generating G-codes for 3D printing (Slic3r)

I can’t think of anything that Perl would not be able to do, but another language could.

Page 18: The *on-going* future of Perl5

Demo

Page 20: The *on-going* future of Perl5

source: goo.gl/aFyHgJ

Page 21: The *on-going* future of Perl5

source: TIOBE Index for October 2014 ( tiobe.com )

Page 22: The *on-going* future of Perl5

Invest Regularly in Your Knowledge Portfolio

● Different languages solve the same problems in different ways. By learning several different approaches, you can help broaden your thinking and avoid getting stuck.

Page 23: The *on-going* future of Perl5

Invest Regularly in Your Knowledge Portfolio

● Developers who know only Python find it more difficult to start working with other languages.

Page 24: The *on-going* future of Perl5

● No language can be mainstream forever.

Invest Regularly in Your Knowledge Portfolio

Page 25: The *on-going* future of Perl5

A rule of thumb..

Page 26: The *on-going* future of Perl5

Before we start..● ….In Perl there are also two important things

to keep in mind when you code:● Easy things should be easy, and hard

things should be possible - Larry Wall● There's more than one way to do it

(TMTOWTDI)

Page 27: The *on-going* future of Perl5

Perl has some of the best Unicode support today, especially with respect to regular expressions.

Benjamin PetersonThe Guts of Unicode in Python

PyCon 2013 [ http://goo.gl/uIl8VB ]

Page 28: The *on-going* future of Perl5

Lets start learning Perl!

… and finally let’s rock a little bit

Page 29: The *on-going* future of Perl5

Obtaining PerlWindows: Strawberry Perl

(http://strawberryperl.com/)

Linux: Install from distribution repositories, e.g.$ sudo apt-get install perl# yum install perl

Page 30: The *on-going* future of Perl5

Give me a variable!use strict;

use warnings;

my $name = 'John';

my $greeting = “Hello there, $name”;

print “$greeting\n”;

Page 31: The *on-going* future of Perl5

Give me a hash!my %person = (

name => 'John',

age => 29,

);

my $greeting = “Hello there, %person{'name'}”;

print “$greeting\n”;

%person{'age'} = 30;

Page 32: The *on-going* future of Perl5

Give me an array!

my @people = ( 'John', 'Sue', 'Mary' );

for my $person (@people) {print “Hello there, $person\n”;

}

Page 33: The *on-going* future of Perl5

for my $person (@people) {greet($person);

}

sub greet {

my ($person) = @_;

print “Hello there, $person\n”;

return 1;

}

Give me a function!

Page 34: The *on-going* future of Perl5

package Person;

sub new {

my ($class, $name, $age) = @_;

return bless {

name => $name, age => $age,

} $class;

}

1;

Give me an object!

Page 35: The *on-going* future of Perl5

sub greet {

my ($self) = @_;

print “Hello there, $self->{'name'}”;

return 1;

}

Give me an method!

Page 36: The *on-going* future of Perl5

use strict;

use warnings;

use Person;

my $person = Person->new('John', 29);

$person->greet();

Using objects

Page 37: The *on-going* future of Perl5

Obtaining help

http://perldoc.perl.org

Page 38: The *on-going* future of Perl5

MojoliciousMojolicious is unique and awesome web framework.

Page 39: The *on-going* future of Perl5

I

Mojolicious

Page 40: The *on-going* future of Perl5

I

Mojolicious

a lot

Page 41: The *on-going* future of Perl5

MojoliciousMojolicious is unique and awesome web framework.● In 1998, Perl was called “The duct tape that

holds the internet together”.

Page 42: The *on-going* future of Perl5

MojoliciousMojolicious is unique and awesome web framework.● In 1998, Perl was called “The duct tape that

holds the internet together”.● In 2014, Mojolicious is called “The duct tape

for the HTML5 world”.

Page 43: The *on-going* future of Perl5

mojo version

Page 44: The *on-going* future of Perl5

mojo generate lite_app

Page 45: The *on-going* future of Perl5

Run your app

Page 46: The *on-going* future of Perl5

mojo get

Page 47: The *on-going* future of Perl5

mojo get -v

Page 48: The *on-going* future of Perl5

How to get newest comic from xkcd.com ?

Page 49: The *on-going* future of Perl5

How to get newest comic from xkcd.com ?

Page 50: The *on-going* future of Perl5

mojo generate app

Page 51: The *on-going* future of Perl5

mojo test

Page 52: The *on-going* future of Perl5

https://metacpan.org/

Page 53: The *on-going* future of Perl5

Upcoming events ( 2014 )

London Perl Workshop ( 8 November )○ http://act.yapc.eu/lpw2014/

Page 54: The *on-going* future of Perl5

Join Perl Mongers!○ Come to Perl social meetings, get a free drink!

○ Next one Wed 5th Nov, Platform Tavern, Soton

○ More information on http://southampton.pm.org/

Page 55: The *on-going* future of Perl5

Apply for send-a-newbie Annually 1 newbie gets sent to YAPC for free

http://www.send-a-newbie.enlightenedperl.org/index.html

Page 56: The *on-going* future of Perl5

That’s All Folks

Any Questions?

Page 57: The *on-going* future of Perl5

Thank you

Page 58: The *on-going* future of Perl5

Bonus slides

Page 59: The *on-going* future of Perl5

Hot programming trends!

me going to the datavs

the data coming to me

Page 60: The *on-going* future of Perl5

Hot programming trends!

Pervasive laziness

Page 61: The *on-going* future of Perl5

The joy in what we doour love of solving puzzles

Page 62: The *on-going* future of Perl5

Even small things bring joy!

The joy in what we do

Page 63: The *on-going* future of Perl5

The joy in what we do

Page 64: The *on-going* future of Perl5

The joy in what we doThe feeling you are part of something big.

..That costed.. more than 3 billion USD ( estimated in 2011, source )

Page 65: The *on-going* future of Perl5

Language features

Page 66: The *on-going* future of Perl5

Perl vs other languages● Perl module documentation is embedded in

the source code of every module in POD format (vs javadoc)

Page 67: The *on-going* future of Perl5

Perl vs other languages● All Perl modules are organized via the CPAN

and browsable via metacpan, which is mirrored around the globe and everyone can contribute

● Extremely modularized approach: every single package have their Unit testing, scaling at the maximum power (Kwalitee)

Page 68: The *on-going* future of Perl5

Perl vs other languages● Perl ♥ C = XS or Inline::C● Perl & IO: the native I/O system is designed

to be simple and easy to use. E.g. the IO::All module unifies I/O under a common interface

● Java & IO : java.io package unifies I/O under a common interface too, but....

Page 69: The *on-going* future of Perl5

Perl vs other languages● Regexes?● No other language offers such a great regex

support.● Want to see if your Regex for substitution is

correct? In CLI run perl -pe ‘s/<from>/<to>/’

Page 70: The *on-going* future of Perl5

The reason that the Java I/O library is awkward to use

is that you must create many classes --the "core" I/O

type plus all the decorators-- in order to get the single

I/O object that you want.

Bruce Eckel

Thinking in Java, 4th edition, p. 919