Live data from Hacker News

Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

news.ycombinator.com

51–60 of 163 posts

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#51
post #11

I followed the development of perl 6 for a bit. I was quite impressed for a while, as Larry Wall disolved most of the warts, corner cases, and ad-hocisms of perl 5 into a language which was cleaner and more abstract. Then he used the cognitive space thus provided to load up the langauge with as many features as he could pack in, and I gave up on it.

>I followed the development of perl 6 for a bit.

To put it mildly.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#52

I'm the rare person who never used Perl 5 but is trying to learn Perl 6. I haven't progressed beyond very simple scripts, but it's interesting. I especially am interested in the grammars, so I'll try to find a task where I'd get to explore them. I have no plans to try and ship software written in it.

I'm in a similar boat. Many of the features make for great analysis language.

What do you mean by analysis? Text analysis? I'm curious what features drew you toward it.

Personally I think the optional typing looks interesting.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#53

So far I've used it for several small tools, including some that refactored code for other, larger projects. Grammars really make that pleasant.

Are any of those open source? I'd like to see grammars used in "real" code, not just examples.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#54
Perl6 looks like a great language. What Perl6 needs is a clear branding message which in most cases has to do to a clear use-case scenario. People need to know why do they need Perl6. In late 1990s and early 2000s Perl was CGI, which was dynamic pages on the internet.

What is Perl6 now?

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#55

Biased core dev here... I've used Perl 6 for IRC bots. The ease of writing parallel code, nice OO model, multi dispatch, and subsets make it very pleasant to do them in Perl 6. Here's a bot I wrote that listens for GitHub webhooks and reports new commits and PRs: https://github.com/perl6/geth and here's another one that's just a bunch of random features: https://github.com/zoffixznet/perl6-buggable/ I also heard peop…

Do you know what algorithm grammars use under the hood? I don't see it mentioned in documentation like this: https://docs.perl6.org/language/grammars

"Group of named regexes that form a formal grammar"

Are Perl 6 "regexes" as powerful as a context-free grammar? I guess they use the same kind of backtracking algorithm and ad hoc recursion as Perl 5? That is, does the algorithm for regexes differ from Perl 5, or only the syntax?

I think the syntax is a big improvement BTW.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#56
All of Oh By[1][2] is built on perl.

It's a very basic (primitive ?) CGI/perl design made performant with mod-perl, etc.

I started my career building shopping carts based on what I learned from _The CGI Book_ (and the web forum that sprung from it) ... 23 years later we're building a modern startup based on the same workflow.

[1] https://0x.co

[2] https://0x.co/hnfaq.html

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#57
post #31
post #29

Perhaps you should look at this two presentations first: https://media.ccc.de/v/31c3_-_6243_-_en_-_saal_1_-_201412292... https://media.ccc.de/v/32c3-7130-the_perl_jam_2

Looks like that's about Perl 5, not 6. (I am not going to watch such long videos without more info up front.)

The problems in that video are P5 centric. P6 is very different as far as how under the hood works

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#58

Perl6 looks like a great language. What Perl6 needs is a clear branding message which in most cases has to do to a clear use-case scenario. People need to know why do they need Perl6. In late 1990s and early 2000s Perl was CGI, which was dynamic pages on the internet. What is Perl6 now?

For me, Perl 6's "killer feature" is the same as Perl 5's: the ability to parse arbitrary textual data with relative ease. Perl 5's regex syntax ended up becoming probably the most common thereof (mostly by way of PCRE); I suspect Perl 6's "grammars" could do the same and serve as "the" syntax for PEGs.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#59
post #52

Earlier quoted context omitted.

I'm in a similar boat. Many of the features make for great analysis language.

What do you mean by analysis? Text analysis? I'm curious what features drew you toward it. Personally I think the optional typing looks interesting.

Gradual typing, grammars for parsing, writing your own operators for common tasks, FP style for one-liners...there are more, but I'll have to add later when not drawing a blank.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#60

I've been using it locally to write a few small scripts, nothing publicly available (yet). Traits and roles are really neat - they feel like a natural conclusion to what Ruby started building upon with respect to metaprogramming natural syntax and encouraging developer happiness over strictness. On the whole, however, many small parts of Perl 6 feel immature. There's no core JSON/YAML module, and there's no "official…

It sounds to me like you would like a "batteries included" version of Perl 6. (include JSON/YAML in the runtime)

No. We only include things as part of the language where the design of it is immediately obvious, and is useful for many applications. It also helps if it has been proven in other languages. So Promises(Futures) are in there, but many other things are not. You can do anything in a module, so write an external module for it instead.

Otherwise we would have the problems where the best module for the job is not in the runtime, but everyone uses the one that is in the runtime.

I have heard that Python has this problem with HTTP. Think of it like this, a module for doing X is included with the first version of a language. That means it is a module that was not written by an expert, because at that point in time there was no expert in the language. Everyone uses it though; as you don't have to install it, because it is already there.

We don't have an official module manager, because we want all of them to be equally as official as every other one. It is a good thing too; as most people in the know use zef currently, rather than panda. If we had one that was official, it would have been panda.

That's also why there is not, nor will ever be an official implementation. Any implementation that passes the test suite is just as official as every other one. (although there is only one currently)

Basically you are asking for things to be included, that are specifically not included for very good reasons. The way that this is dealt with is by using the idea of distributions like "Rakudo Star" for Perl 6, or "Strawberry Perl" for Perl 5 on windows. That is an implementation of Perl 6 along with a set of useful modules.

Post reply on HN