sigmoid.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A social space for people researching, working with, or just interested in AI!

Server stats:

658
active users

#perl

7 posts5 participants0 posts today

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.

💟

#Perl @PerlWChallenge 321 Task 1: Distinct Average
#noxp
```
perl -MList::Util=uniq -E '
@x=sort {$a<=>$b}@ARGV;say "@ARGV -> ", 0+uniq map {$x[$_]+$x[-1-$_]}0..@ARGV/2-1;
' 1 2 4 3 5 6
```

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
Continued thread

What's useful about Perl is that it fits the Unix tools approach well. You can write quick one-liners and put them in a pipeline. You then gradually enhance functionality until you arrive at a standalone script. Like Shell. Like AWK. Ruby is kind of like that as well. Python is not.

This doesn't mean the opposite works equally well. The bare minimum to turn a language's REPL into an interactive Shell is I/O redirection and pipelines without much extra syntax.

#shell#perl#awk

Arguing that the Unix Shell needs to be a better programming language is missing the point, it is a command language first.

50 years ago it was enhanced to be a high-level programming language for automating manual tasks. The limits of this approach became clear in the 1980s and Perl was created in response to that.

However, a new, better interactive Shell language that is not also a scripting language isn't really the point either.

I’ve just switched an old iMac to run Linux Mint (Cinnamon) and it’s great. Starting to want to dig a little deeper into it I guess it comes with a C compiler.

Does it also have a Python interpreter? Anything else? (During a recent update the word Perl kept flashing across the screen)

#linux#C#Python

I know #Python on its own is not a fast language, but I'm looking at code that rebuilds several small lists, one `arr.append()` at a time, (mumble 1920 // 16 times 1080 // 16 is) 8,040 times, and it reminds me of #Perl's read-only reputation.

Basically, no wonder you think that if this is the kind of code you're writing.

I'm no optimization wizard, but I at least try to learn the language.

Anyone using @forgejo #forgejo runners for #Perl have the same issue as me using github.com/shogo82148/actions- for running perl?

My workflows fail during setup of shogo82148/actions-setup-perl, see screenshot.

The URL it fails on saying bad credentials works fine without credentials. Is this a #GitHub thing requiring something as the action is hosted there? I'm using the latest runner, cleared caches. Went back to previous version, same issue.

This used to work before...

Replied in thread

@glitch I think my requirements are subtle. I'd like a self contained tool, that does not compile to a binary for one off cli tools. If I come back to it a year later, I don't want to have to search for where the source code is.

I would like all of the features I mentioned, flags, file handling, input validation, to be part of the standard Library so if I share my script there will not need to be additional libraries installed.

#Perl feels like the closest to this requirement that I've seen.

Replied in thread

@tivasyk Perl was one of those languages I had used a long long time ago. I abandoned it's because of the hype of other tools.

I have always felt that that was an unwise decision, and that I should find an opportunity to use #Perl for something, to really give it a chance to see what it can do.

For next 4 days #Leipzig in 🇩🇪Germany is the center of work on the #Perl programming language.

At the Perl Toolchain Summit over 30 experts and highly involved volunteers gather to keep the language and its ecosystem healthy and appealing 🔧⚒️🗜️

Photo: Same venue in Leipzig already used at German Perl Workshop 2022. Photo from @sjn