Masthash

#Perl

John Bokma
10 hours ago

Scalable CSS, How Regexes Work, and Adding Python types

#css #RegularExpression #perl #python

👉 Please retweet if you ❤ Plurrrr. Thanks! 👍

https://plurrrr.com/archive/2022/11/12.html

AskUbuntu
19 hours ago

Unable to install php8.2-dev on ubuntu 20.04 #2004 #php #perl #autoconf #automake

https://askubuntu.com/q/1487128/612

Michael Miller :blobrdm:
1 day ago

@JordiGH this is like what started me on #Perl.

The oreilly #regex book used Perl in the examples so I thought Perl was how one used regexes

Granted, Randall didn’t do me any favors with this comic https://xkcd.com/208/

Rihards Olups
1 day ago

#Perl SDK for #AWS is called "Paws".
Hehe. Hehehe.

https://metacpan.org/pod/Paws

smxi
1 day ago

@Codeberg A core requirement of #inxi is that it always works on everything, going back to about 2005-2008. The only hard requirement is #Perl 5.008 or newer. inxi is in #Debian sid, which can be accessed via pinning to stable and adding sid sources, or you can just replace inxi package with inxi files, there's no difference really. Each new inxi tends to have a lot of new stuff, and new hardware etc support.

Francesco P Lovergine
2 days ago

Moving from a #Python -based codebase to a #Perl -based one to download Copernicus images, I found a reduction of the VIRT memory from about 7GBs to about 2GBs and from 2 threads to whatever I like. The Python code base uses sentinelsat and homura packages for REST downloads from the #copernicus service. I wonder how this difference in memory footprint could be justified. 🤔

Mark Gardner ‍:sdf:
2 days ago

@wh0x3r It’s not too surprising. #Perl and #Python grew up together, and #PHP’s syntax was inspired by Perl’s.

Greg
2 days ago

I write an awful lot of .pbm/.pgm/.ppm files when doing image extraction or creation with #Perl - it's just about the simplest possible image format (header w/ type, width, height, then just blast the pixel values), and then is easily fed to the NetPBM tools to turn it into something else like a .png.

.PAM files are "newer" (~2000) and support alpha channels and >8 bit channel depth. pamtopng does exactly what it says in the name, but I have to build it from scratch first!

https://en.wikipedia.org/wiki/Netpbm

AskUbuntu
2 days ago

Bash script does not recognize commands (Perl and Python scripts) #bash #scripts #python #perl

https://askubuntu.com/q/1486952/612

Mark Gardner ‍:sdf:
2 days ago

@perigrin @nuddlegg @clf Come on now, this is the Internet, where #Python is new and hip and #Perl is old and busted. Never mind that #Perl5 with #OOP was released nine months *after* Python 1.0.

Mark Gardner ‍:sdf:
2 days ago

@lemorin I can't speak for anyone else, but I follow the #Perl hashtag and my #Mastodon client @MonaApp has a "Translate" button

Screenshot of a Japanese Mastodon post that reads, “For some reason, even though the Perl post is in Japanese, it is quickly captured by people from other countries. #perl”. The “Translate” button in the Mastodon client application is indicated with an arrow.
T Alex Beamish
2 days ago

Today I figured out how to create an SPF record and get it added to my domain's DNS entry so that I can send E-Mail from a #Perl script running on my local workstation.

Some days I worry I have Imposter Syndrome, but today is not one of those days. :) #win

Mark Gardner ‍:sdf:
2 days ago

@Perl Here is a find + #Perl command for #macOS that will check which installed #Electron-based applications have not yet been updated against this month's #libwebp #CVE20234863 #security vulnerability: https://social.sdf.org/@mjgardner/111126922716051872

Other apps may be vulnerable, this just checks the Electron ones!

It uses the built-in https://perldoc.perl.org/version API for parsing and comparing version numbers.

AskUbuntu
3 days ago

BASH script does not recognize commands (perl and python scripts) #bash #scripts #python #perl

https://askubuntu.com/q/1486952/612

Please do not use the #ASCII grave accent (0x60) as a left quotation mark together with the ASCII apostrophe (0x27) as the corresponding right quotation mark (as in `quote'). Your text will otherwise appear rather strange with most modern fonts (e.g., on #Windows and Mac systems). Only old X Window System fonts and some old video terminals show ASCII 0x60/0x27 as left and right quotation marks, while most modern systems follow the ISO and Unicode standards instead. If you can use only ASCII’s typewriter characters, then use the apostrophe character (0x27) as both the left and right quotation mark (as in 'quote'). If you can use #Unicode characters, nice directional quotation marks are available in the form of characters U+2018, U+2019, U+201C, and U+201D (as in ‘quote’ or “quote”).
If you work in an environment where the UTF-8 encoding is already used everywhere (e.g., Plan9 and most modern GNU/Linux installations), you could even decide to use proper directional quotation marks, as in ‘quote’ or “quote”.

Check your source code directories with

grep \` *
to find out, where modifications are necessary. Then use (with proper care!) something like

perl -pi.bak -e "s/\`/'/g;" file1 file2 ...
to make the necessary substitutions automatically, or make the edits manually instead.

The use of 0x60 (grave accent) as a special control character in the Unix shell (to denote command substitution as in command or better $(command)), in #Perl, in #Lisp, or in #TeX/troff (to denote a proper left single quotation mark) does not have to be changed and remains unaffected
https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html

wlmb
3 days ago

#Perl @PerlWChallenge 236 Task 2: Array Loops
#noxp
```
perl -E '@i=@ARGV;for(0..@i-1){next if $s[$n=$_]++; while($n<@i){
last if $s[$n=$i[$n]]++;} ++$c if $n==$_;} say "@ARGV -> $c";
' 4 6 3 8 15 0 13 18 7 16 14 19 17 5 11 1 12 2 9 10
```

wlmb
3 days ago

#Perl @PerlWChallenge 236 Task 1: Exact Change
#noxp
```
perl -E '
@i=sort {$a<=>$b} @ARGV; $s=1; for(@i){++$b{$_}; $o=$_-5; for(10,5){$o-=$_, --$b{$_}
while($o>=$_ && $b{$_})} $s&&=!$o} say "@ARGV -> ", $s?"true":"false";
' 5 5 5 10 20
```

wlmb
3 days ago

#Perl @PerlWChallenge 236 Exact Change and Array Loops https://wlmb.github.io/2023/09/24/PWC236/
#noxp

adamcrussell
3 days ago

A Perl centric #BTC milestone! A transacation was created and signed by Bartosz Jarzyna using the #Perl module Bitcoin::Crypto.

https://mempool.space/testnet/tx/f8990964483b62a86ad1a5ae445b2d5b3ccd74c3611a857dc794a37eb5c62e3f

Example code here: https://gist.github.com/bbrtj/ac016abfb360e4903b89ce4183409c59

@Perl

Mark Gardner ‍:sdf:
3 days ago

@nxadm @vruz Would have been a neat alternate timeline if @gruber just used #Perl #POD instead of inventing #Markdown, but the former admittedly isn’t *quite* as aesthetic when viewed as plain text.

(As evidenced by the above sentence, which would have had to say I<quite> in POD for the same effect.)

Different times, different use cases: POD was invented in a world of man pages and ugly nroff codes; Markdown in web pages in ugly #HTML.

vruz
3 days ago

@nxadm

It makes total sense for Perl to move on. With a pinch of salt on using an unspecified "Markdown".
(or you can end up with a mess of contributions written for various different dialects and peculiar, slightly incompatible implementations)

#markdown #perl #rakulang

nxadm
3 days ago

@vruz

I think the feature-set is limited and I trust the knowledge of people introducing the change.

But it's a fact that most devs know some markdown nowadays (probably the GitHub dialect) and not many feel joy when they have to learn yet another documentation format limited to a single language.

#perl #rakulang #markdown

vruz
3 days ago

@nxadm

Markdown is a rough idea and a moving target scribbled down by a blogger for his particular needs in his limited scope.

Any long-term work should be based on a better defined derivative such as CommonMark, Pandoc Markdown, Github's GFM, or Markdig.

I assume that's what they actually mean, and not "Markdown" literally, otherwise they're stepping into trouble.

#Markdown #Perl

nxadm
3 days ago

Hell froze over? #Perl is thinking about moving from POD to Markdown for library documentation. I wish #rakulang would pay attention as well and go for the short pain.

"POD extensions - do we keep stealing features from Markdown (like tables, images, language markers)? Do we switch to Markdown? Neither are easy."

https://blogs.perl.org/users/psc/2023/09/this-week-in-psc-117.html

Michael Daum
3 days ago

@clf @mjgardner

Oop is available in #perl since the beginning of forever.

Part of the core language. No addons required. Simple, true. Hash based, true. Far from perfect, true. Yet scales well even for large systems. Decent enough and just sitting there for people to write well structured code with it.

And that's the main reason for oop in the first place.

Refusing to structure code well or not is more of a dev's personal choice ... independent of the tools at hand.

Mark Gardner ‍:sdf:
3 days ago

@clf @nuddlegg Disagree that #Perl #OOP is messy. v5.38 finally gives people a familiar native syntax: https://perldoc.perl.org/perlclass

If you can’t use that, #Moo is quite nice:
https://metacpan.org/pod/Moo
And #Moose gives you a full meta-object protocol:
https://metacpan.org/pod/Moose

Michael Daum
3 days ago

@mjgardner I could easily picture some of these memes saying:

#Perl spaghetti?...naw!
#JavaScript spaghetti?...cewl!

Kinda thing.

Michael Daum
4 days ago

Being faced with bad code people tend to blame more the programming language than the devs that wrote the code. #perl #programming

@alexelcu Quite similar story.

I had #Amiga 500 back in 1992 and desperately wanted to learn programming. But being in the country I was, it was impossible to get tools and books. From 1997, when on PC, things got much better. Programming languages weren’t that bad … we had #Perl but the problem was that programming books were so expensive. It was a treat to buy new book every 6 months.

Mark Gardner ‍:sdf:
4 days ago

@heberle Consider following https://chirp.social/@Perl, the hub of the #Perl fediverse community. Followers tag it in their Perl-related posts to boost them to everyone else.

Mark Gardner ‍:sdf:
4 days ago

@ChristosArgyrop @Perl Author of the article has a nice #blog with a lot of #Perl posts: https://perlingresprogramming.blogspot.com/search/label/perl

And that video course is available in bite-size pieces on a new-ish bespoke Perl #YouTube channel: https://youtube.com/@perltechstack?si=UajWQzjfJVCyi26q

Francesco P Lovergine
4 days ago

Final test scripting for my new #Perl codebase to access and download data from the new #Copernicus #dataspace #CDSE. Time to retire my old code based on #sentinelsat package that will stop working in a week or so. Thanks Copernicus folks, changing APIs every few years is a great way to make people happy. 😞

* https://github.com/sentinelsat/sentinelsat
* https://dataspace.copernicus.eu/analyse/apis
* https://scihub.copernicus.eu/

Terminal output of a test script to get 26K metadata entries on multiple sites in 4 min, ready for database injection.
Daniel Böhmer
5 days ago

@ovid Few years ago I had a potential long-term #Perl client. We made a first small contract. In their #CGI hell I found they had #UTF8 in their database and told browsers to do so but both I/O were not configured. It seemed to work but internally all their strings were garbage. Nobody understood. Some string operations were done in #SQL because there it "magically" worked.

I tried to explain but they didn't understand or even believed me there was any issue at all. I do not miss that client.

heberle
5 days ago

I‘m an environmental #physicist by training, but after three years of parental leave I started a new job as a consulting software #developer. I work(ed) with a lot of different technologies: #swiftlang, #java, #csharp, #cplusplus, #angular, #perl, … My preferred computing platform is the #Mac.

In my spare time I love to play #tabletopgames of all kinds: #boardgames, #cardgames, #miniature games and #rpg’s. When I‘m by myself I also enjoy #sologames or (mostly) older #videogames.

#introduction

Mark Gardner ‍:sdf:
5 days ago

@jriou Consider porting the #Perl to the community-supported #MongoDB client #Mango by @odc and @kraih: https://metacpan.org/pod/Mango

Here is an article from last year's Perl Advent Calendar about it: https://perladvent.org/2022/2022-12-05.html

JR
5 days ago

I was today's year old when I've discovered that we have:
- #MongoDB 4.0 databases (support ended a year ago)
- Client written in #Perl (driver not maintained anymore)

Challenge accepted 💪🏻

Mark Gardner ‍:sdf:
6 days ago

@deadbeefmonster Follow https://chirp.social/@Perl and you’ll be able to exchange messages with the >400 members of the #Perl fediverse community that tag that account!

Mark Gardner ‍:sdf:
6 days ago

@sreagle @dakkar @Perl Or just do this for any installed #Perl >= v5.28:

perl -E 'say unpack("b*","C"^."D")=~y/1//'

Christoff Humphries 🎃
6 days ago

Interested in #hacking, #socialengineering, #pentesting, #malware #development, #training and #helping people, #network #protocols, #ARM, good #food, and new #friends.

Also #retrogaming and #retrocomputing; #coding in #C, #C++, and #Perl, and guess that's about it these days but I can #code in 20+ languages; #TTRPGs as a DM/Storyteller/GM such as #DnD, #OSR, and #VtM ; #cooking; making #art like #painting and #watercolor; servers run #OpenBSD; fan of tinkering with #NetBSD; daily driver is #macOS; #horror and #scifi movies; and likely other things I'm forgetting.

Restarted learning #CommonLisp, too.

Fan of the #GratefulDead, #Phish, and #Goose.

Mark Gardner ‍:sdf:
6 days ago

@dakkar @Perl Fewer parens and thus better #Perl golf score:

perl -E 'say sprintf("%b", ord "D" ^ ord "C") =~ y/1//'

Mark Gardner ‍:sdf:
6 days ago

@kpeace @Perl Save this as an executable #Perl script and then run it with two characters as command line arguments:

(I incorporated the `tr` counting tip from @dakkar: https://s.thenautilus.net/notes/9jx0aek4wo)

#!/usr/bin/env perl

@ordinals = map ord, @ARGV[0, 1];
$xor = $ordinals[0] ^ $ordinals[1];
$binary = sprintf '%b', $xor;
$count = $binary =~ tr/1//;
print "$count\n";

Mark Gardner ‍:sdf:
1 week ago

Count the number of binary bits of difference between two characters in #Perl:

% perl -E 'say scalar @{[ sprintf("%b", ord "D" ^ ord "C") =~ /1/g ]}'
3

Explanation:
1 . `ord` gets characters' code points
2. `^` XORs them (1 bit for each different bit)
3. `sprintf` to binary string
4. `=~ /1/g` matches every 1
5. `[`…`]` creates array reference so list context captures every match
6. `@{`…`}` dereferences to array
7. `scalar` counts array elements
8. `say` outputs result

@Perl

Daniel Böhmer
1 week ago

@leonerd I've found Test2 so much more sane and useful when writing #Perl that I highly recommend migrating code that's actively being developed. I've done this and it makes life much easier.

ルモーリン
1 week ago

何故かPerlの投稿は日本語なのに外国の方に速攻で捕捉されています。 #perl

Bahman M.
1 week ago

@pganssle @faassen Contrast that w/ #Lisp, #Python, #Ruby & #Perl which offer different ways of managing abstractions, namely macros & meta-programming.

They let you shrink the depth of the hierarchies by using those means.

And b/c of that the culture is generally against too granular abstractions.

⚠ In recent years, I've seen Python code bases inclining towards the Java approach (a la #Zope) and that is quite frightening 😑

3/3

Negative12DollarBill
1 week ago

@skye

Like, ouch on behalf of #Perl, but I think a better version of the joke would be more like

Python: you just want to get shit done
Perl: you just want to get shit done and you were born before 1975

Mina
1 week ago

@skye

Just switch the texts for #Perl and #Python, and we're friends.

Anirvan Chatterjee
3 weeks ago

#Perl’s backwards compatibility is stellar.

Writes @jwz: “I dug up the old CVS archive, checked out those old web site source revs, and then I had to run that website-generating perl script that I wrote 25 years ago...it worked without any modifications. Self-high-five.”

https://www.jwz.org/blog/2023/01/mozilla-orgs-25th-anniversary/

Curtis "Ovid" Poe
3 weeks ago

So I started a project to try to bring basic type constraints to #perl. https://github.com/Perl-Apollo/oshun

I named it "Oshun" after a Nigerian Yoruba river goddess who's often depicted as protecting humans. I did that because I wanted to show a world that's more "round," if you will.

It's a given that when you try to do something big in #OpenSource, you get detractors.

Here's a comment from one of mine:

"Oshin" (sic) is named after a pagan river demon/earth mother - speaking of "bizzare".

Hernán De Angelis
3 weeks ago

Geologist & physical geographer. Works with data analysis, data management and visualization within spatial data, GIS, remote sensing, metadata. Happy outside in Nature.

Likes #geoscience #environmentalscience #remotesensing #gis #FOSS #dataanalysis #geospatial #copernicus #OpenStreetMap #grassgis #qgis #GenericMappingTools #perl #python #gnuplot #imagemagick #spatial #OpenSource #openscience #datamanagement #datavisualization #Linux #amateurastronomy #running #cycling

#presentation

Hernán De Angelis
3 weeks ago

Geolog & naturgeograf. Arbetar med dataanalys, informationshantering och visualisering inom geodata, gis, fjärranalys, metadata. Gärna ute i naturen på fritiden.

Gillar #geoscience #environmentalscience #remotesensing #gis #FOSS #dataanalysis #geospatial #copernicus #OpenStreetMap #grassgis #qgis #GenericMappingTools #perl #python #gnuplot #imagemagick #spatial #OpenSource #openscience #datamanagement #datavisualization #Linux #amateurastronomy #running #cycling

#presentation

abs(in)the
3 weeks ago

Needed a dynamic status page on some #embedded #pcengines #netbsd boxes, so thought I'd see if a #perl #nginx #fastcgi #daemon (with a pidfile & 'start', 'stop', status' etc) was quick to setup

Turns out: "yes"

#!/usr/pkg/bin/perl
use Daemon::Generic;
use CGI::Fast
socket_path => '127.0.0.1:8999',
listen_queue => 50;

newdaemon( 'progname' => 'statusd');

sub gd_run {
while ( $q = CGI::Fast->new ) {
process_request($q);
}
}

process_request() {
my $q = shift;
# code here
}

Curtis "Ovid" Poe
4 weeks ago

Hey, #Perl peeps. Lots of languages, such as #go, #rust, and #node, have core tools to make it trivial to contribute open-source code.

I think Perl needs that, too. Here are my rough thoughts. https://gist.github.com/Ovid/05b69b8fa266e6d6b3600479871074b1

I would love to hear feedback.

David Bisset
1 month ago

Interesting "Youtube-to-Webpage" #Perl script:

Create a webpage from a #Youtube video with a transcript generated from the video's closed captions paired with screenshots of the video.

https://github.com/obra/Youtube2Webpage

domm
1 month ago

Currently (ab)using DBIC in/deflators, Moose `around` method modifiers and some poor JSON to implement a simple way to localize data in a previously single-language app. #Perl

LemonLDAP::NG
1 month ago

🌟 This is the official Mastodon account for LemonLDAP::NG, a Web Single Sign On free software compatible with many open standards like CAS, SAML and OpenID Connect.

ℹ️ We will publish here information about releases and new features. Please follow us!

🌐 See also our official website: https://www.lemonldap-ng.org

#introduction #lemonldap #lemonldapng #SSO #WebSSO #CAS #SAML #OpenID #OpenIDConnect #OIDC #OpenSource #FreeSoftware #LogicielLibre #Perl

Jay Hannah
1 month ago
Bahman M.
1 month ago

#TIL When in doubt about #POSIX compliance of a command, just use #Perl FTW.

Example: Asking `date` to produce nanoseconds doesn't work on #MacOS w/o #GNU coreutils installed.

So I simply switched to `perl -MTime::HiRes` and, well, problem was solved!

#programming #linux #devops #sysadmin

domm
1 month ago

A not-so-short list of things I learned at PerlKohaCon #Perl #Koha http://domm.plix.at/perl/2023_08_things_i_learned_at_perlkohacon.html

Mark Gardner ‍:sdf:
1 month ago

@randomgeek @joelle @Perl I’d like that to be true for me, but I have yet to personally face one of those tasks that #RakuLang can do but #Perl can’t.

I need more than just someone else’s subjectively “better” expression of the same task.

Mark Gardner ‍:sdf:
1 month ago

@joelle @Perl You’re right, in comparison #RPerl has a long way to go before sucking up even a fraction of the #Perl community’s time

Mark Gardner ‍:sdf:
1 month ago

@joelle @Perl @AFresh1 @leonerd #RPerl and various other qr/perl/i efforts are inevitably driven by self-aggrandizing lone devs (plus entourage) with BDFL designs on the One True #Perl that only runs the subset they care about.

They either forgot or never learned the @ietf motto: “We believe in rough consensus and running code.”

Walt Mankowski
1 month ago

@glasnt A few people could have used this message at this year's #Perl conference in Toronto.

Mina
1 month ago

@ramankhutu

20 years ago is a long time and a lot has changed since then.

You don't need any #Perl nowadays, but it's (despite its fall into almost total oblivion) still my favourite programming language.

@hosford42 @j3rn @railmeat @mcc

domm
1 month ago

Slides for my 3 talks at #Perl #Koha Con 2023 are now available:
* Deploying apps using podman and ansible: https://domm.plix.at/talks/deploy_podman_ansible.html
* OpenAPI, Perl & Koha: https://domm.plix.at/talks/openapi.html
* Koha Geosearch: https://domm.plix.at/talks/koha_geosearch.html

domm
1 month ago

#potd 28h exposure of Helsinki Cathedral via Puck, from #Perl #Koha Con 2023 http://domm.plix.at/potd/2023-08-17.html

#potd 28h exposure of Helsinki Cathedral via Puck, from #Perl #Koha Con 2023 http://domm.plix.at/potd/2023-08-17.html
Curtis "Ovid" Poe
1 month ago

If you do lots of testing of complex data structures in #perl, you might use Test::Differences and Test::Deep. However, they do not play well together ... at all.

I've written Test::Deep::Differences. Currently, it's only on #github, but if you find it useful, I might push it to #cpan.

https://github.com/Ovid/test-deep-differences

domm
1 month ago

#Koha Con 2024 will be in Montreal in September 2024, and the #Perl community is again invited to join. I'm unfortunately not sure I can/want to make the long journey (mostly because of CO₂), but if you are in the area please do check it out!

domm
1 month ago

Day 3 of #Perl #Koha Con in Helsinki will start soon: https://perlkohacon.fi/
(I've got a talk in the first slot)

Sven
2 months ago

I've finally fixed a bug in some #Perl code from like 10 years ago (it was a bug in the test, not in the code, though I modified the code to fix the bug) but I have no idea what my #CPAN password is.

And it's CPAN, nothing is automatic.

Mark Gardner ‍:sdf:
2 months ago

@domm @leobm @miyagawa Look into @oalders’ OrePAN2 and supporting tools for a lightweight way to maintain a “DarkPAN” that can act like a private #CPAN mirror for internal-only #Perl module distributions: https://metacpan.org/pod/OrePAN2

You can “inject” your private modules from a local or remote tarball or git repo: https://metacpan.org/dist/OrePAN2/view/script/orepan2-inject

Then you use cpanm, carton, etc. with your DarkPAN as one of the mirrors to search for dependencies.