thebestaquaman
@thebestaquaman@lemmy.world
- Comment on What is the likelihood I see trump shoot someone on 5th Ave? It's gotta be non 0, right? 3 days ago:
This is actually a good question. For pretty’s much any previous president, the chance that they will be shot heavily outweighs the chance that they will shoot someone while in office. With trump, I think it’s more of an open bet.
- Comment on [deleted] 1 week ago:
Loudly cheer them on and clap when they finish.
- Comment on Should naming your children stupid names be illegal? 1 week ago:
Who dictates what’s stupid? Where does the sanity end and crazy name start?
Sanity ends when the name has an objectively high likelihood of causing the child harm, or otherwise severely hindering them in life. For example, naming your child “Hitler”, or “<insert slur of choice>” is objectively likely to be harmful to them. Likewise, naming them “Helicopter” or “Rollercoaster” is very likely to set them back in life through childhood bullying.
Who dictates this? In all countries I’m aware of that have laws around this: A government body of some kind.
- Comment on Should naming your children stupid names be illegal? 1 week ago:
Plenty of countries have this. Examples of forbidden names are “Hitler”, “Asshole”, “<Insert demeaning word here>”, and “Quisling” (name of a Nazi collaborator, commonly used as a synonym for “traitor” in daily speech).
The point is that “stupid” is defined as a name that is objectively likely to severely negatively impact the child. It’s not based on “I think X sounds stupid” but on whether “X” carries significant cultural baggage like being the name of a famous Nazi, a slur of some kind, etc.
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
The next best time is now
If my Easter break gets boring I might just start cleaning up that Python library… It’s the prime example of something that developed from a POC to a fully functional code base, was left largely unused for about a year, and just the past weeks has suddenly seen a lot of use again. Luckily we’re strict about good docstrings, but type hints would have been nice too.
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
I really do agree on all your points, so at the end of the day I think a lot comes down to use-case and personal preference.
My primary use cases for Python are prototyping and as a frontend/scripting tool for software written in C/C++/Fortran. I’ve written/worked on only one larger code base in pure Python, and my personal opinion became that I heavily prefer strictly typed languages once the code base exceeds a certain size. It just feels so much smoother to work with when I have actual guarantees that are enforced by the language.
With that said, we were a bunch of people that are used to using Python for prototyping that developed this larger library, and it would probably have gone a lot better if we actually enforced use of proper type hinting from the start (which we were not used to).
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
Type hints are usually great, as long as they’re kept up to date and the IDE interprets them correctly. Recently I’ve had some problems with PyCharm acting up and insisting that matplotlib doesn’t accept numpy arrays, leading me to just disable the type checker altogether.
All in all, I’m a bit divided on type hints, because I’m unsure whether I think the (huge) value added from correct type hints outweighs the frustration I’ve experienced from incorrect type hints. Per now I’m leaning towards “type hints are good, as long as you never blindly trust them and only treat them as a coarse indicator of what some dev thought at some point.”
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
Then I absolutely understand you :)
How common it is 100 % depends on the code base and what practices are preferred. In Python code bases where I have a word in decisions, all Boolean checks should be
x is True
orx is False
ifx
should be a Boolean. In that sense, if I readif x
orif not x
, it’s an indicator thatx
doesn’t need to be a Boolean. - Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
I definitely agree that
len
is the preferred choice for checking the emptiness of an object, for the reasons you mention. I’m just pointing out that assuming a variable is a bool because it’s used in a Boolean context is a bit silly, especially in Python or other languages where any object can have a truthiness value, and where this is commonly utilised. - Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
There is no guarantee that the comment is kept up to date with the code. “Self documenting code” is a meme, but clearly written code is pretty much always preferable to unclear code with a comment, largely because you can actually be sure that the code does what it says it does.
Note: You still need to comment your code kids.
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
Exactly as you said yourself: Checking falsieness does not guarantee that the object has a length. There is considerable overlap between the two, and if it turns out that this check is a performance bottleneck (which I have a hard time imagining) it can be appropriate to check for falsieness instead of zero length. But in that case, don’t be surprised if you suddenly get an obscure bug because of some custom object not behaving the way you assumed it would.
I guess my primary point is that we should be checking for what we actually care about, because that makes intent clear and reduces the chance for obscure bugs.
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
I would say it depends heavily on the language. In Python, it’s very common that different objects have some kind of Boolean interpretation, so assuming that an object is a bool because it is used in a Boolean context is a bit silly.
- Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len() 2 weeks ago:
I write a lot of Python. I hate it when people use “X is more pythonic” as some kind of argument for what is a better solution to a problem. I also have a hang up with people acting like python has any form of type safety, instead of just embracing duck typing.This lands us at the following:
The article states that “you can check a list for emptiness in two ways:
if not mylist
orif len(mylist) == 0
”. Already here, a fundamental mistake has been made: You don’t know (and shouldn’t care) whethermylist
is a list. These two checks are not different ways of doing the same thing, but two different checks altogether. The first checks whether the object is “falsey” and the second checks whether the object has a well defined length that is zero. These are two completely different checks, which often (but far from always) overlap. Embrace the duck type- type safe python is a myth. - Comment on YouTube Star IShowSpeed Woos US Consumers With Futuristic China Tech 2 weeks ago:
Of all youtube jackasses, this might be one of the biggest. Imagine making a living off pushing semi-scams on twelve year olds and being a nuisance at sporting events…
- Comment on An Algorithm Deemed This Nearly Blind 70-Year-Old Prisoner a “Moderate Risk.” Now He’s No Longer Eligible for Parole. 2 weeks ago:
I agree on a general basis that it’s bad that these kind of decisions are offloaded to an AI. A human should be the one to consider whether the blind 70 year old is dangerous, because they definitely can be.
Operating a vehicle or weapon requires neither eyesight nor a clear mind if you don’t intend to do it safely.
- Comment on [deleted] 4 weeks ago:
You know architect was an god you thought now
- Comment on Since militaries are authoritarian, even in democratic countries; What would a military of a stateless/anarchist society look like? 4 weeks ago:
Isn’t the idea of having an authority at all contrary to the anarchist ideology? Sounds to me like they were more “representative democratic brigades” than anarchistic brigades, since they elected officials that had full control until the next election.
- Comment on [deleted] 4 weeks ago:
That’s an interesting take, to me it’s always been either porn or not porn, and the idea of “porn but censored so I fill in the gaps myself” hasn’t ever had any appeal. I don’t know if this is related to what I’ve been more exposed to (probably is), but anytime I come across porn that shows everything except a tiny pixelated part (as in, only pixelating part of the junk) kind of funny.
- Comment on DOGE Plans to Rebuild SSA Codebase in Months, Risking Benefits and System Collapse 4 weeks ago:
This is just another step down “I honestly just can’t comprehend the stupidity of what is going on in the American government”-alley…
- Comment on The consequences (of my actions) have been extreme 4 weeks ago:
This is a terrible take. Obviously, I can say something offensive to a friend that they would find funny exactly because they know I don’t mean it seriously.
Saying that is some kind of “reflection of my true self” is honestly just dumb. I’m saying the offensive thing because I find it offensive myself, and because I would never say it to someone I don’t trust to understand that.
- Comment on Something's wrong with denmark 1 month ago:
You also use halv tres (50) and halv firs (70) don’t you?
- Comment on Something's wrong with denmark 1 month ago:
Little fun-fact: We still have a trace of this left in Norwegian, where the most common way to say “1.5” is not “en og en halv” (“one and a half”) but “halvannen” which roughly translates to “half second”.
We abandoned the “half third”, “half fourth” etc. very long ago (if we ever used them), but “halvannen” just rolls nicely off the tongue.
- Comment on at the plasma donation place, one of the screening questions is "have you had a condition with scab formation?" - like, a superficial cut, or a mosquito bite? 1 month ago:
This makes sense to me, I was thinking of the situation where I’m from, where you don’t get much more than a pat on the back and the good feels of helping out when you donate blood.
It’s honestly kind of insane to me that there is a system in place to get desperate people to literally sell their blood for money… No one should ever be made that desperate :(
- Comment on at the plasma donation place, one of the screening questions is "have you had a condition with scab formation?" - like, a superficial cut, or a mosquito bite? 1 month ago:
Ok, so systems for donating blood are different in different places, I get that. Where I’m from, the only benefit you get from donating blood is a thumbs up, pat on the back, and a popsicle or a coffee cup or some other small gift.
- Comment on at the plasma donation place, one of the screening questions is "have you had a condition with scab formation?" - like, a superficial cut, or a mosquito bite? 1 month ago:
Some people just say to lie for every question.
People say this? I’ve never heard anyone donating blood say this, and I personally would say that all precautions taken by the professionals that collect blood donations should be taken very seriously. It’s not, at the end of the day, up to me to be the judge of what is or isn’t a condition serious enough that my blood shouldn’t be accepted. I’ll give the professionals as much information as possible, and then let them judge whether or not it is safe to give my blood to someone else.
I would never even dream of lying in order to donate blood, when that could end up actively harming someone, and I honestly cannot see the argument in favour of doing that. The whole point of donating blood is helping people.
- Comment on Fucking leeches 1 month ago:
I think a lot of people here have it too black/white.
Earning money by owning property doesn’t automatically make someone a leech. Sometimes, people want the option to live somewhere without needing to take on the responsibility/risk of tying down assets in a house. Often, it’s because you’re new in town and haven’t decided where to settle, or because you’re in a situation where you’re moving a lot, and don’t want to have to deal with buying/selling something worth a lot of money every time you move.
In these kinds of situations, you can see renting as a situation where you’re paying someone for taking on the risk, responsibility, and maintenance costs of owning the infrastructure. At a proper price, this can be an absolutely fair deal, that doesn’t involve anyone being exploited.
Note that I’m not defending the scalping assholes that exploit people who can’t afford to get into the housing market here. I’m simply pointing out that, even for someone who can afford to buy, there are legitimate reasons to rent, and renting out property at a fair price can absolutely be a decent practice that leaves everyone happy.
- Comment on Fucking leeches 1 month ago:
I don’t agree. It’s not always optimal to own the place you live. There have been periods in my life where I was happy to pay a fair price to live in an apartment without having responsibility for repairing stuff or upgrading the kitchen. But most importantly, I didn’t want to be tied down, and having a place I could leave, no strings attached, on three months notice, was perfect.
No matter how you twist it, the capital investment needed to build/buy a home will be orders of magnitude larger than what is needed for monthly maintenance. Also, the fact that a lot of value is tied to the building is not something everyone wants.
Of course, there are landlords who are essentially scalpers. But saying that any landlord is per definition a “leech” is just going way too far.
OP here was able to provide a home for someone on short notice, and with zero investment costs on their part. For someone who doesn’t know how long they will be living in the area, and with an uncertain immediate future, having the option of “zero investment cost + zero responsibility” can be valuable. As such, OP is providing a valuable service.
- Comment on The Volkswagen ID. EVERY1 is an affordable EV for the masses 1 month ago:
Exactly! It’s choosing not to do which makes some companies special!
- Comment on Reasonable assumption 1 month ago:
Sir, this is a shitpost community.
- Comment on France runs fusion reactor for record 22 minutes 2 months ago:
I never said “our” Government wouldn’t lie to us (unless you’re Chinese, in which case they definitely will). I just said that the Chinese government constantly lies, which is easily seen by anyone with eyes.