- 57 Posts
- 899 Comments
You sure want to die on this hill.
bleistift2@sopuli.xyzto
Technology@lemmy.world•Amazon's Ring and Google's Nest Unwittingly Reveal the Severity of the U.S. Surveillance StateEnglish
1·2 days agoYou can clear your denomination from your file. I don’t know if it survives in a changelog, though.
I think you underestimate the cost of shooting a real guy sitting at a table. Casting, lighting, filming, makeup, props, location, color correction all cost money. And I probably forgot about a few things. Film is ridiculously complex.
bleistift2@sopuli.xyzto
Technology@lemmy.world•Amazon's Ring and Google's Nest Unwittingly Reveal the Severity of the U.S. Surveillance StateEnglish
10·3 days agoIn a little town in the Netherlands life was good. The planning committee actually had smart people who made sure to plan the town according to the people’s needs. Kosher butchers, for instance, were placed near Jewish community centers. They could do that because the town had kept records on who lived where, including the people’s religion. It really was a utopia.
Then the nazis invaded, got their hands on those registries, and with utmost efficiency cleared the town of all jews.
I don’t know if this story is true. I read it (probably much better worded) a few years ago. But it honestly doesn’t matter if it’s true.
bleistift2@sopuli.xyzto
Technology@lemmy.world•An open source repairable printer.English
27·4 days agoI imagine that similar regulations exist in the EU. For instance, no copy machine will let you copy a Euro bill.
bleistift2@sopuli.xyzto
Programmer Humor@programming.dev•POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.English
12·4 days agoYou can, but you shouldn’t. You don’t know what else relies on Math.random. That’s why there’s the wrapper function. That you can override in unit tests without worrying about other, unrelated code.
bleistift2@sopuli.xyzto
Programmer Humor@programming.dev•POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.English
18·4 days ago“You ain’t gonna need it”. It means: Build the thing you need now and don’t try to predict what you’ll need in 3 years. You ain’t gonna need it anyway.
For anyone else having trouble parsing the lower part: “Seeing a shooting star [is] itself a wish for many.”
If you want to see shooting stars, the next good opportunity is around April 22, where the Lyrids produce about one shooting star every three minutes (in good conditions).
If you’re patient but very easily distracted, wait for the Geminids around December 14 producing about 2 shooting stars per minute; or the Perseids around August 12 with slightly fewer.
All of the above assumes you’re in the Northern hemisphere.
bleistift2@sopuli.xyzto
Programmer Humor@programming.dev•POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.English
2·4 days agoIf I understand correctly, you want to check the current domain (eg. w3schools) against api.w3schools and www.youtube, and return true for the first and false for the second (or the other way around)
Then technically it’s possible without string splitting:
const href = 'retrieved-from-the-anchor-element'; (new URL(href, location.href).hostname).endsWith(location.hostname)
bleistift2@sopuli.xyzto
Programmer Humor@programming.dev•POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.English
3·4 days agoThanks for the write-up. Your use case is different from all I’ve ever had. It’s good to be reminded that my world view isn’t universal.
bleistift2@sopuli.xyzOPto
memes@lemmy.world•Some programs really teach you to save regularlyEnglish
1·4 days agoPersonally, I would be fine if GIMP had just said, “too many operations, shrinking Undo history” or something like that. No amount of optimization gets rid of this issue. At some point, the machine’s resources are just exhausted.
bleistift2@sopuli.xyzto
Programmer Humor@programming.dev•POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.English
7·4 days agoI see your point regarding global scope. But personally, I’ve never encountered an issue with it. And it’s kinda nice not to have to import
fetchevery time you need it.Regarding subdomains, if you’ll humor my curiosity: What’s the use case? I also wonder what an API for this might look like.
const {domain, subdomains, rootDomain} = new URL('https://wikipedia.org/') // 'wikipedia.org', [], 'wikipedia.org' const {domain, subdomains, rootDomain} = new URL('https://foo.bar.baz.net/') // 'foo.bar.baz.net', ['foo.bar.baz.net', 'bar.baz.net'], 'baz.net'
bleistift2@sopuli.xyzto
Programmer Humor@programming.dev•POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.English
34·4 days agoPretty sure OP’s image is hyperbole.
bleistift2@sopuli.xyzOPto
memes@lemmy.world•Some programs really teach you to save regularlyEnglish
1·4 days agoI was waiting for this comment. No, I won’t troubleshoot magical hardware that only fails in GIMP.
bleistift2@sopuli.xyzto
Programmer Humor@programming.dev•POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.English
147·4 days agoOne way in which this could have come about is that
Math.randomwasn’t supported in all relevant browsers when the library author wrote the library. So they had to roll their own randomness with blackjack and hookers. Later the web standards evolved and the author was able to remove the custom code, but now had people relying on his library’s exposing agetRandomfunction.
bleistift2@sopuli.xyzto
Programmer Humor@programming.dev•POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.English
21·4 days agoI think
irandshould floor instead of round. First, when you want to generate a random number between 0 and 6 it’s often useful to exclude the 6. (See also https://www.cs.utexas.edu/~EWD/transcriptions/EWD08xx/EWD831.html).Second,
irand(0, 6)has a higher chance of rolling a 1 than a 0 because the capture area for 1 is [.5, 1.5), while the capture area for 0 is only [0, .5)Also if you had chosen any other variable names, it wouldn’t have taken me 5 minutes to figure out what these things do.
And one more, if you had swapped the input parameters, and defaulted to
n=0, you could call the use case “random number up to 6” with justrand(6)instead ofrand(0, 6).None of that matters in a private project, but… it just itched to point these things out.
bleistift2@sopuli.xyzto
Programmer Humor@programming.dev•POV: You maintain a JS library that 80% of modern web infrastructure uses as a dependency.English
5·4 days agoWhich of these things, excactly? That
Mathjust floats around in the global scope? Or that that destructuring assignment works? Or that the author chose to abstract around Math.random(). That has come very handy for me when testing.
bleistift2@sopuli.xyzOPto
memes@lemmy.world•Some programs really teach you to save regularlyEnglish
2·4 days agoHmm, but that shouldn’t end up taking that much space either, no?
I can confirm that it indeed uses little RAM.
I was wrangling lots of big images and noticed that RAM usage was increasing steadily. Though that only seems to happen when generating new layers (e.g. by combinding them). Moving, for instance, does nothing. However I just noticed that doing things like adjusting the contrast (using the values histogram tool, sorry don’t know its English name) or adjusting the color temperature adds 300–400MBs. Do each operation three times on 9–12 images and you have a deadly amount of RAM usage.



Boy, I recently had to look into the Java backend to figure out… something. I can’t remember.
It turns out that they needed to inject a bean into their class which was itself calling a factory, which according to documentation, instantiated three other classes just to make a fucking HTTP request! What’s worse, that clusterfuck of a (fairly standard) library required the base URL to be declared separately from the actual paths, and both the base URL needed to end with a slash, and each path must begin with one. Every reasonable programmer would assume that this is a mistake because the final path would end up with two slashes, but the library actually required that.
Meanwhile, frontend:
fetch('url').then(r => r.json()).then(beHappy)