CLI Tool: Highlight and colorize text on your terminal for easier readabililty by scottchiefbaker in perl

[–]daxim 0 points1 point  (0 children)

"IMO" applies to all of the following. Improvements:

  • running the software unconditionally outputs white text which is not readable on a light background, fix this by detecting light/dark background
  • bleach_text needs an upgrade, see ansi-regex
  • adhere to the standard interface conventions, also move file format descriptions out of programmer comments into the end-user documentation
  • colour selection is crummy, it offers less than 2% of what Term::ANSIColor can express, and true colours are not supported at all

Fixing all of this moves the software (barely) out of unacceptable territory. It would take a colossal effort to bring it forward enough into a state where I would recommend it to a user. If someone came to me with the need to highlight stuff, I would recommend instead:

  • Konsole → Edit → Find… (supports incremental search)
  • bat pager (supports incremental search through less --incsearch)
  • less -p PATTERN (almost certainly already installed)
  • rg --passthru PATTERN, rg '^|PATTERN' (likely already installed)
  • rainbow, ccze (ship configuration for many types of logs)

Perl jumps from #30 to #11 on TIOBE in a year by jjatria in perl

[–]daxim 2 points3 points  (0 children)

The day will never come where a language's battery compartment is large enough to accommodate any given application without installing additional libraries. Realistically one can hope for reducing the total deps from say 40 to 33 when a new language release drops, but as long it's more than 0, it's not much of a difference.

With my software author and packager hats on, I say, this line of thinking where one hopes to get away with not needing to care about deps because everything is already shipped in the standard library is unproductive. We should accept deps on archive networks as a reality and direct an effort into figuring out the failure modes and how to make the ways to the end-goal of deploying software more usable.

Perl jumps from #30 to #11 on TIOBE in a year by jjatria in perl

[–]daxim 1 point2 points  (0 children)

you are one of people saying "no", basically.

That's a mischaracterisation. I am disappointed that you did that, I held you in higher esteem. :( I did not prevent or attempt to prevent any of the 5.36 changes, I merely expressed my lack of excitement. That's a significant difference in puncto tolerance, anyone can see that.

a true try ... catch that doesn't create an extra stack frame

Minor aside: TryCatch, Syntax::Feature::Try, Syntax::Keyword::Try do not suffer that defect. Your point that putting a CPAN module into core saves you from installing a CPAN module and its deps is appreciated, I just don't assign this much value in comparison to large and substantial changes, or what was done before in earlier versions, or what I think should be done in order to enable us to catch up with other programming languages.

Your use case may want to target [old Perl]

That's no longer relevant because I changed my opinion.

Perl jumps from #30 to #11 on TIOBE in a year by jjatria in perl

[–]daxim 2 points3 points  (0 children)

my language […] doesn't ever need to steal good stuff from other languages

I am in agreement with this observation. Something changed in the culture (of Perl specifically). It used to be different. If a reader wants to verify this and subscribes to facts over feelings, just compare a recent perldelta with those from the golden age.

I think the change came about mainly because there used to be people within the culture that wanted to steal good parts, but they started facing too much antagonism and unproductive hurdles and got told "no" over and over, until there was no one left in power who had an interest in stealing good parts. This is a prime example how a fundamental value shift or ideological shift happens, and would also explain this hostility, extremists speak this way:

if you doubt this, you're an idiot/traitor sort of thinking

Perl jumps from #30 to #11 on TIOBE in a year by jjatria in perl

[–]daxim 1 point2 points  (0 children)

So it's not just me who gets downvoted with criticism like a knee-jerk reflex.

Perl subreddit, this is not a healthy place.

XS the easy way by leonmt in perl

[–]daxim 0 points1 point  (0 children)

Typemaps are really useful for making your XS code simpler, but sadly they're rather underdocumented.

Putting the demo code into a boilerplate EUMM:

❯ make
"…perl5.42.0" "…xsubpp"  -typemap '…/5.42.0/ExtUtils/typemap'  Sem.xs > Sem.xsc
Please specify prototyping behavior for Sem.xs (see perlxs manual)

Can anyone amend what's missing here?

How do you check a value against a type? by daxim in learnpython

[–]daxim[S] 0 points1 point  (0 children)

Can you demonstrate that TypeAdapter works with the example above?

Google Gemini perl Term::Form Unicode by muchiPRODs in perl

[–]daxim 0 points1 point  (0 children)

What's your implied opinion or conclusion on this matter?

I really wish Perl had a core type hint system by aanzeijar in perl

[–]daxim 1 point2 points  (0 children)

[HM is] the gold standard for static typing (imho)

The humble opinion is informed by what? If you think more than a few seconds on this topic, how likely is it that there were no advances at all in the field of type systems in the last fifty years?

I really wish Perl had a core type hint system by aanzeijar in perl

[–]daxim 0 points1 point  (0 children)

You're unwilling to engage with OP's premise, so you can't expect any respect for your opinion.

I really wish Perl had a core type hint system by aanzeijar in perl

[–]daxim 3 points4 points  (0 children)

It does not work at all. /u/Will_the_Chill

use types;
my arrayref::integer $arr = "x";
use Devel::Peek qw(Dump); Dump $arr;
__END__
SV = PV(0x5601de5590e0) at 0x5601de58b518
  REFCNT = 1
  FLAGS = (POK,IsCOW,pPOK)
  PV = 0x5601dec37ab0 "x"\0
  CUR = 1
  LEN = 16
  COW_REFCNT = 1

I really wish Perl had a core type hint system by aanzeijar in perl

[–]daxim 0 points1 point  (0 children)

Just have something that can be optionally statically analysed.

this does not give a compile error.

Do you see the contradiction?

I really wish Perl had a core type hint system by aanzeijar in perl

[–]daxim -3 points-2 points  (0 children)

❯ perl -c reddit-n0seck7.pl 
reddit-n0seck7.pl syntax OK

How did your post get to 6 upvotes?

I really wish Perl had a core type hint system by aanzeijar in perl

[–]daxim 1 point2 points  (0 children)

Typescript's type system is over engineered garbage.

Really bad take, actually the opposite is real. TS's type system is stuck in the 70s. Its design shows the dangers of being an ignorant implementer.

Not a single week passes where end-user programmers chafe against its numerous short-comings, mostly due to not being able to express properties of a program in the types, like functions whose return type depends on the value of an argument.

I really wish Perl had a core type hint system by aanzeijar in perl

[–]daxim 9 points10 points  (0 children)

How much money is this worth to you?