Perl6 is a powerful programming language that incorporates many programming paradigms including functional, object oriented, reactive, and event based programming. It aims to provide programmers with a toolbox of features to build applications in many different styles. The language includes features like junctions, promises, channels, supplies, sets, roles, and strong support for Unicode. It also allows calling external native libraries and has built-in support for rational numbers, sequences, and lazy evaluation. Perl6 code examples are provided to demonstrate various features like List utilities, junctions, promises, channels/supplies, roles, and native calls. Further reading resources are also referenced.
From session at http://www.lambdalounge.org.uk/ on 18th April 2016. Here's the original blurb:
So, Haskell is "an advanced purely-functional programming language" which supports writing "declarative, statically typed code". It may be optimized for academic buzzwords you've never heard of but... is it any good for writing code in the way that you'd write Perl, Python, or Ruby?
What are strong types, and why are we so frightened of them anyway? Can you develop interactively in Haskell, the way you would in a dynamic language?
Does Haskell have "whipuptitude" (being able to get things done quickly) as well as "manipulexity" (being able to manipulate complex things)? And perhaps most importantly, can writing Haskell be *fun*?
Haskell is founded on decades of the finest mathematical and computer science research. Perl, quite demonstrably isn't... but why do so many Perl programmers also love Haskell?
Audrey Tang wrote the first prototype for Perl 6, Pugs, in Haskell, and coined the phrase "lambdacamel" for the substantial crossover between the languages.
What does a Perl programmer make of Haskell? What are the lessons that can be learned (in either direction). And do the languages have more in common than you might have thought?
Functional Pe(a)rls - the Purely Functional Datastructures editionosfameron
All new material, this time about one of the fundamental functional datastructures, the Linked List, and the overview of an implementation in Moosey Perl.
This covers some of the same material as https://github.com/osfameron/pure-fp-book but perhaps with more explanation (and covering much less material - it was only a 20 minute talk)
From session at http://www.lambdalounge.org.uk/ on 18th April 2016. Here's the original blurb:
So, Haskell is "an advanced purely-functional programming language" which supports writing "declarative, statically typed code". It may be optimized for academic buzzwords you've never heard of but... is it any good for writing code in the way that you'd write Perl, Python, or Ruby?
What are strong types, and why are we so frightened of them anyway? Can you develop interactively in Haskell, the way you would in a dynamic language?
Does Haskell have "whipuptitude" (being able to get things done quickly) as well as "manipulexity" (being able to manipulate complex things)? And perhaps most importantly, can writing Haskell be *fun*?
Haskell is founded on decades of the finest mathematical and computer science research. Perl, quite demonstrably isn't... but why do so many Perl programmers also love Haskell?
Audrey Tang wrote the first prototype for Perl 6, Pugs, in Haskell, and coined the phrase "lambdacamel" for the substantial crossover between the languages.
What does a Perl programmer make of Haskell? What are the lessons that can be learned (in either direction). And do the languages have more in common than you might have thought?
Functional Pe(a)rls - the Purely Functional Datastructures editionosfameron
All new material, this time about one of the fundamental functional datastructures, the Linked List, and the overview of an implementation in Moosey Perl.
This covers some of the same material as https://github.com/osfameron/pure-fp-book but perhaps with more explanation (and covering much less material - it was only a 20 minute talk)
Xlab #1: Advantages of functional programming in Java 8XSolve
Presentation from xlab workshop about functional programming components introduced to the Java 8. How to operate the streams and lambdas in theory and practice.
May 2006 presentation to the Dallas/Ft. Worth Perl Mongers on Perl's tie() functionality and how to use it to create fancy behavior for familiar data types
A short talk on what makes Functional Programming - and especially Haskell - different.
We'll take a quick overview of Haskell's features and coding style, and then work through a short but complete example of using it for a Real World problem.
http://lanyrd.com/2011/geekup-liverpool-may/sdykh/
In functional programming, words from Category Theory are thrown around, but how useful are they really?
This session looks at applications of monoids specifically and how using their algebraic properties offers a solid foundation of reasoning in many types of business domains and reduces developer error as computational context complexity increases.
This will provide a tiny peak at Category Theory's practical uses in software development and modeling. Code examples will be in Haskell and Scala, but monoids could be constructed in almost any language by software craftsmen and women utilizing higher orders of reasoning to their code.
PHP data structures (and the impact of php 7 on them), phpDay Verona 2015, ItalyPatrick Allaert
We all have certainly learned data structures at school: arrays, lists, sets, stacks, queues (LIFO/FIFO), heaps, associative arrays, trees, ... and what do we mostly use in PHP? The "array"! In most cases, we do everything and anything with it but we stumble upon it when profiling code. During this session, we'll learn again to use the structures appropriately, leaning closer on the way to employ arrays, the SPL and other structures from PHP extensions as well.The impact that PHP 7 should have on data structures will be introduced as well.
PHP 7 – What changed internally? (PHP Barcelona 2015)Nikita Popov
One of the main selling points of PHP 7 is greatly improved performance, with many real-world applications now running twice as fast… But where do these improvements come from? At the core of PHP 7 lies an engine rewrite with focus on improving memory usage and performance. This talk provides an overview of the most significant changes, briefly covering everything from data structure changes, over enhancements in the executor, to the new compiler implementation.
I discovered CoffeeScript during a recent project that Jim Garvin and I were working on. We knew the app was going to be heavy on the JavaScript, and that’s how we started – writing straight JavaScript. Even though I have written JavaScript for years, this time, the JavaScript syntax itself got in the way. CoffeeScript’s elegant syntax relieved the burden.
I quickly fell so in love with CoffeeScript that I have since sworn off writing raw JavaScript directly ever again. The goal of this talk is to convince the audience to try CoffeeScript in hopes that they too will find it as valuable as I did.
Presentation I gave at a Rust Austin meetup in November 2018 about exploring different approaches for interpreting custom DSLs in Rust with varying speed characteristics and associated safety issues.
Java Cheat Sheet includes the following contents:
- Data Types
- Statements
- String, ArrayList and HashMap Methods
- Conversion
- Operators
- Exception Handling
FITC events. For digital creators.
Save 10% off ANY FITC event with discount code 'slideshare'
See our upcoming events at www.fitc.ca
An Intro To ES6
with Grant Skinner
OVERVIEW
ECMAScript 6 is the approved and published standard for the next version of JavaScript. It offers new syntax and language features that provide new ways of tackling coding problems, and increase your productivity.
This session will introduce ES6 and delve into many of the new features of the language. It will also cover real-world use, including transpilers, runtimes, and browser support.
OBJECTIVE
Create confidence in evaluating and getting started using ES6.
TARGET AUDIENCE
JavaScript developers.
ASSUMED AUDIENCE KNOWLEDGE
JavaScript.
FOUR THINGS AUDIENCE MEMBERS WILL LEARN
Status of ES6
How to get started with ES6
ES6 feature overview
Practical considerations for adopting ES6
Xlab #1: Advantages of functional programming in Java 8XSolve
Presentation from xlab workshop about functional programming components introduced to the Java 8. How to operate the streams and lambdas in theory and practice.
May 2006 presentation to the Dallas/Ft. Worth Perl Mongers on Perl's tie() functionality and how to use it to create fancy behavior for familiar data types
A short talk on what makes Functional Programming - and especially Haskell - different.
We'll take a quick overview of Haskell's features and coding style, and then work through a short but complete example of using it for a Real World problem.
http://lanyrd.com/2011/geekup-liverpool-may/sdykh/
In functional programming, words from Category Theory are thrown around, but how useful are they really?
This session looks at applications of monoids specifically and how using their algebraic properties offers a solid foundation of reasoning in many types of business domains and reduces developer error as computational context complexity increases.
This will provide a tiny peak at Category Theory's practical uses in software development and modeling. Code examples will be in Haskell and Scala, but monoids could be constructed in almost any language by software craftsmen and women utilizing higher orders of reasoning to their code.
PHP data structures (and the impact of php 7 on them), phpDay Verona 2015, ItalyPatrick Allaert
We all have certainly learned data structures at school: arrays, lists, sets, stacks, queues (LIFO/FIFO), heaps, associative arrays, trees, ... and what do we mostly use in PHP? The "array"! In most cases, we do everything and anything with it but we stumble upon it when profiling code. During this session, we'll learn again to use the structures appropriately, leaning closer on the way to employ arrays, the SPL and other structures from PHP extensions as well.The impact that PHP 7 should have on data structures will be introduced as well.
PHP 7 – What changed internally? (PHP Barcelona 2015)Nikita Popov
One of the main selling points of PHP 7 is greatly improved performance, with many real-world applications now running twice as fast… But where do these improvements come from? At the core of PHP 7 lies an engine rewrite with focus on improving memory usage and performance. This talk provides an overview of the most significant changes, briefly covering everything from data structure changes, over enhancements in the executor, to the new compiler implementation.
I discovered CoffeeScript during a recent project that Jim Garvin and I were working on. We knew the app was going to be heavy on the JavaScript, and that’s how we started – writing straight JavaScript. Even though I have written JavaScript for years, this time, the JavaScript syntax itself got in the way. CoffeeScript’s elegant syntax relieved the burden.
I quickly fell so in love with CoffeeScript that I have since sworn off writing raw JavaScript directly ever again. The goal of this talk is to convince the audience to try CoffeeScript in hopes that they too will find it as valuable as I did.
Presentation I gave at a Rust Austin meetup in November 2018 about exploring different approaches for interpreting custom DSLs in Rust with varying speed characteristics and associated safety issues.
Java Cheat Sheet includes the following contents:
- Data Types
- Statements
- String, ArrayList and HashMap Methods
- Conversion
- Operators
- Exception Handling
FITC events. For digital creators.
Save 10% off ANY FITC event with discount code 'slideshare'
See our upcoming events at www.fitc.ca
An Intro To ES6
with Grant Skinner
OVERVIEW
ECMAScript 6 is the approved and published standard for the next version of JavaScript. It offers new syntax and language features that provide new ways of tackling coding problems, and increase your productivity.
This session will introduce ES6 and delve into many of the new features of the language. It will also cover real-world use, including transpilers, runtimes, and browser support.
OBJECTIVE
Create confidence in evaluating and getting started using ES6.
TARGET AUDIENCE
JavaScript developers.
ASSUMED AUDIENCE KNOWLEDGE
JavaScript.
FOUR THINGS AUDIENCE MEMBERS WILL LEARN
Status of ES6
How to get started with ES6
ES6 feature overview
Practical considerations for adopting ES6
Why async and functional programming in PHP7 suck and how to get overr it?Lucas Witold Adamus
This presentation describes basic issues related to functional programming with PHP and solution for most of problems served by the library called PhpSlang.
One criticism of opponents of Perl is that it is a "write-only" language meaning that once the code is written, it is extremely difficult to maintain because it is difficult to understand upon re-examination. As with many criticisms, this should be aimed at those undisciplined developers who are writing the code, and not their tool of choice.
Having said that, I think it is also fair to say that Perl makes it very easy to write difficult-to-decipher code. This is the doubleedged sword which is the shorthand Perl gives us to be very expressive in a small amount of space. A negative application of this is obfuscated Perl (where the author intentionally makes his code difficult to read), while a more positive application is the craft of creating Perl "oneliners" (trying to include a great deal of functionality in a single line of code). A oneliner can be a powerful weapon in the arsenal of a system administrator.
In this talk:
* We'll look at a line of code in a subroutine that is in desperate need of readability changes
* We'll make the code more readable by introducing:
* appropriate whitespace
* different ways of writing the same thing, for example: $array[$#array] vs. $array[-1]
* useful names for variables, versus $index, $j $k $l, etc
* breaking up one line of code into multiple lines
* exploring further improvements through Perl::Critic and by extension Perl::Tidy
This talk will be beginner-friendly.
PHP has its own treasure chest of classic mistakes that surprises even the most seasoned expert : code that dies just by changing its namespace, strpos() that fails to find strings or arrays that changes without touching them. Do that get on your nerves too? Let’s make a list of them, so we can always teach them to the new guys, spot them during code reviews and kick them out of our code once and for all. Come on, you’re not frightening us?
Slides from my talk at London Perl Mongers on 2018-03-22 covering Perl6 Signatures in detail.
Special bonus slides for Type Checking and Multi methods.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
2. Obligatory About Me Slide
Hi.
I’m Simon. (Also known as Scimon in many places)
I write Perl and when I can Perl6.
I’ve been doing it for 15 years and a bit. (Not the Perl6… well)
Now working at Zoopla. We’re hiring, (not sure where we’ll put you…)
Wrote Timer::Breakable, writing more modules.
3. A Disclaimer
I am still learning Perl6.
It’s a massive powerful language with a lot of scope to create amazing stuff.
Some of the things I say today may be wrong.
This will be because I still don’t fully understand some of the really neat things I’m
playing with.
But all the code examples I give work!
I tested them all.
4. Humourous Caption Slide
The Year of Linux on the Desktop!
1998, 1999, 2000, 2001, 2002 …
The Year of Perl6 in Production ?
2018...
5. Multiple Programming Paradigms
What’s your poison?
● Functional Programming ?
● Object Orientated ?
● Reactive or Event Based ?
● Strongly Typed ?
● Weakly Typed ?
Perl6 builds in the concept of the swiss army chainsaw and gives you a toolbox
from which you can build whatever chainsaw you want.
6. List::Util
● reduce : [+] @a or @a.reduce(*+*)
● any : so any(@a) > 10
● all : so all(@a) > 10
● none : so none(@a) > 10
● first : @a.first( * > 10 )
● max : @a.max
● maxstr : @a.max( *.Str )
● min : @a.min
● minstr : @a.min( *.Str )
● product : [*] @a or @a.reduce(* * *)
● sum : @a ?? @a.sum !! Nil
● sum0 : @a.sum
● shuffle : @a.pick(@a)
● uniq : @a.unique
● uniqnum : @a.unique( :as( *.Num ) )
● uniqstr : @a.unique( :as( *.Str ) )
Perl6 has Pairs as a Type making the pair methods redundant.
Note that Perl6 is typed and casting a string to a number may raise an exception.
13. Promises
“Asynchronous programming for mortals” or “No more callback hell”
my $p1 = start { sleep 3; print “Or a simple start? ”; };
my $p2 = Promise.in(2).then( { print “Why not use a timer? ” } );
my $p3 = Promise.anyof( $p1, $p2 ).then( { print “Something is done. ” } );
my $p4 = Promise.allof( $p1, $p2, $p3 ).then( { print “All the promises done.” } );
print “Promises Begun… ”;
await( $p1, $p2, $p3, $p4 );
say “All done.”;
Promises Begun… Why not use a timer? Something is done. Or a simple start? All the
promises done. All done.
With some pauses…
14. Channels and Supplies
constant children = 8;
sub MAIN( Str $text ) {
my $dir-channel = Channel.new();
my $file-channel = Channel.new();
my @readers;
for (^8) -> $idx {
@readers[$idx] = Promise.new();
my $sup = $file-channel.Supply.map( -> $path {
my @a = $path.lines.grep( {
defined $_.index($text)
} ); $path => @a
} ).tap( -> $data {
for $data.value { say("{$data.key} : {$_}") }
}, done => { @readers[$idx].keep } );
}
for dir( "." ) -> $p { $dir-channel.send($p) };
loop {
if $dir-channel.poll -> $path {
if ( $path.d ) {
$dir-channel.send( $_ )
for dir( $path )
} elsif ( $path.f ) {
$file-channel.send( $path );
}
} else {
$dir-channel.close;
$file-channel.close;
last;
}
}
await( @readers );
}
15. Channels and Supplies (Feeds : Secret Sauce)
my $sup = $file-channel.Supply
.map( -> $path {
my @a = $path.lines.grep( {
defined $_.index($text)
} ); $path => @a
} )
.tap( -> $data {
for $data.value { say("{$data.key} : {$_}") }
}, done => { @readers[$idx].keep } );
16. Sequences, Lazy Evaluation and Rational Numbers
my @primes = (1..*).grep( *.is-prime );
my @evens = 2,4,6...*;
my @fib = 1, 1, * + * ... *;
my $div0 = 42 / 0;
say $div0.nude; # NU(merator and) DE(nominator)
(42 0)
say 0.2 + 0.1 - 0.3 == 0; True
17. Sets and Bags
my @primes = (1..*).grep( *.is-prime );
my @fib = 1,2,*+*...*;
my $prime-set = set( @primes[0..50] );
say $_, " prime? ", $_ ∈ $prime-set
for @fib[0..5];
say $prime-set ∩ @fib[0..10];
(elem) and ∈ are synonyms as are (&) and ∩
Note : Set operators auto coerce their args to
Sets.
1 prime? False
2 prime? True
3 prime? True
5 prime? True
8 prime? False
13 prime? True
set(13 2 3 5 89)
19. NativeCall (A peek inside)
method write_to_png(Str $filename)
returns int32
is native($cairolib)
is symbol('cairo_surface_write_to_png') {*}
method rectangle(num64 $x, num64 $y, num64 $w, num64 $h)
is native($cairolib)
is symbol('cairo_rectangle') {*}
That simple. Here $cairolib is either 'libcairo-2' or ('cairo', v2)
depending on the architecture.
20. Roles
Yeah you know roles right? Well what about this?
role logger {
method log-msg ( Str $msg ) { say “{$msg} : {self.perl}” }
};
my $num = 5;
$num.?log-msg( "Not a logger" );
$num does logger;
$num.?log-msg( "Loggable" );
Or
my $result = 0 but True;
21. Unicode
my $á1 = “c[LATIN SMALL LETTER A WITH ACUTE]”; # Smart Quotes!
my $á2 = “ax301”;
say “$á1 : $á2”;
á : á
say $á1 eq á2;
True
say “$á1 : $á2”.uc;
Á : Á
my $æ = 2;
$æ = ( $æ * ¾ )²;
say “æ => $æ”;
æ => 2.25
22. All the other stuff
● Grammars
● Imaginary Numbers
● Proper Exceptions
● CPAN
● Meta Objects
● Telemetry
● JVM
● RakudoJS
● IO::Notification
● Date and DateTime built in
● (And so much more)
23. Further Reading (and Viewing)
● Perl 6 Docs - https://docs.perl6.org/
● High End Unicode in Perl 6 - https://youtu.be/Oj_lgf7A2LM
● Perl6 Superglue for the 21st Century - https://www.youtube.com/watch?v=q8stPrG1rDo
● Think Perl 6 - http://greenteapress.com/wp/think-perl-6/
● Using Perl 6 - https://deeptext.media/using-perl6
● Learning Perl 6 (On the Way) - https://www.learningperl6.com/
● Cro - http://cro.services/
● Bailador - https://github.com/Bailador/Bailador
● Sparrowdo - https://github.com/melezhik/sparrowdo
● Spitsh - https://github.com/spitsh/spitsh
● Roles vs Inheritance - https://www.youtube.com/watch?v=cjoWu4eq1Tw