Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
fuck the mods
Mar 30, 2015

Hughmoris posted:

Thanks, that breakdown makes sense.


Anyone here working on any Perl projects? Anyone work with Perl for their day to day jobs? Anyone else currently trying to learn Perl? If so, do tell.

Don't use natatime to parse a Web::Scraper data structure. If you need some more example code you could take a look at https://github.com/ugexe/SomethingAwful--Forums/blob/master/lib/SomethingAwful/Forums/Scraper/Forum.pm

Web::Scraper is just a thin DSL for xpath, so if something isn't working the way you think it should its probably your xpath.

Hughmoris posted:

Thanks, that breakdown makes sense.


Anyone here working on any Perl projects? Anyone work with Perl for their day to day jobs? Anyone else currently trying to learn Perl? If so, do tell.

I use Perl5 and Perl6 for $work in sports analytics (lots of Web::Scraper stuff)

Adbot
ADBOT LOVES YOU

fuck the mods
Mar 30, 2015
I like it, it's just slow and the ecosystem is lacking (although active and growing). When Inline::Perl5 works you can even subclass perl 5 code and do stuff like
code:

    use Inline::Perl5;
    use DBI:from<Perl5>;

    my $dbh = DBI.connect('dbi:Pg:database=test');
    my $products = $dbh.selectall_arrayref(
        'select * from products', {Slice => {}}
    );

fuck the mods
Mar 30, 2015
What do you want to know about it?

fuck the mods
Mar 30, 2015

Hughmoris posted:

Just curious what people thought of it, and if you're currently using it for anything. I've rewritten a couple of small scripts for work in Perl 6, and I'm enjoying the language so far but I'm a beginner so I'm sure I'm just skimming the surface of the language.

I've got my share of gripes but I still like it. I also contribute to the core regularly and do some contract work with it.

Some of the good stuff:

Cross platform IO stuff (class IO::Path)

Threads/async stuff

Lazyness

NativeCall (no more XS hell)

Math stuff (although I can't comment much on this)

Dashes in variable names (also Unicode characters)

Grammars (To me this is the killer feature)

Essentially has its own version of Moose built in


Some of the bad stuff:

You can't pass data from an IO handle (Socket, File) from one thread to another (LOL. The reason is because it uses a scheduler per thread and libuv doesn't like that or something). So you aren't going to be doing much of stuff like handling web requests in one thread and reading them from another.

The first time a module is used it precompiles it so script startup time is slower the first time you run a script (a rather new thing from a rushed "upgrade" before release, which to me is unacceptable)

I guess the REPLs suck (I don't use them so I wouldn't know)

Flattening lists/arrays can sometimes be ugly and confusing for a beginner

The ecosystem (its full of XXX ported from Perl 5 !! without using idiosyncratic Perl6 [and usually without understanding the code they ported to begin with], the majority of other modules are just small things you'd probably prefer to write yourself due to the large feature set of the language itself, people putting authoring dependencies inside their depends due to bad advice from self promoters... I could go on here but im biased so i'll stop)

Slow, CPU/Memory use


The community could be seen as good or bad. You can easily talk to larry, and there are quite a few other people who are extremely knowledgeable that are usually available. At the other end theres an influx of users who know just enough to give themselves an ego larger than their skill level, so you need to do a lot of cutting through the noise of people promoting themselves instead of teaching (i've never seen so much "well I did xxx with my module yyy" when referring to every little thing"). All the core developers are great though.

I know its been like a million years since it was announced, but if it had just 1 more year I think it would have been for the best. The current release is called '6.c', and there are already breaking changes for a version '6.d' along with other breaking changes that need to be made. On the plus side there are some more features to be added that didn't make it yet (like the double pointed pipe operator; my @x = 1,2,3; my @y = 3,4,5; my @z; @x ==> @y ==>> @z)

fuck the mods
Mar 30, 2015
You could learn classes in Perl 6... you would start with less preconception/habits you've developed in perl while still being trivial to jump back into p5 with Moose

  • Locked thread