Skip to main content

Search

Items tagged with: Perl


#TodayIAchieved a faster implementation of named parameters to extended subroutines via my `Sublike::Extended` #perl module.

Not yet on CPAN until I've given it some more thorough testing to satisfy myself that it's stable and robust, but already it's showing good signs. Subs written using this are now over 30% faster than the equivalent plain perl approach using a slurpy hash.

The speed benefit on top of the existing "it's much shorter and neater to read" that it already had.


Company contacted me a while ago. Their only #Perl dev retired, can't find anyone local, and have a huge codebase to maintain. Too far to commute; they don't allow remote.

They tried again a few months later. Still must be onsite, they can't find anyone, won't pay for relocation. Oh, and it's a junior dev salary.

Months later and they're reaching out to me again. Must be onsite, underpaid, and no relocation.

The definition of insanity is ...

#perl


DBI has been the #Perl #programming language’s standard #database interface module since October 1994 when it was released coincident with version 5.000 of the language. Like Perl itself, it has continued to be a model of #OpenSource development and support.

https://fosstodon.org/@metacpan/113074361244015803

Prior to #DBI’s adoption, programs needed a bespoke compiled Perl 4 for any particular database system (e.g., #Informix, #Oracle, #Sybase). DBI provided a unified API for application and database driver developers.


A new release of DBI went live today.

https://metacpan.org/pod/DBI



Checking if standard input via pipe is available, re: How to Test For Empty Piped Input https://perlmonks.org/?node_id=11161507

#Perl
use v5.36;

-p *STDIN{q/IO/}
or die qq[No standard input pipe, exiting ...\n] ;

process( *STDIN{q/IO/} );
exit;

sub process( $source )
{
while ( my $line = <$source> )
{
print qq[got: <$line>];
}
return;
}

#
Getting too many time outs there :phbbttt:🎰

#perl


@EndlessMason 1 is a special value that's different from anything else "forty-two". Also running code as script.pl never required a return value but always warned about useless use of constant because only modules use()d or files require()d were required to return a true value to indicate successful loading.
#perl


This "Useless use" message can be easily made by just having a statement with only a string literal inside. The message reads interestingly and rather high context -- meaning: readers need to learn at least a little bit about the concept of context in Perl programming language, to be able to understand that no words in that message are useless or void.

# perl x.pl
Useless use of a constant ("forty-two") in void context at x.pl line 3.

# cat x.pl
use v5.36;

"forty-two";

#perl
#context


@tbortels and as I once said in EFnet #perl like 30 years ago, I don't know if I have the skull for it. (I think my quote that ended up in the infobot purl actually said “EVERYBODY HAS THE SKULL FOR IT”)


Made a new release of colobus, my #Perl NNTP server that runs atop #ezmlm and now #Mlmmj mail archives. It’s only been 20 years since the last release. https://trainedmonkey.com/2024/08/27/surprise,_it_s_a_new_release_of_colobus_


Finally had enough of a certain huckster claiming he “wrote the #Perl compiler.” Let’s see if he loses his “chill.”

> I think @rurban might take issue with your use of the word “the.” And […] #RPerl […] compiles a bowdlerized modified dialect that resembles parts of Perl. (Or as you wrote, “RPerl stands for Restricted Perl”: http://rperl.org/faq.html#faq_what)
>
> It would be more honest to call it “NQPerl,” as in Not Quite Perl. And no amount of hype will change that.

https://www.linkedin.com/feed/update/urn:li:activity:7229183279067791360?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A7229183279067791360%2C7229224129747374081%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287229224129747374081%2Curn%3Ali%3Aactivity%3A7229183279067791360%29


Stuff I wrote 25 years ago still runs unmodified on recent #perl
#perl


On an upgrade streak at $work

I'm migrating a lot of #perl applications to 5.40 (released 2024-06-04)

Some of those applications were still running on 5.18 (released 2013-05-18)

The most I've had to change was some mis-feature that a third-party library deprecated and removed in the last few years. Everything else Just Works™

#perl


is my linux-kernel vendor tree a bit challenged in it’s logic - is it the mainline tree or do i not understand perl?

these two ifs do the same… right? and does perl do “do IF x” instead of “IF x DO”?

trying to get htmldocs out of my vendor kernel atm

#perl #linux #kernel


Fun project: a #memory manager for multi-lang applications (#c, #cplusplus #assembly #fortran) in which workflow management is done by #Perl. Currently allocates using either #perl strings or #glibc malloc/calloc. Other allocators #jemalloc coming soon.
https://github.com/chrisarg/task-memmanager


I’ve started building a thing. Not even close to done but thought this might be helpful to some people. #linux #ldap #software #perl

https://github.com/koreesmith/ldaputils


so apparently there are just, like, three different, but mostly compatible, implementations of JSON parsing in #perl? there's PP, there's XS that is faster because it's written in C, and apparently there's also some Tiny version that's more tolerant to non-standard data?
#perl


Messing with #Vicuna & #Perl. Ox99 = 153. Express 153 as hex and convert that into decimal. Reiterate.
153, 339, 825...
Not in the OEIS, obvs., but are there any patterns?

#Math


Hey, fellow software developers! Sometimes code passes your code bad data. Do you throw exceptions? Return false? Hope for the best? (YOLO)

Would love to hear your reasons why. And please share so other developers can weigh in.

#Developers #Software #SoftwareDevelopers #OpenSource #DivideByZeroAndConquer #Perl #Ruby #Python #Java #CSharp #NodeJS

  • Exceptions (71%, 81 votes)
  • Return values (23%, 27 votes)
  • YOLO (5%, 6 votes)
114 voters. Poll end: 1 week ago


@mjgardner There is a causal correlation between being a #perl user and writing enjoyable pieces.


The author is also writing a really well-written and entertaining #Perl #blog. Subscribed: https://blogs.perl.org/users/saif/


Pure #Perl terminal based simulations simulations for particle motion, cellular automata etc. using ASCII characters and also methods using Braille Characters
https://github.com/saiftynet/particles
#perl


Is Amazon::S3 a sane choice of S3 client to use for a #perl app? Looks like the others depend on Moose, would like to avoid that if possible. #askFedi


I accidentally discovered that's entirely possible to implement an entire blog as a #Perl one-liner

This is a terrible idea so I'm definitely going to keep expending it

#perl


“The ‘Go to Line’ panels will now disregard commas and periods in entered line numbers, because that's apparently a thing.”

A 20-user #BBEdit license costs US $1,199.80.

The #Perl programming language allows single underscores in numeric literals to aid readability: https://perldoc.perl.org/perldata#Scalar-value-constructors

Commas, dots, spaces, underscores, apostrophes, and even half- or thin spaces are used to group digits depending on the country and context: https://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping

It's a thing.


"The Perl 5 web application performance monitor"

"Application Performance Monitoring for Mojolicious and Plack apps"

https://slapbirdapm.com

#perl @perl @tag-perl #programming


@mcr314 `grep` have `--line-buffered` option.
In other cases `stdbuf` could help and yes, this can be a pain at times.
For #Perl scripts `$|++` or `$|=1` is a shorthand to turn off buffering on STDOUT.
Dunno for python.


The backwards compatibility of #Perl software is wonderful. That’s why it’s all the more jarring when you find a package that doesn’t work. This is the story of a 15-year-old bug that I managed to track down and, fortunately, resolve.

https://peateasea.de/fixing-a-fifteen-year-old-curve-fit-bug/

#perl


sub is_leap_year($y) {<br>    not $y % 2 ** 2 || $y % 4 ** 2 && not $y % 5 ** 2<br>}<br>

#perl

#perl


- In the regex section, include a blurb for "/r", "/a" & "/aa" flags.

- In the "sub" section, show the the version with signatures, stable since v5.36.

I was going to suggest addition of a blurb about try-catch(-finally), but even for v5.40 that is listed as "partly experimental" 😫
https://metacpan.org/release/HAARG/perl-5.40.0/view/lib/feature.pm#The-'try'-feature

#Perl

#perl


What do you think about making (me) a new version of this here https://learnxinyminutes.com/docs/perl/
(I like the way the most important features of a programming language are summarized)
where modern Perl features are explained (e.g. subroutine's formal parameters etc.)?

What else would you like to see in such a short introduction without wanting to include everything that has been available in Perl for some time?

#perl

#perl


@kevingranade @Uilebheist At some point, a penny drops.

"Oh! Why not just go all in with #perl? It is – after all – Open Source."


I dunno, maybe start by looking at the man page, which is mentioned along with the official #Perl web site when you run `perl -v` to see what version you’ve got?

> Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".
> If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page

#perl


Does anyone have a link to the canonical documentation on Perl string literals? I'm looking to understand all of the weird escaping syntax for special chars, hex chars, unicode chars, etc. DuckDuckGo isn't giving me any answers, except random StackOverflow posts that mention \x{...}.
#perl
#perl


I didn’t realize that was part of the official #GitHub Desktop package.

They’re gonna have an interesting time when #Apple makes good on its five-year-old deprecation of #Perl from #macOS: https://TidBITS.com/2019/06/25/apple-to-deprecate-scripting-languages-in-future-versions-of-macos/

#PHP and #Python 2.7 already got the axe.

Current macOS #Sonoma 14.6.1 ships with #Bash 3.2.57 (deprecated in favor of #Zsh), Python 3.9.6, Perl 5.34.1, #Ruby 2.6.10, and #Tcl 8.5.9, all of which issue deprecation warnings on startup.


As opposed to the greater evil of wrapping that one line in an even noisier and fork/exec/waitpid-happy #shell script? Just use #Perl for the whole shebang! (pun intended)


#GitHub #Desktop startup script - casting #Perl magic as the lesser evil. 😈


$ perl -E 'say "positive" if(shift() + 0 > 0)' "information"
positive
$ perl -E 'say "positive" if(shift() + 0 > 0)' "in formation"
$

LOL #perl

#perl


Thanks to a (my) mistake in a perl script, I just sent 240,000 rows of a database to one of our internal Slack channels.

As an individual message for each row.

lol

#perl #slack #oops


29 years ago, on 1995-08-16, #CPAN received its first module upload. Like #Perl, "it continues to flourish into its third decade thanks to a vibrant community of users and developers."

Celebrate the occasion with a weekend project to:

- upload a new distribution or a new release
- contribute to a project which keeps your solutions possible
- write a post about your favorite module
- thank, support, and hire the maintainers you depend on

Happy CPAN day, and happy hacking! How do you celebrate?


heh, i was on efnet #perl too then perl.org
#perl


I was primarily EFnet #perl and rarely #unix, and then was on irc.perl.org for quite a while before jumping to Twitter (RIP) and now back here, which feels kind of like a more modern IRC??


Dave Cross follows up on his previous post about deploying Dancer apps.

https://www.perl.com/article/deploying-dancer-apps-addendum/

#perl @perl @tag-perl #programming


OpenCage has been a generous sponsor of MetaCPAN for some time now. Co-Founder @freyfogle explains why OpenCage uses Perl and why supporting Open Source is important.

https://www.perl.com/article/why-we-sponsor-metacpan-opencage/

#perl @perl @tag-perl #programming


For $work I am currently forced to write some #PHP. I am not used to that and can probably be considered biased 😅

But I really have a hard time working on #PHPunit tests because I find many of its methods are not clearly documented. It seems to have loads of examples that help you getting into it but extending existing code is hard when you can’t look methods by name …

#Perl’s Test-Simple was always great and adopting its successor Test2 was a pleasure with its great docs! 🤩


I love Oxygen Not Included in the same way I loved learning #perl
#perl


My 20+ year old PhD #perl / #clang code that used swig does not work (because of my FAFOing with C). The perl part ( originally written in 5.6 and tested in 5.8) works just fine with 5.32


oh wow, this would be such a great addition to POD! #perl
#perl