shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

286
active users

#regularexpressions

0 posts0 participants0 posts today

Weekend reading for code obsessives, based on my current work adding semi-full regular expressions to Quamina. Two blog entries, coding recommendation, and a quiz/challenge.
1. QRS: Quamina Regexp Series - tbray.org/ongoing/When/202x/20
2. QRS: Parsing Regular Experssions - tbray.org/ongoing/When/202x/20

[If you don’t know what a “regular expression is”, please ignore this, and don’t feel bad, because nobody should have to know that.]

What else is as incredibly impressive, and at the same time as horrifically ugly, as #RegularExpressions?

By the way, if you need to detect #chords in a text chord chart, here is the #regex you need:

"[A-G](b|#)?(maj|min|m|M|\+|-|dim|aug)?[0-9|11|13]*(sus)?[0-9|11|13]*(add)?[0-9|11|13]*(\/[A-G](b|#)?)?"

edit: any #Musicians out there, can you think of any edge-case chords I should test/adjust to catch? This will be part of a Free chord chart organizer, hit me with your worst.

Replied in thread

@sjn @cb 99% of the “#Perl is line noise” complaints are because of unformatted #RegularExpressions. Every language worth anything eventually supports them, but only @Perl (and #awk, earlier) makes them first-class citizens. And with Perl you can format and comment them for readability: perldoc.perl.org/perlretut#Emb

We format the rest of our code for humans. Why not #regexps?

#PerlCritic can warn against bad regexps: metacpan.org/search?size=200&q

perldoc.perl.orgperlretut - Perl regular expressions tutorial - Perldoc Browser