News for hackers. Stuff that matters.

Sandman

Re:Herdr has released native app on Friday October 30, 2026 @05:20AM (#50301494)
Herdr looks awesome, exactly what I need. However, automatic updates worry me in the light of recent supply chain attacks. I don't want be in a situation where one day I just find out I'm running malware on my computer. I'm not sure if there's an option to turn it off.
Re:OO in Python is mostly pointless on Thursday January 28, 2021 @05:37AM (#25940320)
Should super then also be a method argument?
Re:OO in Python is mostly pointless on Thursday January 28, 2021 @02:41AM (#25939261)
Wouldn't it be more explicit if there was a designated keyword that objects could use to access their own members instead of implicitly assuming that any first argument to a method is a reference to them, only called 'self' by convention?
Re:A word for a value between 0 and 1 (inclusive) on Friday September 04, 2020 @07:45AM (#24374062)
I'm genuinely sorry if I came across as condescending, that was not my intention at all.

I merely wanted to point out that, in my opinion, this property should be reflected in parameter type, rather than the name. Just like, if we wanted a parameter that should only be a whole number, we wouldn't declare it as a float and name it "MyVariableInteger" and hope that the callers would only send integers.

You mentioned that there are quite a few languages that do not permit what I proposed, would you mind specifying which ones exactly? The only one that comes to my mind is assembly?

Re:A word for a value between 0 and 1 (inclusive) on Friday September 04, 2020 @05:51AM (#24373432)
I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type. In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1].

EDIT: Some of you asked what about languages that don't support such more constrained types, so to answer all of you here: different languages have different capabilities, of course, so while some may make what I proposed trivial, in others it would be almost or literally impossible. However, I believe most of the more popular languages support creation of custom data types? So the idea (for those languages at least) is quite simple - hold the value as a float, but wrap it in a custom data type that makes sure the value stays within bounds through accessor methods.

Re:Honey bee venom found to kill breast cancer cells on Tuesday September 01, 2020 @09:42AM (#24341619)
Re:What Are Spomeniks? on Tuesday April 07, 2020 @05:25AM (#22801658)
Croatian here. You're correct, if you only said the word "spomenik" to anybody from former Yugoslavia, they wouldn't be able to distinguish whether you're talking about precisely those monuments built after WW2, or any other monument built before or after the communist era. Or even, say, Washington monument (In Croatian it's literally called "Washingtonov spomenik"). The word "spomenik" means "a monument" and just that. I was actually surprised to learn that in English the word refers to monuments from a particular location and particular era.
then there is no point switching

Why not? Your chances of choosing the correct door were 1 in 3 from the start. That doesn't change with the fact that the host opens the doors at random.

If you only ever offered the players to switch if they picked the car, they'd soon realize this and never switch when they're offered this chance. Also, players that picked a goat at first would have no chance of winning the car.
Re:The Arrogance of the Anthropocene on Tuesday October 15, 2019 @06:46PM (#21264846)
Cool, I didn't know about that one! I'm going to check it out, thanks for the link!
> I suspect you don't know actual American military personnel very well, especially officers and NCOs, and how seriously we take the Laws of Warfare, AND the Constitution.

You're right, I don't. But, if Americans don't need to fear that they'll have to fight the US Army, why have the 2nd amendment at all? Who would they need to protect themselves against?

> the ability to defend yourself against a tyrannical dictatorship made sense until the government developed better technology, now it's pointless so just give up your guns?

Basically, yes. Do you honestly think people would have any chance against probably the most powerful army in the world? Sure, they could try fighting a guerilla warfare, they'd even inflict some casualties against the enemy but it's unlikely that in the end they'd succeed against an army that is professional, highly skilled, better equipped, has better offensive and defensive capabilities, knows a lot more about tactics and logistics and has trained for this type of situation on a daily basis.

> Are they going to destroy their own infrastructure?

Would they even consider it their own infrastructure? Or would they consider it infrastructure currently held by rebels, which needs to be either seized or destroyed?

> Do you think the real men and women of the military would follow orders to destroy its own hometowns and families?

I suspect a lot of them would destroy towns if they we're told that these are now enemy bases. This has been repeated in many parts of the world throughout the history, even recent one. If they wouldn't, they'd be defectors and it really wouldn't matter whether the war was fought with modern weapons or sticks and stones.

Re:Socrates Was Against Writing (2011) on Wednesday September 11, 2019 @02:38AM (#20937187)
A student came to his master.

"Great master" he said "You are wise and know many things. But tell me this: What is the sound of one hand clapping?"

The master slapped him.

At that moment, the student attained enlightenment.

Older »