| Datum | 20 oktober 2010 |
|---|---|
| Tijd | 17:30 |
| Locatie | Schiphol-Rijk |
-Damian Conway’s Quantum::Superpositions talk at Schuberg Philis-
All things considered, Damians Conways ( http://damian.conway.org/ ) talk could be considered Yet Another Perl6 Promotion (YAPP), but a damn fun one. Highlighting some funky new features that Perl 6 makes happen, in constant time. Theoretically.
Conway is one of the best speakers I’ve seen so far. His talks have speed, passion, a big dose of absurd humor and loads of cool geeky references. If you have the chance to attend one of his talks: go see him, you won’t be disappointed. I promise.
The talks starts with a lighthearted refresh of the history of quantum mechanics, unexpected revelations about Bohrs activities in modeling and winter sports and so on. When the audience is under his spell Conway dives a bit deeper and shows many examples of Perl 6′s more natural syntax, and possible uses of superpositions. Showing how superpositions -called Junctions in Perl 6, are not just reserved for mad scientists. Junctions might be damn useful for programmers too; replacing contrived nested for loops with elegant code to generating prime numbers, testing list membership, doing string comparison, all the while letting Perl take care of parallelization automagically, in constant time. Theoretically.
A simple example showing the power of superpositions, in Perl 5, taken from the description page of Quantum::Superpositions.pm:
$ideal = any( all(“tall”, “rich”, “handsome”),
all(“rich”, “old”),
all(“smart”,”Australian”,”rich”)
);
Operations involving such a composite superposition operate recursively and in parallel on each its states individually and then recompose the result. For example:
while (@features = get_description) {
if (any(@features) eq $ideal) {
print “True love”;
}
}
The any(@features) eq $ideal equality is true if the input characteristics collectively match any of the three superimposed conjunctive superpositions. That is, if the characteristics collectively equate to each of “tall” and “rich” and “handsome”, or to both “rich” and “old”, or to all three of “smart” and “Australian” and “rich”.
Find a good description of the concepts here (http://search.cpan.org/~dconway/Quantum-Superpositions-1.03/lib/Quantum/Superpositions.pm#DESCRIPTION), and most of the examples used in his talk on here (http://search.cpan.org/~dconway/Quantum-Superpositions-1.03/lib/Quantum/Superpositions.pm#EXAMPLES) but you’ll miss the funky Perl 6 rewrites. Junctions are documented in the Perl 6 documentation here (http://perlcabal.org/syn/).
Start using Superpositions/Junctions in Perl 5 by installing the Quantum::Superpositions module from CPAN (http://search.cpan.org/~dconway/Quantum-Superpositions-1.03/lib/Quantum/Superpositions.pm). The module is currently maintained by Steven Lembark, and will only add the “any”, “all” and “eigenstate” operators. For a more up to date implementation with more junction operators and autothreading fetch Perl 6 by installing Raduko ( http://rakudo.org/ ).
Can’t wait until Conway returns for part II: Time::Space::Continuum!
Damian Conway
Damian Conway is een gevierd lid van de perl community en in die hoedanigheid actief betrokken bij de ontwikkeling van Perl 6. Hij is een veelgevraagd trainer en spreker op vele open source conferenties en heeft diverse bekende CPAN software modules ontwikkeld als Parse::RecDescent, Class::Contract, Class::Multimethods, Switch, NEXT en Quantum::Superpositions. Voor zijn bijdragen aan CPAN, heeft hij drie maal de Larry Wall Award gewonnen. Hij is tevens de auteur van verschillende boeken, waaronder ‘Perl best practices’ en ‘Significantly Prettier and Easier C++ Syntax’ en bekleed een positie als professor aan de Information Technology faculteit van de Monash University.



