![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://beehaw.org/pictrs/image/c0e83ceb-b7e5-41b4-9b76-bfd152dd8d00.png)
Which is better in what way exactly?
Which is better in what way exactly?
You mean does the 80s-based protocol that doesn’t even support encryption support voice?
It doesn’t support having messages received while you were offline
IRC supports one and one thing only: N-wise chats to connected clients. That and delusional nerds who like to think they’re better than everyone else. Huge support for that too.
People who actually have sane standards for their instant messaging use the Matrix decentralized chat protocol when they need non-proprietary coms, or revolt
I think it’s fair. You should know if your family cheats if you share your games with them
That’s insane
Also lol at the people getting mad at the tea maintainer for “name calling” the guy hired to write up the scam PR
Gig economy or not this idiot should have known better
deleted by creator
Factorio is priced appropriately
It’s less that it never goes on sale, more like it is always on sale
That’s a big one, generating thumbnails client-side rather than running an imagemagick instance on the server to re-size pictures on upload
I used it to generate hashes of the pictures as well, once.
Adding watermarks too. There are virtuous watermarks as well, I remember having to code up a transparents watermark over people’s IDs to make sure that when they submitted their renters dossier (it was a real estate renting service), it couldn’t be used to commit identity theft by the homeowner later down the line or re-used for something else.
Ah nah Canvas is used for so much stuff and it’s sometimes way under your radar in stuff you wouldn’t at all expect
For instance
I’ll let you look at the comments to see how they circumvented this
async function generateFacePic(commentData: SnooComment, ppBuffer: HTMLImageElement[], displaySize: number = 50): Promise<HTMLCanvasElement> {
const imageSeed = /* a random number */
const imageElement: HTMLImageElement = /* someone's avatar */
// Purpose of copying: A single <img> tag cannot be in multiple spots at the same time
// I did not find a way to duplicate the reference to an img tag
// If you use Element.appendChild with the same reference multiple times, the method will move the element around
// Creating a new <img> tag and copying the attributes would work, but it would fetch the src again
// The image at thispersondoesnotexist changes every second so the src points to a new picture now
// Since the URL has a parameter and hasn't changed, then most likely, querying the URL again would
// hit the browser's cache. but we can't know that.
// Solution: make a canvas and give it the single <img> reference. It makes a new one every time. It doesn't query the src.
const canv = copyImage2Canvas(imageElement, displaySize);
canv.classList.add(`human-${imageSeed}`);
return canv;
}
I’ve seen canvas being used for github-like random avatars, graphs, logos, to create dynamic previews of images on the page in online shops, …
Oh no
They’ve angered the 38 year olds of the comment section
Null pointers, runtime exceptions and try catch blocks in 2023
Having seen original source code hasn’t been an issue in previous cases where the reimplementation was done in another language with the changes one would expect coding up something a second time, I believe
“Good 4k tvs without bloat, site:lemm… oh.”
Fuck, I will never be this cool
i am devastated
That'd be like deploying a satellite to find your own ass…
You can find it in action on regex101 with the regex indeed matching the query string in the maliciouswebsite and not matching even just something with the port and no user/password
It is valid (just weird & not recommended) to give a user:pw combo to a website that doesn’t ask for one in the headers. Browsers stripping it off is a different thing
The sheer number of things you have to take into account to properly parse a URL should convince you to not use regexes for it
The fact that it’s less code, more correct, faster and more readable to use new URL() should also be enough to convince you to not use regexes
Lmao ah yes, one of those
If you’re not convinced with this you never will
You can just wrap your var with “new URL()” and have something faster, correct and easier to read, but I’m guessing you’ll change your ways silently in a few years when you’ve forgotten about this interaction and managed to convince yourself it was your own idea!
Until then i guess you can add /c/whatev at the end of my two examples and find something else to criticize and decide not to support
Oh man I was hoping you’d ask because URLs are way worse than people imagine and that’s still not even a tenth of what emails can do
HtTpS://user:pw@lemdro.id:443 is a valid url to lemdro.id and should match but will not
Http://maliciouswebsite.to/?q=http://lemdro.id will match but should not
To give you an idea of how bad this is I suggest anyone tell me if their lemmy app parsed those properly because Thunder treats the 1st one as an email and Jerboa thinks both are URLs
You also have the instances that have a valid address with www in front of them for old school internet habits, there’s urls that can have quotes in them, urls with chinese characters or russian characters that are both valid in their encoding but have a canonical form in ASCII
It’s a mess, and the correct way to do this is still faster than your regex in the end which is crazy
Never use regex on URLs, they’re not enough to properly do the job, you have the perfect, fast and correct URL parser already in your browser or your node binary, you need to use it, make a list of hostnames and use the browser’s URL api to extract hostnames then match against the list
It ““worked”” in France
It still kills most of the userbase when they do it
Normal people don’t know what a fucking dns is
You end up with 10 more new sites and a drop in quality and an endless game of cat & mouse