TootSweet
@TootSweet@lemmy.world
- Comment on Microsoft PC Manager App 'Repairs' Your System by Making Bing the Search Default 18 hours ago:
Obligatory “install Linux” post.
- Comment on "🧪" 1 day ago:
I don’t have a dirty mind, you have a dirty mind.
- Comment on Americans will find a new way to ruin their tastebuds every single day 1 day ago:
Yes, Officer. That one right there.
- Comment on Why Didn't Democrats Do More When They Controlled Both Houses of Legislature, The White House, and The Supreme Court During Obama's First Term? 1 day ago:
“They go low, we go high.” Translated “they break the rules and try to overthrow the government, we roll over and beg for more.”
- Comment on New Drake Diss just dropped 1 day ago:
pooping in the fridge
- Comment on My favorite photo from my vacation! 3 days ago:
Ordinarily I downvote AI-generated content outside of AI-specific communities, but a) by posting here OP’s admitting it’s shit, and b) the current score is 151 and I don’t want to change that.
- Comment on In this house we share the bananas 3 days ago:
Weird. It didn’t paywall me. You could try clearing your cookies or using 12ft.io. (12ft.io sometimes works for me.)
Honestly, I just vaguely remembered hearing about that experiment and when this post came up I googled (well, DuckDuckGo’d, but anyway) “monkey money experiment prostitution” and picked the first link that seemed to be about the experiment I’d remembered hearing about.
- Comment on In this house we share the bananas 3 days ago:
- Comment on what lemmy web app do you use and why? 1 week ago:
Yes! I didn’t even think to check until now. Thank you, kind stranger!
- Comment on what lemmy web app do you use and why? 1 week ago:
Jerboa. Because it’s fully open source and it’s the first one I installed and I have yet to have enough of a problem with it to look for alternatives. (The left-right swipe features are… not a good thing, but they’re not bad enough to make me want to switch.)
- Comment on How do you build complex shapes? 2 weeks ago:
I model exclusively with OpenSCAD and a shit ton of math. (Full disclosure, for some of the most absolutely complex things I’ve done, I’ve written Go code to generate OpenSCAD code. But it’s not often that I need that.) And I make some pretty complex things. I’m currently working off-and-on on a 3d-printable mechanical keyboard, for instance.
OpenSCAD, in case you don’t know, is a straight up programming language for doing CAD. It doesn’t even provide you the option to adjust anything with the mouse.
It’s hardcore, but it does the job.
- Comment on histories mysteries 2 weeks ago:
My mother got really interested in these things a while ago. I think she mostly buys into the glove-knitting theory. Whatever the case, I 3D printed her a model of one and it’s sitting on the mantle over her fireplace.
- Comment on 𝕐: What Comes After 𝕏? 2 weeks ago:
If ℕ is natural numbers and ℚ is rational numbers and ℤ is integers and ℝ is the rational numbers, what are 𝕏 and 𝕐?
- Comment on Best options for entry level 3D printing available these days? 2 weeks ago:
Yeah, good call. I’d definitely say Creality is good about being open. I’ve flashed the firmware on one of my two Creality printers. And upgraded it a couple of times, though admittedly only with official Creality parts.
I have a friend who had a printer that I believe didn’t have an SD card slot and the Wifi died on it, so it became roughly-speaking useless. I like to lean toward fewer moving parts even if it makes for some inconveniences like having to actually load it onto an SD card and put it in the machine.
If I did really care about wifi connectivity, I’d probably still buy a machine without Wifi built-in and attach a Raspberry Pi running Octoprint to the side.
- Comment on Microsoft and IBM make MS-DOS 4.00 Open-Source 2 weeks ago:
Yeah. This is Microsoft we’re talking about.
- Comment on Microsoft and IBM make MS-DOS 4.00 Open-Source 2 weeks ago:
Extremely enlightening comment here.
Sounds like IBM kindof got ripped off. Seems about right for Gates/Ballmer/Microsoft.
And I bet a lot more of that jank is still in modern Windows than I’d like to think about.
- Comment on Best options for entry level 3D printing available these days? 2 weeks ago:
I’ve never had occasion to need to contact Creality customer support, and aside from bed adhesion with my Ender 3 Pro before I added a CR-Touch, I haven’t had any issues with my Creality printers. “No auto bed leveling out of the box” isn’t the case for most of Creality’s printers. (I didn’t mean to imply by “I would pay extra for autoleveling” that Creality makes you pay extra for that. Their bottom-of-the-line printers have autoleveling now-a-days.) And my experience with my two Creality printers was that they “work perfectly out of the box.”
I don’t have any experience with Elegoo printers.
- Comment on Trying to get DOS 6.22 on an SD Card, to then run via an ISA IDE to SD Adapter on my Commodore PC-10 III, but It doesn't wanna boot. What am I doing wrong? 3 weeks ago:
Ah! SDHC.
So, SDHC cards are a little different than regular SD cards (the protocol used to communicate with the card is a little different) and often aren’t supported by particular SD card readers like potentially the SD-to-IDE adapter you’re using.
(I know back in the day, I hacked my Nintendo Wii, which involved loading a bunch of homebrew programs on an SD card, and at first it didn’t support SDHC cards until there was a firmware update.)
Technically, I think any SD card can be SDHC, but almost always SDHC is only used by high-capacity cards. Also, I think they usually say “SDHC” physically on the card.
So, probably the next thing I’d try if I was you was to change out your SDHC card for a non-HC SD card. Any 8GB to 32GB card should be fine, I’d think. (If you have any that are smaller even than that, like 256MB, even, you could at least use it to confirm that’s the issue. You just couldn’t expand the partition sizes out to 2GB.)
- Comment on Best options for entry level 3D printing available these days? 3 weeks ago:
I’m a huge fan of Creality printers. If I were starting over today and didn’t have my eye on any specific bell or whistle, I’d probably get a Creality Ender 3 V3 or Ender 3 V3 SE. The Ender 3 Pro and Ender 3 V2 Neo I have now are great. Very reliable and easy to maintain.
One bell/whistle I’d 100% pay extra for is autoleveling. (A z probe rather than a z endstop.) My Ender 3 Pro came with an endstop rather than a probe. As soon as I got the V2 Neo that does have a z-probe I immediately decided to upgrade my Ender 3 Pro with a z-probe. With just the endstop, I had constant issues getting the first layer to adhere, especially if I was printing something that used a significant portion of the bed.
- Comment on Trying to get DOS 6.22 on an SD Card, to then run via an ISA IDE to SD Adapter on my Commodore PC-10 III, but It doesn't wanna boot. What am I doing wrong? 3 weeks ago:
I’m not familiar with the tool they talked about for burning the image to the SD card, but can you share a screen shot of the options you used when burning the image?
- Comment on Trying to get DOS 6.22 on an SD Card, to then run via an ISA IDE to SD Adapter on my Commodore PC-10 III, but It doesn't wanna boot. What am I doing wrong? 3 weeks ago:
Just some thoughts off the top of my head.
- Did you burn the image to the partition on the card or to the card? (You’ll want to do the latter.)
- You might want to try booting from the card before expanding the partition to 2GB just to make sure the partitioning program isn’t doing anything bad.
- Can you check and see if one of the partitions on the card is marked as a boot partition?
- Maybe just open the disk itself in a hex editor if you can and make sure whether the MBR seems to have bootloader code in it.
- Comment on What do companies get out of rewards programs 3 weeks ago:
Anyone who says I’m a Nestle spam bot is a dirty liar.
I’m actually a Nabisco spam bot.
- Comment on What do companies get out of rewards programs 3 weeks ago:
First, more business. (If you get “rewards” like discounts or whatever, you’re psychologically more likely to return more often. Or at least some customers are and it’s not like they can really offer rewards only to the ones who are more likely to return.)
Second, and probably more significantly, data about you that they can use to do targeted advertising at you or sell to others (for a profit) who want to do targeted advertising to you.
If the rewards program involves a phone app or web app, that can get access to a lot of information on your phone or information about your browsing habits. And that can also be directly used or sold to someone else who wants data on you.
You’re definitely justified in being paranoid. It’s very much the kind of thing where if you stop buying Oreos regularly, Facebook will start sending you Oreo advertisements. (Oreos are just an example. It could be any company/brand that they advertise to you this way. But you know what I mean.)
- Comment on Tensei Shitara Slime Datta Ken 3rd Season • That Time I Got Reincarnated as a Slime Season 3 - Episode 3 discussion 4 weeks ago:
Oh shit. I didn’t even realize season 3 had started.
- Comment on FFmpeg 7.0 Released With Native VVC Decoding & Multi-Threaded CLI 4 weeks ago:
I really want ffmpeg to start supporting the wlroots screen grab API.
Or for Wayland to get an official screen grab API, but that may be a much longer time coming.
- Comment on I wonder if an argument from the elite against gender fluidity is that the future AI models to track us all via camera will find it harder to assign gender. 4 weeks ago:
I’ve reread the title of this post five times now and the only thing I’m certain of is that I have no idea what it’s trying to say.
- Comment on And you're telling me that code interviews don't work... 4 weeks ago:
The really short version is that the first solution (with the for loop) can take “a long(er) time” depending on the values of x and y.
Say x is negative one million and y is positive one million. If the loop takes, say, a microsecond per iteration, the result would take roughly 2 seconds.
The second option is one decrement operation, one increment operation, two multiplication operations, one subtraction operation, and one division operation. No matter the values of x and y, the latter option will always take exactly the same amount of time.
There’s a concept of “Big-O notation”. If the amount of time an algorithm takes increases linearly as some value in the problem (in this case, the value of y minus x), we say that’s a “O(n)” runtime. That’s the case for the first solution I posted above. If the algorithm takes the same amount of time no matter what parameters are given, we say it’s “O(1)”. That’s the case for the second option above. (If it takes the square of some parameter, we say it’s “O(n^2)”. Exponential? “O(2^n)”. Etc.)
(And, I’m handwaving quite a bit of rigor and details here. But hopefully you get the basic idea.)
99% of the time, if you’ve got a choice between a O(n) algorithm and an O(1) algorithm, you’re better off to go with the O(1) algorithm. It is entirely possible that an O(n) algorithm could run faster than O(1) in some special cases, but those special cases are almost always when n is small and the runtime of either one is going to be negligible. If n is large, you can get some very large time savings.
(And again, I’m leaving out details, but there’s a lot online about Big-O notation or “asymptotic runtime bound”.)
The different Big-O classifications tell you how “quickly” the runtime increases based on the parameter. O(n^n) grows quicker than O(2^n) which grows quicker than O(n^2) (or even O(n^c) where c is any constant) which grows quicker than O(n*log(n)) which grows quicker than O(n) which grows quicker than O(log(n)) which grows quicker than O(1). And in general, picking an option that’s alter in this list is almost always better than picking one earlier.
Now, why the latter works. The sum of integers from 1 through n is the same as
n*(n+1)/2
. The sum of integers from x to y is just the sum of integers from 1 to y minus the sum of integers from 1 to x-1.y*(y+1)/2 - (x-1)*(x-1+1)/2 = y*(y+1)/2 - x*(x-1)/2 = (y*(y+1)-x*(x-1))/2
.Oh, and to your specific question, both of the solutions I posted in the meme assume that the question meant specifically all “integers” between x and y inclusive. So, no, doesn’t have to do with whether we read “numbers” there to mean integers or something else. Theoretically, the two solutions I posted should always give the same answer (so long as y >= x, which is a given in the question; perhaps also so long as no integer overflow/underflow occurs… I haven’t thought that one through fully yet. Heh.) The only reason the second is preferable is because it’s “quicker” and its runtime doesn’t depend on the value of the parameters. I guess one could also argue the latter, being a one-liner, is more terse, which may also be desirable.
- Comment on And you're telling me that code interviews don't work... 4 weeks ago:
Question: Assuming you have two integers, x and y, with y bigger than x. Sum all the numbers from x to y.
The imprecision of the question itself bugs me, but I think the Geordi meme above has it right for the most reasonable reading of the question text.
- Comment on sleep paralysis 4 weeks ago:
Sleep paralysis is just the summoning ritual for the Hat Man.
- Comment on [deleted] 5 weeks ago:
Oh look. A 12 year old.