Live data from Hacker News

Perl 6 Optimism

p6weekly.wordpress.com

151–160 of 243 posts

Re: Perl 6 Optimism

#151

Perl Pessimism: https://trends.google.com/trends/explore?date=all&q=perl I have happy memories of Perl, and it started me on the path that led to a nice career of Python awesomeness. Thanks, Perl! That said, I can't imagine a plausible scenario where I'd ever consider using it again. I almost certainly wouldn't use it professionally because it's not exactly going to light up a resume. Yes, there are still Perl shops.…

As a former Perl programmer, dabbling in Python, I keep getting reminded how awesome Perl is. For example: I'm collecting some stats indexed by (small) ints. In Perl, I'd just say $collection[$index] = $stat; Try that in Python when $index is not received in order. Edit: Fixed typo; meant "$stat" and not "%stat"

     \%stat;

Re: Perl 6 Optimism

#152

Earlier quoted context omitted.

Is there anything "suspicious" about using Perl other than it's not as popular as Python, according to Google Trends?

No, there’s nothing inherently wrong with it. I’ve run across two distinct sets of Perl mongers, though: - “We have lots of deployed code and don’t want to rewrite the whole thing.” That’s valid (although I still urge them to consider the hiring challenges down the road). - “I’ve used Perl exclusively since I downloaded it over dialup and I’m not interested in those shiny new languages the kids like.” Run screaming.

I've never met a Perl developer who doesn't know and use other languages. By contrast it's much more probable that a "kid" writing Python or JavaScript has never been exposed to anything else.

When you say you wouldn't use Perl again, that's a fine personal choice, but has zero to do with the merits of the language or the people who use it.

Re: Perl 6 Optimism

#153
post #76
post #50

Earlier quoted context omitted.

> At best, it's a hack. Impressive, sure, but not something that you could rely upon. The same could be said for XS. And I do think that all of Perl 5 is relying upon that. > There's still no sane upgrade path here. FWIW, my blog post https://www.perl.com/article/an-open-letter-to-the-perl-comm... touches on that subject.

XS is the "same" hack all the time, though. A Perl library that can only be called in list context in Perl 6 is a substantial change from Perl 5. I've seen much smaller changes trash code bases before. I've got real code that would be affected by that. (I also think the context idea was a misfire in Perl That said, why is it impossible to call a Perl 5 function in scalar context? Shouldn't the equivalent of Perl 5's…

> why is it impossible to call a Perl 5 function in scalar context?

Has Stefan (who wrote IP5) said or written that it's impossible?

18 months ago he wrote "So far I've found 3 different ways to implement scalar/list context for method/function calls".[1]

He has left issue #31 open.[2]

Where did you read that it's impossible?

[1] https://irclog.perlgeek.de/perl6/2016-08-03#i_12961486

[2] https://github.com/niner/Inline-Perl5/issues/31

Re: Perl 6 Optimism

#154
post #40

I spent a huge amount of time in my 20's writing Perl 4 & 5 scripts. Even though I no longer use Perl, I still feel nostalgic about it. That said, I can't find any reason to pick up Perl 6 and start learning it. With so many other useful and interesting languages out there: Python, Elixir, Elm, Rust, etc... what appeal should Perl 6 have to the masses these days? Is anyone jumping into Perl 6 like they did with Ruby…

Actually, I've been looking at Perl 6 and I think it's quite amazing. It's really the only language outside those I get paid to work with that I've considered doing a deep dive on. I'm not really understanding the lack of love for Perl 6 unless it's from folks that have invested careers in Perl 5 and are miffed by the compatibility story. For example can someone point to the analog of this https://docs.perl6.org/lang…

> can someone point to the analog of this https://docs.perl6.org/language/grammars in Python, Ruby, Groovy etc?

Those language grammars, if they've been properly implemented, could be the Perl 6 killer feature if well promoted. It could even lead to a sudden fall in brogrammers using regexes to parse html.

Looking at the ranking of those languages you mentioned on Tiobe, i.e. Python (4.7%), Ruby (2.4%) and Apache Groovy (0.3%), I guess if Python 3 took the initiative and implemented them, that would work as well.

Re: Perl 6 Optimism

#155
post #103

Earlier quoted context omitted.

> Its modernity is measurable by the influence it had on most languages designed after its success, like Go and Swift. So you are measuring "modernity" by legacy? Also, I don't see any Python influence in Go and from the brief exposure I've had to Swift, I'd say there isn't much influence there either. By your axiom, one could argue that C is a modern language.

> I don't see any Python influence in Go Well, in Google's own words[1]: "Go attempts to combine the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C++". Some go datastructures are very python-like. Coming from a big Python shop, it's unsurprising. Chris Lattner mentions Python[2] as an influence among others. Swift's lists and dicts are…

What exactly is Python-like about the data-structures? What do they do that, say, Java's Maps and Lists don't do?

Re: Perl 6 Optimism

#156
post #113
post #8

Earlier quoted context omitted.

Pretty much. I used to use Perl 5 a lot but I never considered using Perl 6 and eventually moved on from the Perl ecosystem altogether. The huge advantage of Perl ~10 years ago was the massive amount of CPAN packages but in the meantime python & friends mostly caught up in my experience. Meanwhile the shiny new revolutionary Perl 6 took forever to release and when it finally did nobody cared anymore. Quoting Wikipedi…

One of the bigger features of P6 is that it can use modules written in other languages such as python.[1] Are you aware of the compatibility with Perl 5 that I mentioned in my prior comment in this thread? If so, why do you discount it? [1] https://www.perl.com/article/plotting-with-perl-6/

P5 also has inline python, but it's nowhere near as easy as using a native library.

Re: Perl 6 Optimism

#157

Earlier quoted context omitted.

I'd advise you to remain curious beyond what's good for your resume, especially if you want to stay sharp and ahead of the curve. Perl 6 has some neat features, particularly around grammars and parsing, that make those tools easier to use for day-to-day problems.

To be sure! I’m not allergic to Perl and I like seeing the cool new stuff going on there. But afterward, I prefer to take those learnings and apply them to work I’m doing in other languages.

To begin to transfer P6 grammar/parsing features or techniques to another language you'd have to bundle NQP and one of its backends. Does that sound worthwhile?

Also, how would you handle strings in this other language?

In P6 and its grammar engine, a string is a sequence of characters, where characters are defined as the thing a human thinks of as a character.

Almost all other languages have adopted either a byte or a Unicode codepoint as being equivalent to a character, both of which are really profound problems that are still not being confronted to this day.

For example, the draft docs for Python 3.7 don't even mention characters (by which I mean what a user thinks of as characters, not bytes or codepoints).[1]

[1] https://docs.python.org/3.7/search.html?q=grapheme&check_key...

Re: Perl 6 Optimism

#158
post #82
post #67

Earlier quoted context omitted.

On the flip side, being forced to use Perl always sucks. I mean it only as a half joke, unfortunately.

I would love to be forced to use Perl :) As a side note, "forced" often means "we have a lot of beginners here and they want to do Python".

Find a job maintaining some legacy code (there's plenty of it there). At which point you'll quickly realise that maintaining a complex perl program (particularly that someone else wrote) is painful. And the only remaining production perl programs are complex or they would have been rewritten.

Re: Perl 6 Optimism

#159

Perl Pessimism: https://trends.google.com/trends/explore?date=all&q=perl I have happy memories of Perl, and it started me on the path that led to a nice career of Python awesomeness. Thanks, Perl! That said, I can't imagine a plausible scenario where I'd ever consider using it again. I almost certainly wouldn't use it professionally because it's not exactly going to light up a resume. Yes, there are still Perl shops.…

As a former Perl programmer, dabbling in Python, I keep getting reminded how awesome Perl is. For example: I'm collecting some stats indexed by (small) ints. In Perl, I'd just say $collection[$index] = $stat; Try that in Python when $index is not received in order. Edit: Fixed typo; meant "$stat" and not "%stat"

[deleted]

Re: Perl 6 Optimism

#160
post #65
post #42

Earlier quoted context omitted.

Compared to Perl, the overall under-use of special characters and the forced indentation make it objectively more readable; there is a reason it's often compared to pseudocode. Age of release is a meaningless metric, btw. For starters, what Python was in 1991 is very different from what it was in the early 2000s, when it reached critical mass. Its modernity is measurable by the influence it had on most languages desi…

To me python and perl and two extremes. Perl is almost comical with its use of special characters (which they've embraced even more in Perl 6 with the optional use of unicode symbols in built-in operators) but python went too far the other way IMO. "It looks like pseudocode" sounds nice in theory but people don't typically write huge projects in pseudocode. I don't really like the significant indentation but my main…

> That being said I agree that these days the tendency across all languages is to go towards fewer special characters, not more. In this context Perl 6's syntax feels a bit anachronistic.

This is just a comeback of a recurring dumb trend based on the fallacy that describing the operations of a program using English words is always superior to using appropriate specialized notation. The core of the fallacy is assuming that because something looks like a familiar English word, people who do not understand programming will understand the corresponding semantics of the operation in the programming language, because they know English. Which is complete nonsense - people who do not understand programming will reason by analogy, and through trial and error end up at a partially wrong and misguided understanding of that operation. English words only start you off with unnecessary baggage in the learning process.

It is even worse for people who already know programming. A C for loop is not a JavaScript for loop is not a Python for loop... The details of their semantics are very different, and you will introduce bugs if you just assume "I know how for loops work!"

There is nothing new about this trend either; it was the central premise behind COBOL, and a big motivation for BASIC. What BASIC was in the 1980s, Python is today.

What is ironic about this trend resurfacing today is that it has never been easier to use special characters - Unicode is everywhere, and even making custom keyboards has turned from a major manufacturing endeavor to an accessible hobby: https://www.youtube.com/watch?v=uk3A41U0iO4

Post reply on HN