cultural reviewer and dabbler in stylistic premonitions

  • 787 Posts
  • 923 Comments
Joined 4 years ago
cake
Cake day: January 17th, 2022

help-circle
  • Arthur Besse@lemmy.mlto196@lemmy.blahaj.zonerule
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 hours ago

    yeah, i edited my comment while you were replying to note that /g is a valid flag for m/// as well. it is a valid perl matching operation precisely as-is but it can’t match anything due to the spaces it has before the ^ and after the $.


  • Arthur Besse@lemmy.mlto196@lemmy.blahaj.zonerule
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    8 hours ago

    from the /g at the end i agree it looks like it could be a malformed attempt at an awk/perl/etc substitution operation, and your rewrite of it as an s/// does work, but the parts between the ^ and $ would also be a valid regexp in Perl-compatible regexp and some other dialects if not for the spaces at the start and end. And, the /g is also a flag (“Match globally, i.e., find all occurrences.”) for the m/// matching operator in Perl.

    The \1 and \2 are backreferences to the capture groups, which can be used not only in the replacement part but also in the pattern itself.

    You can see this working by running this command:

    echo '123 - 45 - 67890 45 123'|perl -ne 'print if m/^(\d{3}) - (\d{2}) - (\d{5}) \2 \1$/g'

    …which will echo the string because it matches the pattern. (if you edit the input string to change, for instance, the last digit, it will no longer match and will output nothing.)

    There is no input that can match the pattern as it is in the comic with the space before the ^ and after the $ however.

    Interestingly backreferences are also supported by POSIX Basic Regular Expressions (BRE), but are not supported by POSIX Extended Regular Expressions (ERE). (Also the former requires you to escape parenthesis and curly braces for them to become meta characters, while the latter requires you to escape them if they’re literals as Perl etc do. And neither of the POSIX flavors supports \d as a shortcut for [0-9].)








  • Arthur Besse@lemmy.mltoPrivacy@lemmy.ml"Trusted" eMail Providers?
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    2 days ago

    Mailbox.org lets you keep your own private key.

    Every email provider lets you keep your own private key if you do encryption using the interoperable OpenPGP standard using software running on your own computer. Many email providers will recommend that you do exactly that, and will helpfully instruct you about how to do so (eg, the more reputable options in this thread such as migadu.com, mailbox.org, posteo.de, and even fastmail.com all have instructions for how to use some implementation of pgp to encrypt your email).

    Meanwhile any company selling non-standard “email encryption” (eg, proton and tuta) which is not compatible with pgp (or, in the corporate world, s/mime, which is also a standard…) is firmly in the snake oil business and should be distrusted and boycotted regardless of which shitty youtubers they’re sponsoring this week.


























  • I don’t follow how a useful thing becomes “useless” or “no point” just because millions of people are unjustly denied access to it.

    Fwiw Let’s Encrypt was just the first but isn’t actually the only free ACME provider anymore; acme.sh has a list of other providers in its readme and there is another list here. Actalis is Italian apparently; unfortunately I think the rest might be ultimately US-based (ZeroSSL says it’s Austrian but it’s owned by a US company).

    It would be nice if some more independent country (eg, China) who already has one or more CAs trusted by all major browsers would step up and start offering free certs to the world.

    It’s worth noting that HTTPS is needed not only for its confidentiality and authenticity properties, but also is required by browsers for pages to be allowed to use modern features like WebRTC (needed to have a voice or video call from a web page).






  • Companies now block older browser versions

    Now? This has been happening since the dawn of the web. At least the screenshot you pasted represents all of the big three rendering engines - it used to be common to see “Internet Explorer version XYZ required”, sometimes with javascript to prevent you from using the site with any other browser (even if in some cases it would actually work fine if you simply spoofed your user agent string).

    I have used kinda retro devices to surf the web at times

    Most websites became HTTPS-only sometime after the snowden disclosures in 2013.

    Over time old versions of TLS have been deprecated and eventually support for them is dropped from browsers and web servers alike. So, a browser from even 15 years ago literally cannot connect to most webservers today.

    Planned obsolescence is terrible but it’s a minor factor here: it’s actually dangerous to use even (especially?) a slightly-out-of-date web browser because every new release fixes vulnerabilities which can be exploited to run malicious code on your computer. The planned obsolescence which prevents people from being able to have an up-to-date browser comes mostly from proprietary operating system vendors; to have up-to-date software while continuing to use somewhat older computers you need to use free/libre software.