sjmarf

joined 1 year ago
174
I love Swift (sh.itjust.works)
 
 
34
Oh no (sh.itjust.works)
 
 
 
 
 
[–] [email protected] 102 points 2 months ago* (last edited 2 months ago)

not() is a base function that negates what’s inside (turning True to False and vice versa) giving it no parameter returns “True” (because no parameter counts as False)

Actually, not is an operator. It makes more sense if you write not() as not () - the () is an empty tuple. An empty tuple is falsy in Python, so not () evaluates to True.

610
Sus (sh.itjust.works)
 
[–] [email protected] 5 points 2 months ago* (last edited 2 months ago)

Oh, really? That's disappointing to hear; I had no idea he was like that.

[–] [email protected] 20 points 2 months ago* (last edited 2 months ago) (4 children)

Oh hey, it's the Minecraft guy

434
The Titanic (sh.itjust.works)
 
[–] [email protected] 119 points 3 months ago

It’s a joke.

[–] [email protected] 45 points 7 months ago (2 children)
[–] [email protected] 5 points 7 months ago

Can a panther be born from two black panthers and not be black?

Based on my rudimentary high-school knowledge of alleles, the answer would be “yes” for some jaguar pairings, with a 25% chance of getting a regular jaguar in those pairings. It wouldn’t be possible for leopards.

I’m not an expert though so if I’m wrong feel free to correct me

[–] [email protected] 14 points 7 months ago* (last edited 7 months ago)

OC isn't claiming that the shift in the industry is solely Apple's fault:

I don’t hate Apple but I do hate their influence

The reality is that what OC said is exactly what happened. Apple removed the headphone jack to coerce people into buying AirPods. Everyone else released their own wireless earbuds to compete, and also removes their headphone jacks for the same reason.

[–] [email protected] 10 points 8 months ago (2 children)
[–] [email protected] 20 points 8 months ago (2 children)

Swift’s extensions system has spoiled me, and I feel the pain of this whenever I have to write Java

[–] [email protected] 5 points 8 months ago* (last edited 8 months ago) (2 children)

Backend of the app or the lemmy server? if it is not stored on the lemmy server then there will be no way to delete it even if the app stores the token.

Apologies, I worded that badly. Lemmy uses an image hosting service called pictrs to manage the images you upload, which is largely separated from the rest of the Lemmy backend. Pictrs of course stores the delete tokens matching each image, but Lemmy doesn't associate those tokens with the posts or comments they originated from as far as I know.

[–] [email protected] 33 points 8 months ago* (last edited 8 months ago) (6 children)

I’m a developer of a Lemmy client. When you upload an image to a Lemmy instance, the instance returns a “delete token”. Later, you can ask the instance to delete the image attached to the delete token. So as long as you keep hold of the delete token for a specific image, you’re able to delete it later.

Lemmy-ui (the official frontend) will give you the option to delete an image again shortly after uploading it. However, it’s not possible to remove the image after actually creating the post, as the delete token associated with that post isn’t remembered anywhere on the Lemmy backend.

As for other Lemmy clients, YMMV. The client I work on (Mlem) deletes images if you remove them from a post before posting it, but has the same pitfall as Lemmy-ui in that it won’t delete the image if you’ve already created the post.

It would be possible to locally save the delete tokens of every image you upload, so that you can request that they be removed later. I don’t know of any clients that can do this yet, though (if someone knows of one, feel free to mention it).

Edit: clarity

view more: next ›