1,154 karma · joined January 23, 2018
And why should that affect your decision to use or not use Raku? Isn't that ageism in its purest form? :-)
"I also take it as a given that we want to discourage misogyny in our community. You of the masculine persuasion should consider it an opportunity to show off your sensitive side."
from: https://github.com/perl6/mu/blob/master/misc/camelia.txt
Integrating Perl code in Raku can be done with the excellent Inline::Perl5 module (https://modules.raku.org/dist/Inline::Perl5:cpan:NINE). In fact, that efficiency of that module basically killed the "parse Perl code in Raku" project.
That being sad, you can integrate Perl code in Raku (using the Inline::Perl5 module), and vice-versa.
You appear to forget that the "Perl 6" initiative originally came from the Perl 5 Porters. It did not just come along and called itself "Perl 6": the "Perl 6" name was used because originally it was intended as the successor of Perl 5.
That it didn't materialize in time, that it became something much different, is something that happened later. But even with Pugs around 2005, Perl 6 was still the successor to Perl 5. Only around 2010, when the sister language concept was introduced, was Perl 6 considered to be a different language.
More generally, you can specify KEEP and UNDO phasers in a block, that will fire whether the block is left successfully or not. So a typical usage would be `UNDO $dbh.rollback`.
In the end it felt better to stop wasting all those emocycles and suggest a rename.
Agree. But it should be noted that the needs of a startup may not always make that easy. I'm personally responsible for transmogrifying an existing Perl ORM for a company, because it only supported a single database handle / class. Which is a pain when you're in a master / slave environment. This hack allowed the company to meet the performance challenges that came along each year by summer. It also allowed growing the company from ~35 people in 2004 to about 5000 people in 2012 (when I left).
It also froze the version of the ORM in question, until it got rewritten from scratch at great expense. But that expense could now be easily carried by the company.
react {
whenever signal(SIGINT) {
say "Aborted";
done;
}
whenever Promise.in(3) {
say "Timed Out"
done;
}
}
say "Goodbye";
This little program will wait for you to press Control-C or 3 seconds, whichever comes first. And say "Goodbye" on the way out.Historically, smart match in Perl was "stolen" from the ideas of Perl 6. Perl 6 (now named Raku https://raku.org using the #rakulang tag on social media) learned from the problems found in Perl, and changed its smart-matching model from symmetric to asymmetric. Basically, `a ~~ b` is syntactic sugar for `b.ACCEPTS(a)`. By transferring the responsibility for what smart matching means to an object of a given class, made it possible to make much more sane default behaviour, as well as allowing authors to define their own smart-matching behaviour for custom classes.
raku -e 'say "2019-03-12".Date + 366'
2020-03-12Junctions autothread. What does that mean? Using a Junction as an ordinary value, will cause execution for each of the eigenstates, and result in another Junction with the result of each of the executions. An example:
# a simple sub showing its arg, returning twice the value
sub foo($bar) { say $bar; 2 * $bar }
# a simple "or" junction
my $a = 1 | 2 | 3;
say foo($a); # executes for each of eigenstates
# 1
# 2
# 3
# any(2, 4, 6)
Documentation: https://docs.raku.org/type/JunctionBet taken. With the current rate of Perl's decline, I think that's a very safe bet to take.
> I'll be 70, I think you'll be in your 80s.
I know I'm an old hack, but not that old: I'll be 73 for 98% of 2030.
BTW, now that Perl 6 has been renamed to Raku, you can drop the "5" from "Perl 5", and just call it "Perl". Saves on typing!
Re: learning Perl: by all means, but don't let that stop you from learning Raku as well.