diff options
Diffstat (limited to 'perl9.buetow.org/content/New-Features.sub')
5 files changed, 82 insertions, 0 deletions
diff --git a/perl9.buetow.org/content/New-Features.sub/Artificial-Intelligence.xml b/perl9.buetow.org/content/New-Features.sub/Artificial-Intelligence.xml new file mode 100644 index 0000000..f23dcbf --- /dev/null +++ b/perl9.buetow.org/content/New-Features.sub/Artificial-Intelligence.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?> +<content> + <pagetitle>Built in artificial intelligence engine!</pagetitle> + <text>Perl 9 now has a built in AI engine! If you are too lazy to work, just tell Perl 9 to work for you.</text> + <code> +# The AI will determine what needs to get done and will do it for you! +(my AI $ai .= new).work; + </code> +</content> diff --git a/perl9.buetow.org/content/New-Features.sub/Multi-Langual.xml b/perl9.buetow.org/content/New-Features.sub/Multi-Langual.xml new file mode 100644 index 0000000..e502efb --- /dev/null +++ b/perl9.buetow.org/content/New-Features.sub/Multi-Langual.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?> +<content> + <pagetitle>Perl 9 is multi langual</pagetitle> + <text>In Perl 9, perl can now do everything! You can combine all syntaxes of your programming languages within the same program! This is actually awesome! If your friend keeps telling you that his programming language is better than Perl, then he does not know (yet) about Perl 9! :)</text> + <code> +#!/usr/bin/perl9 + +use VisualBasic.NET qw(Comments Declaration::Variable) +use TurboPascal qw(Operator::Assign) +use Java qw(Class::Math Loop::Foreach Class::System::out); + +Rem Some cool stuff: +Dim double @Foo As Array; +@Foo[$_] := Math.sqrt($_) for 0 .. 10; +foreach (double $d : @Foo) +$d->System.out.println(); + </code> +</content> diff --git a/perl9.buetow.org/content/New-Features.sub/New-Contexes.xml b/perl9.buetow.org/content/New-Features.sub/New-Contexes.xml new file mode 100644 index 0000000..8230962 --- /dev/null +++ b/perl9.buetow.org/content/New-Features.sub/New-Contexes.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?> +<content> + <pagetitle>Perl 9 contians new datatypes/contexes!</pagetitle> + <text>Perl now got some new data types and contexes:</text> + <textheader>Fuzzy Context ~</textheader> + <text>Everything is not sharp but fuzzy! Fuzzy does always something like the desired value! It is never exact!</text> + <code> +my ~fuz; # Fuzzy type + + +use PHP qw(Function::echo); + +# You don't know if its assigning list or scalar context! +my ~fuzzy = qw(Hello mister Edd); +echo<-~fuzzy; // Can print 'Hello' or can print '3' + +my ~foo = 'Good morning'; +echo<-~foo; # Due a built in AI engine, this may print 'Good morning' or 'Bad afternoon' + </code> + <textheader>Matrix Context []</textheader> + <text>No more limitations to list and scalar and void contexes!</text> + <code> +my ([]matrix1,[]matrix2) = ( + ((1, 0, 0), (0, 1, 0), (0, 0, 1)), + ((0, 1, 0), (0, 0, 1), (1, 0, 0)), +); + +[]matrix1 += []matrix2; # Will add matrix2 to matrix1! + +[]matrix1.say; # Will print ((1, 1, 0), (0, 1, 1), (1, 0, 1)) + </code> + <text>If you want to do multi dimensional matrices then you can do:</text> + <code> +my [][]matrix = + (((1, 0, 0), (0, 1, 0), (0, 0, 1)), + ((0, 1, 0), (0, 0, 1), (1, 0, 0)), + ((0, 1, 0), (0, 0, 1), (1, 0, 0))); + </code> + <text>etc...</text> +</content> diff --git a/perl9.buetow.org/content/New-Features.sub/Random-Operator.xml b/perl9.buetow.org/content/New-Features.sub/Random-Operator.xml new file mode 100644 index 0000000..8e67ceb --- /dev/null +++ b/perl9.buetow.org/content/New-Features.sub/Random-Operator.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?> +<content> + <pagetitle>Perl 9 has a random operator</pagetitle> + <text>You probably know that Perl supports a lot of different operators. If you don't know which operator to use at the moment then just use the random operator (}}}}@.@{{{{).</text> + <code> +# Does something randomly with its two operands $foo and $bar: + +$foo (}}}}@.@{{{{) $bar; + </code> +</content> diff --git a/perl9.buetow.org/content/New-Features.sub/home.xml b/perl9.buetow.org/content/New-Features.sub/home.xml new file mode 100644 index 0000000..613321e --- /dev/null +++ b/perl9.buetow.org/content/New-Features.sub/home.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?> +<content> + <pagetitle>Perl 9 Feature List</pagetitle> + <text>Here are the most exciting new features offered by Perl 9 listed. Just click on the top menu on the desired feature and you will see the examples!</text> +</content> |
