Tom Wyant
Recent Actions
-
Commented on “Let Maintainers Be Maintainers”
True. I have heard programming compared to brain surgery. If that's true, maintenance programmers do brain surgery on American football quarterbacks during the Super Bowl, and it's the programmer's fault if the team loses....
-
Commented on Response header name ' Content- type' contains invalid characters, after running a Perl_CGI script.
Sometimes just explaining a problem you can't figure out enables you to figure it out. Strange, but true....
-
Commented on ChatGPT for Perl Learning
Well, if normalize all values to arrayref means what I think it does (i.e. $hashref1->{$item} = \@values;), that line in ChatGPT's code is buggy, and goes out of its way to be so. But given the notorious difficulty of transcoding...
-
Commented on Ordering Your Tests
P.S. The HARNESS_OPTIONS thing should work on whatever tool chain you use, because it acts directly on TAP::Harness....
-
Commented on Ordering Your Tests
I see your point. A test suite should succeed regardless of the order in which tests are run. Individual test files should be independent, I think of them as independent, and I will see about periodically testing in parallel. The...
-
Posted Ordering Your Tests to Tom Wyant
By default, the
test
actions of bothExtUtils::MakeMaker
andModule::Build
test -
Commented on Outstanding GitHub Items
Your comment was not understood as discouragement, but a huge and welcome trove of additional information....
-
Commented on ChatGPT suggests new keywords for Perl
Verrrrrry interesting. I understand yield to call for something like an iterator. You can do this in Perl now, but I would be curious to know details. The most thought-provoking (to me at least) was dataclass, which I understand to...
-
Commented on Outstanding GitHub Items
About seven years ahead, in point of fact, not to mention in greater detail. Oh, well, the point bears repeating for those of us who are a bit slow....
-
Posted Outstanding GitHub Items to Tom Wyant
Recently I received a bump on a GitHub pull request. This surprised me, because I was unaware of anything outstanding. I was even more surprised when I discovered that the distribution in question also had two open issues, one dating back about three months.
I have no idea why I was oblivi…
-
Posted Annotated Test2::Tools Index to Tom Wyant
I have very gradually been adopting Test2::V0 as a testing tool. I had a test file that performed a group of tests inside a
for
loop, and discovered there were circumstances where I wanted to skip an iteration.… -
Posted My Favorite Modules: PerlIO::via to Tom Wyant
OK, I confess: PerlIO::via is not a module that I use every day. It allows you, easily, and with minimal code, to modify an I/O stream before it gets to the reader of the stream. or after the writer has written…
-
Posted Regexp Delimiters to Tom Wyant
Perl lets you use almost anything as a regular expression delimiter. It is usual to use punctuation of some sort, but characters that match
/\w/
can be used provided there is white space between the operator and the delimiter:m X foo…
-
Commented on PSA: Changing your b.p.o password is recommended
Done. Thanks. Note that I had no luck using the "Edit Profile" page accessible from the initial log-in. I hit "Post", (which required a second login with the same password), and then had no trouble....
-
Posted Making GitHub CI work with Perl 5.8. to Tom Wyant
A while back. I got a pull request from Gabor Szabo adding a GitHub action to one of my distributions. I have been working with this, but have not (so far) blogged about it because, quite frankly, I am still not sure I know what I am doing.
One of my personal desires was to test my distrib…
-
Commented on New feature: HTTPS support
Thanks! Not only that, but it displays correctly under Firefox. Well done!...
-
Commented on On interpolating stuff into pattern matches
Thank you for clarifying a point I, at least, found obscure. And for making this a top-level post, which it deserves to be....
-
Posted Match Anything, Quickly -- Revision 1 to Tom Wyant
O wad some Power the giftie gie us
It wad frae mony a blunder free us,
An' foolish notion: ...My previous blog post, Match Anything, Quickly, brou…
-
Commented on CPM0 frl-plugin:perlscript: ERROR: 'times' trapped by operation mask at /usr/lib64/perl5/B.pm line 183.
blogs.perl.org tends to be a blogging platform, not a help platform. You might try over on Perl Monks. You might get better response there if you post something more informative than "I get this error. Why?" The Perl Monks node...
-
Commented on Match Anything, Quickly
Boy, am I embarrassed. Thanks for picking up on the missing /smx. I did proofread, but obviously not enough....
-
Posted Match Anything, Quickly to Tom Wyant
Revision: that Cincinnati Perl Mongers found an error in the benchmark script used for this post. Match Anything Quickly - Revision 1 discusses their findings and links to a revised benchmark script.…
-
Commented on Numeric Variable Names With Leading Zeroes
Published Perl::Critic::Policy::Variables::ProhibitNumericNamesWithLeadingZero. I figured when the lead article of this week's Perl Weekly alludes to it I kind of have to....
-
Commented on Numeric Variable Names With Leading Zeroes
The policy is valid as far as I know. No false positives, at least. My bias toward non-publication (beyond GitHub) is because it does not address a current problem, and it appears to me that the single instance of this...
-
Posted Numeric Variable Names With Leading Zeroes to Tom Wyant
Over on the p5p mailing list, a user raised the issue that use of variable
$00
is an error starting with Perl 5.32, and asked that this "regression" be fixed.I have alw…
-
Commented on Sorting Subroutine Results
There are two cases that the compiler needs to distinguish between: Specifying a user-provided function as a comparator for the sort, and Calling a function and then sorting the list returned by that function; The Perl compiler assumes the former....
-
Commented on Sorting Subroutine Results
My list came straight from perldoc -f sort, so maybe a pull request on perlfunc.pod is in order?...
-
Posted Sorting Subroutine Results to Tom Wyant
The Perl
sort
built-in is mostly (at least by me) called assort LIST
orsort BLOCK LIST
. But there is a third way to call it: -
Commented on Scalar Context: Lists Versus Arrays
I do not know about old time usefulness. If it was, it was before I started using Perl, and that was at about version 5.6. Honestly, I think of this list behavior as Perl weirdness, and have no idea why...
-
Commented on Scalar Context: Lists Versus Arrays
Quite right. The only reason I can think of for not short-circuiting in scalar context is if the extra data returned in list context need to be computed anyway....
-
Posted Scalar Context: Lists Versus Arrays to Tom Wyant
For a long time after I first encountered Perl, I looked on "list" and "array" as essentially interchangeable concepts. A list was simply the source construct corresponding to an array. This idea is mostly correct. But as they say, the devil is in the details.
One of the d…
Comment Threads
-
Randal L. Schwartz commented on
ChatGPT for Perl Learning
Here's what bing chat (itself a cousin of ChatGPT) had to say about your opening paragraph, and I agree:
Using ChatGPT to generate Perl code can be a useful strategy for some people. It can help generate decent Perl code if given good instructions. However, it's important to note that it may make some mistakes and the generated code should be reviewed for accuracy and correctness. Ultimately, whether this is a good strategy for learning Perl depends on the individual's learning style and goals.
-
Dimitrios Kechagias commented on
ChatGPT for Perl Learning
If you don't already know what you are doing, ChatGPT can be very misleading. It's designed to be the world's greatest bullshitter after all.
> ChatGPT, can you give me a regular expression that matches a repeating pattern of two characters that are different from each other?> Certainly! The regular expression that matches a repeating pattern of two characters that are different from each other is:
(\w)\1
Explanation:
(\w) matches any word character and captures it as the first group.
\1 matches the exact same character as the one captured in the… -
vkavalov commented on
ChatGPT for Perl Learning
Perl is like the sharp guy in the back office who can solve any problem fast and efficiently. Doesn't care about the "fashion du jour" - just what works and is efficient. And then are the "me too"s, who spent their time sensing the daily winds and making sure they are sexier than the next one. And that's how they win the hearts and minds of the most young and superficial minds. But every now and then there is a "fashion" that is the real thing and somehow perl made a few bad bets.
… -
Dimitrios Kechagias commented on
Response header name ' Content- type' contains invalid characters, after running a Perl_CGI script.
I would note that posting something like this on https://stackoverflow.com/ and tagging it with #perl will get you helpful feedback quite quickly.
-
Sven Willenbuecher commented on
Ordering Your Tests
Don't know if it is allowed to ask questions here. I am looking for a way to tell EU::MM to shuffle test scripts. An even more challenging setup would be to always execute load.t (bails out test suite run if a module cannot be loaded) first and shuffle only the remaining test scripts.
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.