|
|
Subscribe / Log in / New account

An interview with Larry Wall (LinuxVoice)

An interview with Larry Wall (LinuxVoice)

Posted Jul 19, 2015 15:20 UTC (Sun) by raiph (guest, #89283)
In reply to: An interview with Larry Wall (LinuxVoice) by rsidd
Parent article: An interview with Larry Wall (LinuxVoice)

For the sake of sane discussion let's go with your view that the overall interview topic was not Perl 6 despite the headline (quoted above).

Even if the article was not about Perl 6, would you at least be willing to acknowledge that in your comment contrasting Python with Perl in relation to a REPL (the one that ends "These days python is simply in a different universe from perl") you accidentally or deliberately excluded Perl 6 from consideration?

----------------------------------------------------------------

> (a) no need to shout

If that's deadpan humor, well done. :)

Let's use Perl 6 to ftfy:

>>> print tclc "PERL 6 HAS BEEN 15 YEARS IN THE MAKING, AND IS NOW DUE TO BE RELEASED AT THE END OF THIS YEAR. WE SPEAK TO ITS CREATOR TO FIND OUT WHAT’S GOING ON."

>>> Perl 6 has been 15 years in the making, and is now due to be released at the end of this year. we speak to its creator to find out what’s going on.

Unfortunately that doesn't quite work. The `tclc` function acts on a single string (converting the first character to title case, the rest to lowercase), which is great as far as it goes, but this fails to title case the "w" in the "we" at the start of the second sentence of the Linux Voice headline, so, switching to OO phrasing:

>>> "PERL 6 HAS BEEN 15 YEARS IN THE MAKING, AND IS NOW DUE TO BE RELEASED AT THE END OF THIS YEAR. WE SPEAK TO ITS CREATOR TO FIND OUT WHAT’S GOING ON.".split(". ")>>.tclc.join(". ").say'

>>> Perl 6 has been 15 years in the making, and is now due to be released at the end of this year. We speak to its creator to find out what’s going on.

Is that better?


to post comments

An interview with Larry Wall (LinuxVoice)

Posted Jul 19, 2015 17:04 UTC (Sun) by rsidd (subscriber, #2582) [Link] (3 responses)

Even if the article was not about Perl 6, would you at least be willing to acknowledge that in your comment contrasting Python with Perl in relation to a REPL (the one that ends "These days python is simply in a different universe from perl") you accidentally or deliberately excluded Perl 6 from consideration?
I was not aware that perl6 (a) was in production use (b) had a REPL. Good to know this. Regarding the universe remark, my python universe consists, in addition, of
  • ipython, including the notebook
  • numpy+scipy
  • matplotlib
  • cython
  • and occasionally other packages.
I have nothing against perl6 and will be happy if it has equivalents to all of the above, or will one day.

Note that the notebook interface these days (called JuPyter) is not python-specific: it works with R, Julia, Haskell, Ruby too. Note also that all of the above work fine with both python2 and python3. And they are just what I happen to use -- there are many vastly sophisticated python-based systems out there and nearly all of them have been ported to python3.

An interview with Larry Wall (LinuxVoice)

Posted Jul 19, 2015 23:59 UTC (Sun) by raiph (guest, #89283) [Link] (2 responses)

> my python universe consists, in addition...

Perl 6 was always supposed to interop with other universes in a friendly and intimate manner, including subsuming or being subsumed by other universes and using whatever bindings are available to get stuff done.

For example, with this class installed:

unit class Matplotlib;
use Inline::Python;
has $!py;
submethod BUILD() {
$!py = Inline::Python.new();
$!py.run('import matplotlib.pyplot')
}
method FALLBACK($name, *@x) { $!py.call('matplotlib.pyplot', $name, @x);

one can write:

use Matplotlib;

given Matplotlib.new {
.plot( ... a suitable data structure ...);
.ylabel('a string');
.xlabel('another');
.show;
}

Thus writing code in Perl 6 that uses Python libraries as if they were native Perl 6 libraries.

For a bit more explanation and discussion of this particular example see https://www.reddit.com/r/perl6/comments/399o82/python_mat...

I think this 3 minute video of the birth about a year ago of the Inline::Perl5 module (which was followed a few months later by Inline::Python, Inline::Lua etc.) is wonderfully heart-warming and technically impressive regardless of any like or dislike of the extremely complex looking Perl 6 code that it demonstrates: https://www.youtube.com/watch?v=m_Y-lvQP6jI&list=UU7P...

More generally, Perl 6 features, together with the Inline:: modules, already quite nicely package up cross-language data marshaling and function/method calling so that one can use Perl 6 data structures, functions, and objects via several other languages/run-times and vice-versa, sanely handling exceptions raised in the distinct run-times, and sub-classing, in Perl 6, classes defined in the other languages.

I've found this already works well in Rakudo for C (eg calling number crunching libs) and Perl 5 modules from CPAN. I've watched a video of a talk by Stefan about using Catalyst, a Perl 5 web framework, as if it were a Perl 6 framework. Aiui this intimate interop is fairly close for C++ and Java too, though I've no sense of whether the latter will be production grade ready or not by this Christmas.

An interview with Larry Wall (LinuxVoice)

Posted Jul 20, 2015 6:47 UTC (Mon) by rsidd (subscriber, #2582) [Link] (1 responses)

That's nice. It would be even cooler if the preceding periods weren't required (ie if you could just inline python code within the {} braces, maybe with an additional "inline" keyword or something -- I don't see why it should be harder to implement than what you've already done). But it looks to me like perl 6 is trying even harder to be a kitchen sink than perl 5. At the same time, even perl 5 users have a significant learning curve for perl 6. So I'll be a bit surprised if it really catches on -- but time will tell...

An interview with Larry Wall (LinuxVoice)

Posted Jul 20, 2015 22:59 UTC (Mon) by raiph (guest, #89283) [Link]

> It would be even cooler if ... you could just inline python code

Heh. It sounds like you're thinking you'd rather write code in python even if you were learning Perl 6. :)

But sure, you can do that. If you look at the original example you'll see the `run` method; you just call that with whatever code you want.

I don't think there's yet any way to use inline python using the sugar discussed in the design docs, which goes something like:

{ use Python:<2>; ... python code goes here ... }


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds