[-] [email protected] 2 points 1 day ago

That's guidance, not law.

[-] [email protected] 3 points 1 day ago* (last edited 1 day ago)

Yeah, that would be the first time enforcement didn't really bother to read the law they should be enforcing.

So they might add it later when stuff like this becomes more common, but right now it's not illegal, according to the law and disregarding everything else that doesn't really have any legal hold and is really just a guideline.

[-] [email protected] 2 points 1 day ago
[-] [email protected] 2 points 1 day ago

I don't believe guidelines are above the actual law.

[-] [email protected] 7 points 1 day ago

Source? Cause mine (https://www.legislation.gov.uk/ukpga/2023/50 aka the fucking law) doesn't say anything like that.

[-] [email protected] 3 points 1 day ago* (last edited 1 day ago)

Source: Dude trust me. It's not there anywhere.

[-] [email protected] 13 points 1 day ago

Many have tried that, IMO getting the word out about VPNs even to non-technical users is important because most people still don't know what that is. If they ever try to ban VPNs, even non-technical people will know how to use them and how to avoid the bans.

174
submitted 1 day ago by [email protected] to c/[email protected]
3
submitted 2 days ago by [email protected] to c/[email protected]
[-] [email protected] 4 points 2 days ago

Love that song! And enjoy the show! I saw them some 14 years ago and it was amazing!

[-] [email protected] 3 points 3 days ago

I really, really hope an alternative to MasterCard and Visa appears, at least here in EU.

[-] [email protected] 12 points 4 days ago

Because Linux is so effective that the GPU temperature tops at 69, which is nice.

[-] [email protected] 11 points 4 days ago

Or just buy on GOG and don't buy Denuvo games.

[-] [email protected] 11 points 4 days ago

How exactly is Steam consumer friendly? Or is the bar so low that companies that don't shoot themselves in their feet by mistake because they were actually aiming for the customer are considered "consumer friendly"?

25
submitted 2 weeks ago* (last edited 2 weeks ago) by [email protected] to c/[email protected]
5
submitted 1 month ago by [email protected] to c/[email protected]

cross-posted from: https://chrastecky.dev/post/16

Starting with PHP 8.5, you'll be able to do the following:

 public function __construct(
    final public string $someProperty,
) {}

This wasn't possible before, as promoted properties couldn't be declared final.

Perhaps the more interesting part is that you can now omit the visibility modifier if you include final. In that case, the property will default to public:

 public function __construct(
    final string $someProperty, // this property will be public
) {}

Personally, I’m not a fan of this behavior — I prefer explicit over implicit. Fortunately, it can be enforced by third-party tools like code style fixers. Still, I would have preferred if the core required the visibility to be specified.

What do you think? Do you like this change, or would you have preferred a stricter approach?

5
submitted 1 month ago by [email protected] to c/[email protected]

cross-posted from: https://chrastecky.dev/post/13

This change is quite straightforward, so this won’t be a long article. PHP 8.5 adds support for annotating non-class, compile-time constants with attributes. Compile-time constants are those defined using the const keyword, not the define() function.

Attributes can now include Attribute::TARGET_CONSTANT among their valid targets. Additionally, as the name suggests, Attribute::TARGET_ALL now includes constants as well. The ReflectionConstant class has been updated with a new method, getAttributes(), to support retrieving these annotations.

One particularly useful aspect of this change is that the built-in #[Deprecated] attribute can now be applied to compile-time constants.

As promised, this was a short post, since the change is relatively simple. See you next time—hopefully with a more exciting new feature in PHP 8.5!

6
submitted 1 month ago by [email protected] to c/[email protected]

cross-posted from: https://chrastecky.dev/post/15

PHP has long had a levenshtein() function, but it comes with a significant limitation: it doesn’t support UTF-8.

If you’re not familiar with the Levenshtein distance, it’s a way to measure how different two strings are — by counting the minimum number of single-character edits (insertions, deletions, or substitutions) required to change one string into another.

For example, the following code returns 2 instead of the correct result, 1:

var_dump(levenshtein('göthe', 'gothe'));

There are workarounds — such as using a pure PHP implementation or converting strings to a custom single-byte encoding — but they come with downsides, like slower performance or non-standard behavior.

With the new grapheme_levenshtein() function in PHP 8.5, the code above now correctly returns 1.

Grapheme-Based Comparison

What makes this new function especially powerful is that it operates on graphemes, not bytes or code points. For instance, the character é (accented 'e') can be represented in two ways: as a single code point (U+00E9) or as a combination of the letter e (U+0065) and a combining accent (U+0301). In PHP, you can write these as:

$string1 = "\u{00e9}";
$string2 = "\u{0065}\u{0301}";

Even though these strings are technically different at the byte level, they represent the same grapheme. The new grapheme_levenshtein() function correctly recognizes this and returns 0 — meaning no difference.

This is particularly useful when working with complex scripts such as Japanese, Chinese, or Korean, where grapheme clusters play a bigger role than in Latin or Cyrillic alphabets.

Just for fun: what do you think the original levenshtein() function will return for the example above?

var_dump(levenshtein("\u{0065}\u{0301}", "\u{00e9}"));
5
New version released! (lemmings.world)
submitted 1 month ago by [email protected] to c/[email protected]

As I outlined in a previous post, the new major version is released!

The migration guide for self-hosters is here: https://github.com/RikudouSage/LemmySchedule/blob/master/migrating_v2.md


As mentioned in another post, I accidentally deleted all scheduled jobs on the https://schedule.lemmings.world/, so if you used that, you need to recreate your schedules from scratch.

7
submitted 1 month ago by [email protected] to c/[email protected]

You know how in the previous post I urged everyone to do proper backups? Well, guess what happened... If you use https://schedule.lemmings.world/ as your scheduler, all your posts were deleted, including recurring ones etc. Sorry for the inconvenience.

6
Major rewrite coming (lemmings.world)
submitted 1 month ago by [email protected] to c/[email protected]

I've merged a significant rewrite into the main branch and will be releasing it soon.

Before I do so, I want to let everyone know that this will be a major release which means some old functionality will be left behind and some new is coming and you should take care when upgrading.

Namely, backup the volumes you have bound for runtime cache and uploaded files. Those are bound to these container directories:

  • /opt/runtime-cache
  • /opt/uploaded-files

The database format has changed completely and is incompatible with the old version, after you upgrade to the (soon-to-be-released) version 2, you won't be able to come back to any previous version. For that reason, the only way to downgrade in case of migration failure is by using the aforementioned backup.

I've tested it a lot and the migration works well, but there's always the possibility that your instance has some weird edge case I didn't think of.


On the off chance you used the serverless deployment to AWS, it's now unsupported and Docker (or manual deploy) are the only supported options now. To migrate from Dynamo DB cache backend, I've added a app:migrate-dynamo command you can use.


The reason for this rewrite is simple, back when this project started, only very simple use-cases were supported and using a cache instead of DB was fine, but now I've basically implemented a few relational database features into a key-value cache storage and then I thought "Hey, you know what else has relational database features? Relational databases!" so here we go.

Pretty much nothing else has changed (except some general modernization and a few unrelated bug fixes), but this will make it possible to implement new features without losing my sanity.

785
Shots fired (lemmynsfw.com)
submitted 1 month ago by [email protected] to c/[email protected]
15
Flower in a wall (lemmynsfw.com)
submitted 1 month ago by [email protected] to c/[email protected]
10
Flower in a wall (lemmynsfw.com)
submitted 1 month ago by [email protected] to c/[email protected]
view more: next ›

rikudou

0 post score
0 comment score
joined 2 years ago
MODERATOR OF