Show more

@moth ok I got some oil on canvas, now I demand good morning and good night!

Show thread

Considering a generic function, that accepts a count of numbers (usual + - * / algebra) and returns their average (sum over count), what requirements make sense to be imposed on the number to allow division by count?

(count is 2 in example pseudo code)

1. explicit construction from a single natural number:
(n1 + n2)/number(2)

2. straight up a division operator that accepts a natural number as second argument:
(n1 + n2)/2

3. multiplication identity constructor/value that can be accumulated (using addition) to reach count:
(n1 + n2)/(number::one + number::one)

4. addition operator that accepts a natural number as second argument (assuming zero/default constructor available):
(n1 + n2)/(number() + 2)

namark boosted

#xoshiro is a family of #publicdomain (#CC0) pseudorandom number generators.

xoshiro (xor-shift-rotate) and #xoroshiro (xor-rotate-shift-rotate) are public domain #algorithms that shift state to produce very random numbers at high speeds suitable for insecure applications. The algorithms only use a few bytes of state and are suitable for embedded applications which require good pseudorandom numbers.

Website 🔗️: prng.di.unimi.it/

#free #opensource #foss #fossmendations #RNG #programming

namark boosted
namark boosted

The bear came down an hour after we brought the dogs in.

Show thread
namark boosted

To a profession that is 90% naming, lerp is an embarrassment. What shall I call it instead?

map(zero, one, value)
progress(begin, end, amount)
way(from, to, ratio)
linin(hammer, sickle, stilin)
/* had to put these here cause of stupid character limit on poll options */

alright so this is a lerp, all fine, no complaints here
x * a + y * (1 - a)

but what a lerpaderp is this?
x * a + (1 - x) * (1 - a)

namark boosted

Requiring a backdoor for encryption won't stop any cyber-related crime. Encryption is just math. You can't put a math genie back in a bottle for a whole society.

namark boosted

carpenter: builds and sells table
murderer: buys table
carpenter: sent to prison for a lifetime per table leg
justice: is served
murderer: enjoys table

remember kids, specialization is crime

me - next time, can we make something at least remotely tangible?
brain - what's the fun in that?
me - how did we even get here?
brain - long story, but basically you lied and we had to fix things to make your lies true.
me - :|
brain - :|
me - >:(

Show thread
Show more
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.