RogerBW, to raku
@RogerBW@emacs.ch avatar
ChristosArgyrop, to php
@ChristosArgyrop@mstdn.science avatar

I think I am 50% done finding a quadrafecta : a simultaneous hit piece against & .

This one only manages to trash talk and , so it has some ways to go.

https://stefanoborini.com/why-r-is-the-new-perl/

PS 1Gotta admit that the point about the object systems in R is somewhat spot on
PS 2 gets a dishonorable mention
PS3 I will continue to find ways to continue using all 4 of the aforementioned languages, as they are all performant and deliver in complementary ways.

mjgardner,

@BobOHara @ChristosArgyrop Some examples of Larry taking the piss:

“I’m reminded of the day my daughter came in, looked over my shoulder at some 4 code, and said, 'What is that, swearing?”

"Perl is worse than because people wanted it worse.”

"Guilty as charged. Perl is happily ugly, and happily derivative.”

"The camel has evolved to be relatively self-sufficient. On the other hand, the camel has not evolved to smell good. Neither has Perl.”

vwbusguy, to random
@vwbusguy@mastodon.online avatar

I just had an AI help me write some necessarily regex heavy stuff and I'm not complaining about that.

vwbusguy,
@vwbusguy@mastodon.online avatar

There was some stuff I wasn't sure how to sanely do with #Ansible and thought I might have to resort to a #Perl script and the AI helped me get out of the weeds with the playbook.

tripleo, to random
@tripleo@fosstodon.org avatar

All you nutcases still using , what's actually wrong with it?

aka What are the sharp edges?

leonerd,
@leonerd@fosstodon.org avatar

@tripleo If you want decent integration with 3rd party stuff (google APIs, amazon, etc...) you may need to write your own client stuff as most big service providers seem to have forgotten that #Perl exists

mjgardner, (edited )

@tripleo #Perl’s “sharp edges” are mainly early syntax and features that later experience with large and networked #programming found dangerous, but are preserved for backward (and we do mean “backward”) compatibility.

See the details of the strict and warnings pragmas, and successively missing items in feature bundles:

https://perldoc.perl.org/strict
https://perldoc.perl.org/warnings
https://perldoc.perl.org/feature#FEATURE-BUNDLES

And the summary of policies included in #PerlCritic: https://MetaCPAN.org/pod/Perl::Critic::PolicySummary

mjgardner,

@tripleo I would also be remiss not to mention #Perl's included perltrap manual page, which notes both the strict and warnings pragmas and also has nice lists of things for those coming from other #programming languages and tools like #AWK, #C and #CPlusPlus, #JavaScript, #sed, and #shell.

https://perldoc.perl.org/perltrap

gisgeek,
@gisgeek@floss.social avatar

@leonerd @tripleo I can only confirm this, even if currently FFI support does allow to bind to C/C++ quite easily. I find the general situation much better of other seasoned languages such as or , instead.

mjgardner,

@gisgeek I’m a little confused: are you saying that #Tcl and #Lisp are better than #Perl or worse regarding third-party / #FFI integrations?

/ @leonerd @tripleo

mjgardner,

@tripleo That link returns a “Not Found” page.

If you’re looking for documentation on #Perl's bless function, you'll find it here: https://perldoc.perl.org/functions/bless

Most people are better served with an OO system rather than raw bless calls in Perl. See https://perldoc.perl.org/perlootut#PERL-OO-SYSTEMS for a discussion.

You can also investigate the currently experimental class feature that brings native OOP keywords to Perl: https://perldoc.perl.org/perlclass

Or do you have a different question?

mjgardner,

@tripleo You’re thinking of ’s “taint mode” (stop your teenage giggling), where outside data is untrusted unless it’s the extracted subpattern match in a .

It’s only enabled under certain conditions. Read about it in the perlsec manual page: https://perldoc.perl.org/perlsec#Taint-mode

mjgardner,

@tripleo BTW, I’m quite chuffed you’re taking an interest in #Perl. Enjoy the ride!

mjgardner,

@tripleo You could use 's taint mode for web inputs, but that’s a big performance-reducing hammer affecting everything outside your program: command line arguments, environment variables, locale, file input, certain system calls, etc.. It also breaks many modules, including popular web application frameworks.

There's no one-size-fits-all solution, so use whatever’s appropriate for your web input. Start with @owasp’s Top 10: https://OWASP.org/www-project-top-ten/

mjgardner,

@tripleo Like I said in https://social.sdf.org/@mjgardner/112476483573909633, the only feature built in to #Perl for untrusted data is taint mode.

You might have heard of it or used it 25 years ago with simple #CGI scripts (and that still works!) but as I said in https://social.sdf.org/@mjgardner/112481166820565063, it breaks a lot of modern code.

It’s also no silver bullet: a taint failure is a fatal exception and it’s up to the developer to handle that gracefully.

#security #InfoSec #CyberSecurity #programming

ovid, to random
@ovid@fosstodon.org avatar

Hey, #perl devs. Do you use DBIx::Class::Schema::Loader? Do you also use Perl::Tidy? You can get disappointed if Perl::Tidy reformats the dbic files, so drop this in your .perltidyrc to stop that:

Ignore DBIC-generated content

--format-skipping-begin='#(<<<| DO NOT MODIFY THE FIRST PART OF THIS FILE)'
--format-skipping-end='#(>>>| DO NOT MODIFY THIS OR ANYTHING ABOVE!)'

ovid, to Lisp
@ovid@fosstodon.org avatar

, , and are three powerful programming languages that share a common feature.

Nobody knows how the hell to capitalize them.

RogerBW, to raku
@RogerBW@emacs.ch avatar
oalders, to programming
@oalders@fosstodon.org avatar

I'm handling sponsorships for this year's Perl and Raku Conference. Please share this far and wide so that we can get as many new sponsors as possible. ❤️

https://www.perl.com/article/this-is-your-opportunity-to-sponsor-the-perl-and-raku-conference-2024/

#perl @perl @tag@relay.fedi.buzz #programming

sjn,
@sjn@chaos.social avatar

@oalders @perl @tag@relay.fedi.buzz

Everyone! If your #business depends on #Perl or #RakuLang please consider supporting the communities you rely on!

One good way to ensure a sustainable future for #OpenSource ecosystems like these, is to support active and fertile venues for learning and teaching these technologies.

Right now, you can help by supporting the Perl and Raku Conference, and later this year, the London Perl Workshop.

Is this relevant for you? Forward it to your manager! 💯

ovid, to random
@ovid@fosstodon.org avatar

If any #Perl #XS gurus want to take a look at a small bug in some code I wrote, I'd appreciate it. https://github.com/Ovid/unset-vars/issues/1

ovid, to random
@ovid@fosstodon.org avatar

#Copilot just wrote the following #Perl code for me, complete with the comment, which is correct.

my $UNINIT = bless => {}, 'Uninitialized::Vars::Variable';
sub uninit () { $UNINIT }
sub is_uninit ($var) { $var == $UNINIT } # XXX: This is wrong

charadon, to random
@charadon@8bit.red avatar

So, I know it's sacrilege to make your own "Build System", but for fun, I decided to give it a go.

It's made up of 3 scripts:

  • build.pl: Builds the project
  • clean.pl: Cleans up artifacts
  • install.pl: Installs artifacts where they need to go in the system.

build.pl was the most complicated, but that's not saying much, it was incredibly easy to make and it's small. It even supports parallel jobs and not rebuilding an object if the source file is older than the object.

Serpent7776, to random
@Serpent7776@mastodon.social avatar

I just wasted 1hr, because I used == instead of eq and 'and' instead of && in #perl

mjgardner,

@Serpent7776 use warnings; (or the -w switch for a one-line command) would have helped catch the first problem: https://perldoc.perl.org/warnings

You would then see “Argument "foo" isn't numeric in numeric eq (==)” along with the line number in the code and the string you were trying to compare instead of “foo”: https://perldoc.perl.org/perldiag#Argument-%22%25s%22-isn't-numeric%25s

If you have 2022’s #Perl version 5.36 or later, use v5.36; will enable warnings as well as other sane defaults.

/ @perl

mjgardner, (edited )

@Serpent7776 I’m sorry to hear about the warnings lost in the output.

Since you’ve got #Perl v5.38.2, write use v5.38; and in addition to strict and warnings you enable the following niceties from https://perldoc.perl.org/feature :

bitwise
current_sub
evalbytes
fc
isa
module_true
postderef_qq
say
signatures
state
unicode_eval
unicode_strings

You’ll also disable these footgun “features”:

bareword_filehandles
indirect
multidimensional
switch

Give it a whirl!

/ @perl

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • magazineikmin
  • khanakhh
  • cubers
  • Youngstown
  • InstantRegret
  • ngwrru68w68
  • slotface
  • ethstaker
  • everett
  • kavyap
  • DreamBathrooms
  • Durango
  • JUstTest
  • rosin
  • tacticalgear
  • cisconetworking
  • osvaldo12
  • mdbf
  • normalnudes
  • Leos
  • GTA5RPClips
  • tester
  • modclub
  • provamag3
  • anitta
  • lostlight
  • All magazines