News for hackers. Stuff that matters.
Re:Perl 6 is fun by nickysielicki on Monday November 30, 2015 @12:04PM (#10650392)
What exactly don't you like about the way they did the versioning?

Do you prefer what python did? Python 2 vs. Python 3 is a complete and utter mess. Perl, which exists mostly in the same use case, shouldn't have any of those problems.

Re:Perl 6 is fun by cname on Monday November 30, 2015 @12:20PM (#10650512)
> Python 2 vs. Python 3 is a complete and utter mess.

Besides being off topic and adding no value to this thread, for those of us who made the transition to Python 3 with minimal fuss, this is just pure hyperbole. I really wish people would quit grinding their Python 2/3 axes.

Re:Perl 6 is fun by nickysielicki on Monday November 30, 2015 @12:25PM (#10650539)
Are you joking? Off topic? He made a comment about perl doing a poor version transition, and perl was largely replaced by python which also did a language transition. It makes complete sense to bring up python2 -> python3.

I also made the transition to `#!/usr/bin/env python3` fairly smoothly. That doesn't mean that the majority of the community did. Python3 came out in 2008, next week will be seven years of it being out. Yet `#!/usr/bin/env python` still defaults to python2[1]. That's not quite the expected 5 years of transition that they hoped for. At year 5 it looked like this [2].

[1]: http://legacy.python.org/dev/peps/pep-0394/

[2]: https://web.archive.org/web/20131204094939/http://python3wos...

Re:Perl 6 is fun by kbenson on Monday November 30, 2015 @12:54PM (#10650688)
On the short list of places where even those tired of hearing about Python migration problems have to admit the discussion is relevant, I have to imagine the Perl 5 to Perl 6 discussion qualifies.
Re:Perl 6 is fun by hahainternet on Monday November 30, 2015 @01:06PM (#10650737)
I've no idea why you were downvoted. Python is indeed going through an almost identical transition, except that 3 does not fix as much as 6.
Re:Perl 6 is fun by doktrin on Monday November 30, 2015 @02:09PM (#10651071)
> except that 3 does not fix as much as 6

On the logical flipside, 3 also doesn't alter nearly as much as 6. It was intended (and largely functions) as an iteration - not a backwards incompatible re-write.

It's not an irrelevant comparison, but I feel like it's an overstated one.

Re:Perl 6 is fun by hahainternet on Monday November 30, 2015 @02:13PM (#10651088)
You're not wrong, but what I'm trying to hilight is that this transition to a compatible iteration is still ongoing nearly a decade later.
Re:Perl 6 is fun by Scarblac on Monday November 30, 2015 @01:48PM (#10650953)
Python 3 fixes a few things, mostly in Unicode handling. What I've seen of Perl 6 looks like a new language.

The main "problem" of the Python transition is the fact that Python 2.7 is so good.

Re:Perl 6 is fun by hahainternet on Monday November 30, 2015 @01:55PM (#10650993)
Perl6 is absolutely a new language. Perl 5 had so many structural problems it was deemed unlikely they'd be solved. Since then however lots of hard work has been done on every side.

The biggest problem about Python is not the superiority of 2.7, it's the hubris of the Python community to think that 2.7 is actually that great.

I would send any Python programmer on a course of writing Golang and Perl 6 and I would put money on the line they would come out a better programmer. That's what I feel happened to me to some extent.

Re:Perl 6 is fun by Scarblac on Monday November 30, 2015 @02:27PM (#10651172)
I mean good compared to Python 3 -- for years, all I heard was "what is so much better in Python 3 that I should switch?". Comparing against other languages usually isn't all that relevant as no company is going to move over all their code. Since a year or so, everybody is moving to Python 3.

And for the last years, we've had the bliss of a stable programming language. So much in open source constantly brings out new versions that you have to keep your stuff compatible with all the time.

Re:Perl 6 is fun by jonesb6 on Monday November 30, 2015 @02:37PM (#10651237)
Your last part is spot on for me. Writing Golang indeed made me a better Python programmer.
Re:Perl 6 is fun by effie on Monday November 30, 2015 @07:27PM (#10652897)
That sounds interesting. Could you share some details? Which parts of Golang reveal so much about Python? I'm using Python and I'm thinking about getting more into some compiled languages of similar expressivity like Nim or Go.
Re:Perl 6 is fun by jonesb6 on Monday November 30, 2015 @08:13PM (#10653065)
When you have to implement things in a "large" language after writing a similar one in Go you'll find yourself coding with a very minimalistic set of objectives. It's a Go-flavored pythonism of sorts. Things like explicit error handling, concurrency, maybe even memory management, will make their way deeper into your work flow and thought processes then they did before, especially if the language you are now using doesn't emphasize them to begin with.

It's this reason why I think learning as many languages as possible is a good thing. I can't imagine what'd I'd be missing out on if I was stuck programming Java 6 for a decade.

Re:Perl 6 is fun by dheera on Monday November 30, 2015 @02:33PM (#10651202)
python will always point to version 2 because version 2 syntax and version 3 syntax are mutually incompatible; one is not a subset of the other. Making python suddenly point to version 3 would break a huge number of scripts already out there, including numerous setup and configure scripts.
Re:Perl 6 is fun by kbenson on Monday November 30, 2015 @02:37PM (#10651231)
I remember Python 1 and Python 2 having this problem, it was done before, so it's not impossible it would be done again.
Re:Perl 6 is fun by dheera on Monday November 30, 2015 @03:02PM (#10651397)
Maybe. But those were the early stages of the language. Python 2 has huge amounts of industrial-scale deployment that many people would prefer not to break. There are also numerous systems in deployment that need to have 2 and 3 running simultaneously on the same machine.
Re:Perl 6 is fun by kbenson on Monday November 30, 2015 @03:11PM (#10651436)
> There are also numerous systems in deployment that need to have 2 and 3 running simultaneously on the same machine.

There were numerous systems that needed both 1 and 2 in the Redhat ecosystem. I agree it likely won't happen again, but mostly because the Linux distros have likely learned their lesson. It's the package managers and Linux distros with included system functionality written in some version of Python which have the ultimate say, and there are much better solutions for the problem now than when Python 2 came out. That said, it's possible some distro will make /usr/bin/python be Python 3 and /usr/bin/python2 be Python 2, if they haven't already. Weirder stuff happens all the time.

Re:Perl 6 is fun by nickysielicki on Monday November 30, 2015 @05:09PM (#10652256)
Ubuntu 16.04 plans for this: https://blueprints.launchpad.net/ubuntu/+spec/foundations-x-...

Arch linux already has.

Re:Perl 6 is fun by kbenson on Monday November 30, 2015 @05:20PM (#10652311)
I imagine /usr/bin/python will be Python 3 then. The cycle continues.
Re:Perl 6 is fun by takeda on Monday November 30, 2015 @04:10PM (#10651801)
I have yet to write a code where I was unable to make it work on both py2 and py3.
Re:Perl 6 is fun by jlarocco on Monday November 30, 2015 @01:25PM (#10650823)
As a former Perl user, and a current Python user (though less lately), I very much prefer the Python transition.

I might be an exception, but I've had very few issues with the Python2 to Python3 transition. Python3 made the language more consistent, made a lot of little things simpler and easier, and added several features that makes using it generally more straightforward than Python2. It's essentially the same language, with warts removed. Library support lagged a bit, so on the odd occasion I need an old library, I just use Python2. Both versions can coexist on the same system, so it's not a big deal.

More relevant, though, Python3 was announced and then released when they said it would be. Some parts of the library community dragged their feet with support, and in a lot of cases they were replaced with even better libraries. The important thing is that the language was out and people could use it, and everybody's on the same page that Python3 is the future of Python.

The Perl transition has been a total mess in comparison. Perl6 is not just removing the warts from Perl5, it's an entirely different language. It's been "right around the corner" for almost 15 years now, and as far as I can tell, still isn't released. And good luck porting 25k CPAN modules to a completely new language.

To put it another way, in 15 years Perl6 has gone from announced to still not existing, while in 8 years Python3 was announced, released, and has had vast parts of its library ecosystem have been ported. Seems hard to believe anybody would say the Perl6 transition has gone better.

Re:Perl 6 is fun by hahainternet on Monday November 30, 2015 @01:33PM (#10650872)
> As a former Perl user, and a current Python user (though less lately), I very much prefer the Python transition.

So should anyone, as it changes only minimal sections of the language. It may remove warts, but in my eyes it re-adds many. I never had typing issues with dictionary keys being strings vs ints in Python 2. I do however have to suffer from that in Python 3.

The fact is, Python 3 barely fixes /any/ of the fundamental problems with Python 2. After writing a little Go and coming back to Python i couldn't believe how little static checking there is, for example.

Another example for you, I have functions which take named parameters, but one of those named parameters I need to be a list.

If it's not a list, python's 'for x in y' will split the string and provide a character based loop. If it is a loop it will split based on loop elements.

This means that I have to have a bunch of isinstance checks wrapped around things and provides no safety whatsoever as I would have to exclude all types other than arrays to even begin to have any rigor.

I don't think Python 2 or 3 is a bad language, but 3 fixed only some of the most superficial issues with 2 and still the transition is ongoing after 8 years. You're glossing over how much of a mess it's been and how much it will continue to be.

Re:Perl 6 is fun by jlarocco on Monday November 30, 2015 @02:35PM (#10651218)
I'm not glossing over anything, I was relating my experience, and I've had very few issues.

I don't even see what your complaints have to do with the Python2/3 transition. Python isn't a statically typed language, so obviously Python3 isn't going to fix badly written code with type errors.

Regardless, if Python2 to Python3 has been a mess, clearly Perl5/6 has been an even bigger mess because they haven't even managed to release the interpreter, much less start moving to it.

Re:Perl 6 is fun by hahainternet on Monday November 30, 2015 @02:49PM (#10651310)
> I'm not glossing over anything, I was relating my experience, and I've had very few issues.

I wasn't trying to imply you're intentionally glossing over things, just that the situation isn't as simple as your post made out.

> I don't even see what your complaints have to do with the Python2/3 transition. Python isn't a statically typed language, so obviously Python3 isn't going to fix badly written code with type errors.

Perhaps I'm wrong, but these errors only seemed to occur in 3, and I've read elsewhere it introduced additional 'hidden' type constraints.

> Regardless, if Python2 to Python3 has been a mess, clearly Perl5/6 has been an even bigger mess because they haven't even managed to release the interpreter, much less start moving to it.

Perl 6 isn't really an interpreter, and the same sort of transition is very unlikely to occur. It essentially is an entirely different language that's just very perl-y.

Re:Perl 6 is fun by kamaal on Monday November 30, 2015 @06:23PM (#10652619)
>>clearly Perl5/6 has been an even bigger mess

The migration path from Perl 5 to 6 is like going from C to C++ or D. Basically there is no 'migration path'. C didn't go away after C++, neither did the whole rewrite C applications to C++,Perl 5 is not going to go way after Perl 6.

>> because they haven't even managed to release the interpreter, much less start moving to it.

They released a beta and production release is coming out this christmas.

Clearly you have a lot catching up to do.

Re:Perl 6 is fun by jlarocco on Monday November 30, 2015 @07:53PM (#10652991)
> Clearly you have a lot catching up to do.

TBH, I'm not planning on catching up. I skim through the Perl6 articles that get posted here to see how things are evolving, and AFAICT Perl6 doubled down on all the Perl5 features I liked the least. More "magic"; more arcane symbols and operators; more context aware variables, syntax and semantics; etc.

Re:Perl 6 is fun by grondilu on Monday November 30, 2015 @01:43PM (#10650927)
> And good luck porting 25k CPAN modules to a completely new language.

It will be possible to import most Perl 5 modules with the 'use v5;' feature.

Re:Perl 6 is fun by cygx on Monday November 30, 2015 @02:24PM (#10651158)
That use case is actually handled by

    use Inline::Perl5;
    use Foo:from<Perl5>;
I can imagine for Inline::Perl5 to eventually end up as a core module like NativeCall, but that's just speculation on my part.
Re:Perl 6 is fun by grondilu on Monday November 30, 2015 @02:36PM (#10651227)
Oh yeah, the correct syntax will indeed be 'use Foo:from<language>;', where 'language' does not have to be Perl 5 (could be C, Java, python...). I'm not sure you need the Inline::Perl5.

I don't think it's implemented yet, and I doubt it will be for Xmas. But it will eventually.

Re:Perl 6 is fun by cygx on Monday November 30, 2015 @02:42PM (#10651268)
I'm not sure you need the Inline::Perl5.

You do, currently.

I don't think it's implemented yet

It is - nine's Inline::Perl5 module has been around for a year or so.