This is an extension of the code I posted yesterday,
and uses the primes()
function from
yesterday to factor numbers.
This function takes a number to factor as its input, and returns the list of prime factors in an array:
function factor(a) local out={} local prime=primes(a/2 + 1) for b = 1,#prime do while(a / prime[b] == math.floor(a/prime[b])) do out[#out + 1] = prime[b] a = a / prime[b] end end if #out == 0 then out={a} end return out end
This uses primes()
from yesterday. The example usage of
the above function uses listArray()
, also posted
yesterday:
print(listArray(factor(48)))
Jimmy Kimmel was fired and his show cancelled because he said the following:
We hit some new lows over the weekend with the MAGA gang desperately trying to characterize this kid who murdered Charlie Kirk as anything other than one of them and doing everything they can to score political points from it.1
Not surprisingly, Reddit is upset about this, but should they be, considering they were cheering or ignoring the abuses during the out of control cancel culture we had in 2020.
Garry Kasparov is also upset about the post-Kirk cancellations, but to be fair to him, he has always opposed cancel culture and was one of the people to sign Harper’s Letter.
What is good for the goose is good for the gander. One cannot ignore or cheer on cancel culture when people they disagree with get cancelled, then turn around and bewail people cancelling people they agree with. That’s tribal hypocrisy.
The world would be a better place if we had more people as principled as Kasparov is. Kasparov knew the out of control cancellations were an unsound gambit, and now the boomerang is coming back to get the extreme left wing.
1: We now know that Charlie Kirk’s killer was left-wing.