"I'm upset!!"

Zules

💜Capricious💜Creator💜
Admin
Likes received
13,005
Umbration

Caprice
Explanation time!

If I do this:
a = (0.5882,0.6705,0.8784,0.9686)
then a[0] == 0.5882, a[1] == 0.6705, a[2] == 0.8784, a[3] == 0.9686.

Of course, I don't have to create a name but can use the values directly:
(0.5882,0.6705,0.8784,0.9686)[0] == 0.5882, (0.5882,0.6705,0.8784,0.9686)[1] == 0.6705, (0.5882,0.6705,0.8784,0.9686)[2] == 0.8784, (0.5882,0.6705,0.8784,0.9686)[3] == 0.9686

Instead of numbers, I can select with SD:
(0.5882,0.6705,0.8784,0.9686)[SD-1]
So:
for SD == 1: (0.5882,0.6705,0.8784,0.9686)[SD-1] == (0.5882,0.6705,0.8784,0.9686)[0] == 0.5882,
for SD == 2: (0.5882,0.6705,0.8784,0.9686)[SD-1] == (0.5882,0.6705,0.8784,0.9686)[1] == 0.6705,
for SD == 3: (0.5882,0.6705,0.8784,0.9686)[SD-1] == (0.5882,0.6705,0.8784,0.9686)[2] == 0.8784,
for SD == 4: (0.5882,0.6705,0.8784,0.9686)[SD-1] == (0.5882,0.6705,0.8784,0.9686)[3] == 0.9686.

At this point we have already achieved selecting by SD with the silent assumption that SM == 1

The same way that we could get a value from a 1D array, we can get a 1D array from a 2D array:

((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[0] == (0.5882,0.6705,0.8784,0.9686),
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[1] == (0.5490,0.6392,0.8666,0.9568),
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[2] == (0.4549,0.5647,0.8352,0.9450),
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[3] == (0.4313,0.5333,0.8235,0.9411).

But we can continue selecting from the already selected thing:
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[0][0] == (0.5882,0.6705,0.8784,0.9686)[0] == 0.5882,
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[0][1] == (0.5882,0.6705,0.8784,0.9686)[1] == 0.6705,
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[0][2] == (0.5882,0.6705,0.8784,0.9686)[2] == 0.8784,
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[0][3] == (0.5882,0.6705,0.8784,0.9686)[3] == 0.9686,
and so on.

And again, we can use SD, and SM for selecting:
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[SM-1][SD-1]
which is the final solution.

To see how it works, we can observe it for selected values.
Here I check it for SM == 2 and SD == 3:

((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[SM-1][SD-1]
becomes
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[2-1][3-1]
which is
((0.5882,0.6705,0.8784,0.9686),(0.5490,0.6392,0.8666,0.9568),(0.4549,0.5647,0.8352,0.9450),(0.4313,0.5333,0.8235,0.9411))[1][2]
which is
(0.5490,0.6392,0.8666,0.9568)[2]
which is
0.8666

and similarly it will work for other values.
I had to read this twice but I think I understand it :ambernyeh:

I've never worked with arrays much in programming so I had to expand my brain a bit but I think it fits now 🧠🔝

Thank you very much
 

Zules

💜Capricious💜Creator💜
Admin
Likes received
13,005
Umbration

Caprice
This is also insanely easier to work with compared with that if/else disaster. I had to make 2 more sequences after that first one. (These are RGB values.)
 

Oegyein

Wanted alien fugitive
Moderator
Likes received
10,998
Umbration

Duality
So the Aus government has just given up eradicating a certain invasive mite that infests bee hives. Why is this upsetting to me? Because their method of eradicating it was "kill as many private owned bee farms as possible with gasoline".

They destroyed about 14000 hives, each containing an average of about 200 need. That's about 2800000 bees and a massive blow to private industry, ultimately for no reason.

I'm wouldn't call myself an environmentalist, but I recognize a dumb move when I see one.

Countless Tax dollars wasted, private honey production destroyed, and numerous "save the planet" PSA's produced by Canberra while they act however they want within their double standard.

And the mite still roams free.
 

Tee

Holder of dice
Super Patron
Likes received
2,139
Umbration

Duality
So the Aus government has just given up eradicating a certain invasive mite that infests bee hives. Why is this upsetting to me? Because their method of eradicating it was "kill as many private owned bee farms as possible with gasoline".

They destroyed about 14000 hives, each containing an average of about 200 need. That's about 2800000 bees and a massive blow to private industry, ultimately for no reason.

I'm wouldn't call myself an environmentalist, but I recognize a dumb move when I see one.

Countless Tax dollars wasted, private honey production destroyed, and numerous "save the planet" PSA's produced by Canberra while they act however they want within their double standard.

And the mite still roams free.
Much sad
 

Oegyein

Wanted alien fugitive
Moderator
Likes received
10,998
Umbration

Duality
I am 20 years too young to be putting my back out. Can't lift or stand without a lotta pain.
 

Tee

Holder of dice
Super Patron
Likes received
2,139
Umbration

Duality
Happens to the worst of us. Make sure you see a physiotherapist and get lots of rest. Then you'll be up and about in no time.
 

EstherTb

Goddess of Fire
Likes received
6,861
Umbration

Duality
I am 20 years too young to be putting my back out. Can't lift or stand without a lotta pain.
I just slept in a terrible bed all weekend. 'slept' but not really. It hurt my back just laying there. I thought that was an old people problem. Now I'm home and my back feels better
 

Rateus

Dzuna is a loser.
Likes received
1,673
Umbration

Velocity
A good mattress is the best investment I ever made, apart from possibly the house that keeps it dry.
 

Oegyein

Wanted alien fugitive
Moderator
Likes received
10,998
Umbration

Duality
Youtube's starting to crack down on AdBlockers, which sucks because being forced to watch even a second more of that God-forsaken Temu ad should be considered a violation of the Geneva convention.

I miss good old youtube, when ads were rarer and always skippable.
 

Rateus

Dzuna is a loser.
Likes received
1,673
Umbration

Velocity
Youtube's starting to crack down on AdBlockers, which sucks because being forced to watch even a second more of that God-forsaken Temu ad should be considered a violation of the Geneva convention.

I miss good old youtube, when ads were rarer and always skippable.
I kinda take pleasure in muting the ads on a separate tab feeling like I'm robbing a small amount of free money for the video creator every time I do it (of course in reality I'm also robbing a little bit of money for YouTube too, but it's more satisfying if you overlook that).
 
Top