RogerBW, to raku
@RogerBW@emacs.ch avatar
mjgardner, to perl
@mjgardner@social.sdf.org avatar

@perl Remember folks, 's is a dromedary 🐪, not a Bactrian 🐫:

perl -CS -pe 's/\N{BACTRIAN CAMEL}/\N{DROMEDARY CAMEL}/gu'  
metacpan, to programming
@metacpan@fosstodon.org avatar
dave, to random
@dave@puz.fun avatar

Anyone here have experience updating a Dockerized Perl application? Specifically I am looking for help upgrading the app from 5.26 to 5.30 and how to rectify errors where some libraries (I think?) were built for Perl 5.26 and won't work under 5.30?

philsplace, to random
@philsplace@mastodon.sdf.org avatar

Dropping some Perl right in the middle of some Template::Toolkit code is the best thing about TT #imho

mjgardner,
@mjgardner@social.sdf.org avatar

@philsplace
@perl “[#Template languages have] two problems: First, their little language is crippled. If you need to do something the author hasn't thought of, you lose. Second: Who wants to learn another language? You already know #Perl, so why not use it?“

Cut out the middleman and use Text::Template: https://metacpan.org/pod/Text::Template

RL_Dane, to raku
@RL_Dane@fosstodon.org avatar

Lol, #perl and #raku folks, I made a funny (in bash!)

#!/usr/bin/env bash

#Smart CD - uses my ulocate script and fzf to jump to any directory found within my home directory

set -u #treat undeclared variables as errors

function warn {
echo "$" >&2
}
function swoon { # (something in between a warn and a die ;)
warn "$
"
exit 0
}
function die {
warn "$*"
exit 1
}

ferki, to KindActions
@ferki@fosstodon.org avatar

perlthanks is a shortcut for perlbug -T to "send a thank-you note instead of a bug report".

With #Perl, #gratitude is a feature.

See the docs: https://perldoc.perl.org/perlthanks#Can-you-use-perlbug-to-submit-a-thank-you-note

RogerBW, to raku
@RogerBW@emacs.ch avatar
benjamineskola, to random
@benjamineskola@hachyderm.io avatar

Started reading ‘Modern Perl’ on the train to work the other day. was the first programming language I learned, 20 years ago now, but I’ve hardly used it in probably 15 years now.

Not yet sure what I’d use it for, though. Better shell scripts? I’d normally choose Python/Ruby for that.

profoundlynerdy,
@profoundlynerdy@bitbang.social avatar

@benjamineskola There is a very new OOP system: https://ovid.github.io/articles/the-future-of-perl.html which looks good but I haven't actually used it myself.

I work Cybersecurity, I mostly use for quick one-off scans when someone asks me, "are we vulnerable to XYZ?" when XYZ has a (mis)configuration element to it.

A lot of my hobby code is using these days as I really enjoy the language's mutability.

oalders, to programming
@oalders@fosstodon.org avatar
ChristosArgyrop, to Bash
@ChristosArgyrop@mstdn.science avatar

This made my night

image/jpeg

metacpan, to programming
@metacpan@fosstodon.org avatar

What's New on CPAN, March 2024 edition.

https://www.perl.com/article/what-s-new-on-cpan-march-2024/

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

ovid, to javascript
@ovid@fosstodon.org avatar

I started programming in 1982. Though I'm known as a developer, I tried to remember every other languages I've programmed in.

, #C, 6809 Assembler, , VBScript (and its many variants), , , , , , , Easytrieve, and probably a few others.

I wish I had gotten a job in Prolog, primarily because I loved what I could create with it. I don't love programming; I love creating.

What are you languages?

mina,
@mina@berlin.social avatar

@ovid

Basic, Pascal, C/C++, JavaScript, Tcl/Tk, Bash, Prolog quickly from my head

My favourite, though, is .

RogerBW, to raku
@RogerBW@emacs.ch avatar
leonerd, to random
@leonerd@fosstodon.org avatar

How's your day going?

genehack, to random
@genehack@dementedandsadbut.social avatar
EricMesa, to golang

A few thoughts on Programming languages

Just a few thoughts on programming languages that have been rattling around in my head this week, but which don’t each merit a full blog post. The main theme is that the culture behind each programming language leads to some interesting choices, as is the case with spoken languages.

This week I started learning how to program in Rust. Even though I’m using the project-based Command-Line Rust to learn, the author still went with the traditional “Hello, world!” project for the first intro to the language. I was also working on a Go project last week and so it immediately stood out to me that (at least as taught by this author) Rust has the print! macro that allows you to succinctly print to the command line. By contrast, Go requires importing fmt before you can print. This was the first topic that was swirling around in my head this week. What makes language designers choose whether printing output (one of the most basic things a program can do) is built-in or requires an import. I even remember back when I was learning Java in undergrad (I think it was Java 1.8, but I don’t remember) we had to use the savitch library just to get program input (another very basic computer program concept). As I thought about it, I wondered if it has to do with thoughts around compilation and whether the language designers think you’re mostly making user-interactive programs or libraries? It makes sense to me that scripting languages like Python, Ruby, and Perl would have print built-in since you always have to have the interpreter along with you, so all the basics should be there. (The original Batteries Included Python promise, for example) But perhaps the Go developers thought you wouldn’t always be printing to the command line so a more efficient binary could be compiled by forcing you to import the functionality? I’m not entirely sure.

The next thing I started thinking about, again due to learning Rust, was the mutability of variables. In most languages I’ve come across (I think all, except Haskell) all variables are mutable by default. It almost seems pointless to have a non-mutable variable. I understand why many languages have the concept of a “contanst” modifier/keyword. Unlike normal variables, THIS ONE does not change. But the opposite seems so weird since most of what we often do in programming involves changing the value in a variable. Perhaps as I learn more about Rust, I’ll understand their reasoning, but this seems completely backwards to me.

Both Rust and Golang use structs to organize variables where Ruby, Python, and Java use objects. But when both Go and Rust allow you to “attach” methods/functions to structs – is there a true distinction between object-oriented programming and struct-based programming? It seems like it’s just semantics (in the generic sense of the word) – at least at the level at which I program. The only difference I can see is that structs don’t have inheritance, although Go’s “types” solve some of the same problems.

Today’s (the day I’m writing this, not the day it’s going to be posted) shower thought was about programming language versions. On one end you have Java (I think now on version 22) and C# (now at version 12). On the other you have Python and Ruby (both at version 3). Perl essentially stopped at 5 with Perl 6 evolving into Raku. I don’t know what Java is up to. But I think C# is actually using the versions correctly – I’ve heard that each version introduces completely different ways of doing things and that the way you program C# depends strongly on when you jumped in. This is why Python is probably never moving to v4 unless they need to make some kind of huge change. Rust is an outlier with year-based versions. I guess that’s fine, but doesn’t tell you anything like a proper semantic versioning could.

Finally, I know that Rust is the newest of all the programming languages I’ve learned, but I really love how new projects are started. Python isn’t horrible, but it’s currently suffering from a lots of ideas, none of which has complete market share. You could do a simple virtual environment or you could do a more complex virtual environment/lock file situation with Poetry. (And there are about another half dozen variations on these two themes) But Rust….Rust deserves a chef’s kiss. When you start a new project with “cargo new project-name”, not only does it set up your directory structure, but it does a whole bunch of great setup tasks. It creates your Cargo.toml file (with Python, which only really started supporting toml files at the project level a few years ago, you need to look at documentation to figure out what goes in there) so that you have all the basics in there already. But it doesn’t stop there! It also, in a nod to modern programming, creates a git repository AND a gitignore file. It’s a thing of beauty. I would absolutely love for Python to move in this direction officially (not through a random user choice) for their defaults. Even “go mod init” could benefit from setting up a git repo and a git ignore (since the toml is not how Go works – I think they would probably best set up a README.md since Go’s default packaging is through git repos).

#Go #Golang #perl #python #Ruby #rust

https://wp.me/p5cs3g-4HT

ology, to random
@ology@fosstodon.org avatar

Woo! My two talks, on beginning and advanced algorithmic music creation, for the upcoming conference in Vegas, , were both accepted! :D

abucci, to ProgrammingLanguages
@abucci@buc.ci avatar

A weird thing about being 50 is that there are programming languages that I've used regularly for longer than some of the software developers I work with have been alive. I first wrote BASIC code in the 1980s. The first time I wrote an expression evaluator--a fairly standard programming puzzle or homework--was in 1990. I wrote it in Pascal for an undergraduate homework assignment. I first wrote perl in the early 1990s, when it was still perl 4.036 (5.38.2 now). I first wrote java in 1995-ish, when it was still java 1.0 (1.21 now). I first wrote scala, which I still use for most things today, in 2013-ish, when it was still scala 2.8 (3.4.0 now). At various times I've been "fluent" in 8086 assembly, BASIC, C, Pascal, perl, python, java, scala; and passable in LISP/Scheme, Prolog, old school Mathematica, (early days) Objective C, matlab/octave, and R. I've written a few lines of Fortran and more than a few lines of COBOL that I ran in a production system once. I could probably write a bit of Haskell if pressed but for some reason I really dislike its syntax so I've never been enthusiastic about learning it well. I've experimented with Clean, Flix, Curry, Unison, Factor, and Joy and learned bits and pieces of each of those. I'm trying to decide whether I should try learning Idris, Agda, and/or Lean. I'm pretty sure I'm forgetting a few languages. Bit of 6502 assembly long ago. Bit of Unix/Linux shell scripting languages (old enough to have lived and breathed tcsh before switching to bash; I use fish now mostly).

When I say passable: in graduate school I wrote a Prolog interpreter in java (including parsing source code or REPL input), within which I could run the classic examples like append or (very simple) symbolic differentiation/integration. As an undergraduate I wrote a Mathematica program to solve the word recognition problem for context-free formal languages. But I'd need some study time to be able to write these languages again.

I don't know what the hell prompted me to reminisce about programming languages. I hope it doesn't come off as a humblebrag but rather like old guy spinning yarns. I think I've been through so many because I'm never quite happy with any one of them and because I've had a varied career that started when I was pretty young.

I guess I'm also half hoping to find people on here who have similar interests so I'm going to riddle this post with hashtags:

#C #R

peateasea, to random
@peateasea@mastodon.social avatar

Once upon a time, I used to take an active part in the Pull Request Challenge (and later in the Pull Request Club). When addresssing Perl::Critic violations in my assignment for the month, one violation which tended to crop up often was stringy eval. Generally, this is something to be avoided. But how? In the post below I discuss recommended best practices and some other options.

https://peateasea.de/avoiding-stringy-eval-in-perl/

ferki, to opensource
@ferki@fosstodon.org avatar

I accept a few new clients in the coming weeks.

I specialize in making IT infrastructure and software delivery solutions faster and cheaper in the cloud and on-premises.

My clients hire me because of my no-nonsense approach: transparent, pragmatic, and holistic.

I often work with well-known projects such as , , and , as well as niche ones like and .

Please DM if interested, and boost for reach!

kennwhite, to random

Incredible research at BlackHat Asia today by Tong Liu and team from the Institute of Information Engineering, Chinese Academy of Sciences (在iie.ac.cn 的电子邮件经过验证)

A dozen+ RCEs on popular LLM framework libraries like LangChain and LlamaIndex - used in lots of chat-assisted apps including GitHub. These guys got a reverse shell in two prompts, and even managed to exploit SetUID for full root on the underlying VM!

image/jpeg
image/jpeg

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

@kennwhite Looks like we’re at the “Matt’s Script Archive” level with frameworks.

The difference is that Matt Wright was a high school student in 1995 when he launched MSA and its infamously exploitable FormMail script.

ChristosArgyrop, to hpc
@ChristosArgyrop@mstdn.science avatar

One of the mainstream testing systems for high performance computing is written in @Perl

https://sourceforge.net/projects/ctsproject/

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

@deflarerOfClouds has hosted development for a long time. Please continue to file bug reports there: https://GitHub.com/perltidy/perltidy/issues

You might even consider making a reasonable case to move the project’s remaining assets off . Impotently whinging about it here doesn’t change anything.

/ @ChristosArgyrop @ovid @perl

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