digitalcourage.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Diese Instanz wird betrieben von Digitalcourage e.V. für die Allgemeinheit. Damit wir das nachhaltig tun können, erheben wir einen jährlichen Vorausbeitrag von 1€/Monat per SEPA-Lastschrifteinzug.

Server stats:

845
active users

#perl

8 posts7 participants2 posts today
Continued thread

… ought to try the modules mentioned in TFM (of "rand" function) for this non-secure use …

『As of this writing, a number of third-party CPAN modules offer random number generators intended by their authors to be cryptographically secure, including: Data::Entropy, Crypt::Random, Math::Random::Secure, and Math::TrulyRandom.』

- D::E had been deprecated in favor of "Crypt::URandom, Crypt::SysRandom or Crypt::PRNG" as of v0.008, 20250327.

- M::TR v1.0 says it takes a long time; use to seed.

To generate background color (for "xterm(1)"), I use the #Perl (was 5.3[68]; is 5.40) program on #FreeBSD (was 13; is 14) …

use strict; use warnings;

my @red = qw[ 05 15 20 25 30 ];
my @green = qw[ 00 05 10 15 ];
my @blue = qw[ 00 10 15 16 ];

print join( q[/],
$red[ rand @red ],
$green[ rand @green ],
$blue[ rand @blue ]
);

Rarely the FIRST time is the color other than same shade of brown. Because "@red" is longer? Some initial state?

Replied in thread

@profoundlynerdy just because something has types doesn’t make it Haskell-like. Haskell’s type system is in the family of Lambda Calculii (the “Lambda Cube”) which is called “System-F”.

I don’t know much about Raku, but it seems to me to me to be a bit more similar to TypeScript. And what differentiates TypeScript from other languages: it takes a horrible programming language like JavaScript and makes it less bad by giving it a type system, likewise Raku makes Perl less bad in the exact same way. (Sorry, I’m not trying to be impolite, but JavaScript and Perl are objectively, truly awful, horrible programming languages.)

So I see both Raku and TypeScript only being useful to a company buried in the technical debt of a hugely profitable production application that was very unwisely written in a dynamically typed language (Perl or JavaScript), which then unfortunately grew to millions of lines of code, and now it can’t be maintained by anyone, and it could never possibly be rewritten from the ground-up in a good programming language like Haskell for any reasonable sum of money. So Raku and TypeScript both offer a half-measure solution to that problem: make the maintenance of horrible computer code a bit easier with a type system.

Haskell was never intended as a fix for horrible code, it took a really good experimental programming language called Miranda and turned it into something that you can use to do real, practical software engineering, and it does it better than any other language ever invented. You write a system in Haskell because you know up front that you want it to be stable and maintained in a cost-effective manner for decades.

Zig is not similar to Raku or Haskell. It is more analogous to what Scala does for Java. Java is already statically typed, but Scala’s type system is better, and it’s runtime is fully compatible with Java. Likewise, Zig is fully compatible with the C language runtime, but provides a slightly different, slightly better static type checking system than the C type system. Zig also solves a bunch of other problems that C has by providing it with modern features like namespaces and modules, which makes it much easier to use than C. Zig is the perfect way to replace old C code with something more modern, but only if you don’t need it to be as rigorously correct as Rust. I think Zig would be a nice language to use to replace non-safety-critical front-end libraries like Gtk, or maybe for things like game engines.

I’m always reminded when I get the chance to dive deep into a Perl project again that perfection is merely the precursor to more cleverness.

I’ve never known another language that is actually inspirational.

💟

I have played a bit with my 20 year old #Perl skripts that parse a #BibLaTeX #bibliography. Since I am not good at GUI/UX stuff, I chose #Hugo as a frontend with the Clarity theme. It offers a nice to use frontend to my bibliography by utilising the tags, categories and series features one can easily sort by author, topic and other stuff. It's some kind of #Zettelkasten for my literature
See the result at
bib.kaishakunin.com/

bib.kaishakunin.comBib.Kaishakunin.com

There was a «A Language Creators’ Conversation» in 2019 with:
• Anders Hejlsberg (Turbo Pascal, Delphi, C#, #TypeScript)
• James Gosling (#Java)
• Guido Van Rossum (#Python)
• Larry Wall (#Perl)

hosted by Carol Willing (#JupyterProject).

The audio is very bad, but I wanted to share the content so I paid a human to transcribe it better than an AI could.

Here's the transcript & link to video. Enjoy!

ramalho.org/posts/language-cre

ramalho.orgLanguage Creators Panel 2019 | Blog do Ramalho.org

The upside to writing a #Perl or #Python program to parse STDIN is that with one change, the code can deal with UTF8 text. The equivalent #C needs to be rewritten to use entirely different underlying functions.

The downside is that sometimes it's 100 times slower than the equivalent C program(s).