[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Hypothetically, let's say you made a script, wich turned

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 9
Thread images: 2

File: 1503387435368.gif (792KB, 196x207px) Image search: [Google]
1503387435368.gif
792KB, 196x207px
Hypothetically, let's say you made a script, wich turned every instance of X into Y.
At the exact same time as you ran the first one, a second script wich turns all Y into X is activated.
Keep in mind that both are activated at exactly the same time.
And for the sake of simplicity let's say that they're both set to an infinite loop, both checking to see if anything's changed once every planck second.
What's the outcome if you type X? Would it be different if you typed Y?
>>
>>1536930
>both checking to see if anything's changed once every planck second.
That's physically impossible.
>>
>>1536930
No such thing as exact same time in computing
>>
>>1536931
Mostly because there's no such thing as a Planck second.
>>
>>1536940
That but Planck time is also defined by the time it takes light to travel one Planck length in vacuum. The Planck length is the smallest length at which any event can happen (more or less).
Which means that to measure one tick of Planck time you'd need a mechanism that is smaller than one Planck length.

If you could somehow get something to switch states at every tick of Planck time (and measure it at the same time, which is impossible) then you'd just measure the inverse of your input at the next tick.
>>
>>1536930
Put the bong down, son.
>>
File: 1491282622058.png (17KB, 235x236px) Image search: [Google]
1491282622058.png
17KB, 235x236px
>>1536930
Nothing ever happens at the same planck second. In reality, this would be a race condition with the outcome depending on the starting state and which of the two functions happens to start first.
(X, X->Y then Y->X) => X
(X, Y->X then X->Y) => Y
...

Assuming the hypothetical scenario though, if you ran each once at the /same exact time/, then I think there is only one reasonable outcome: Nothing changes.
Either (1) only one function runs and there is some change, or (2) either both functions run or neither functions run resulting in no changes. Only one function running would contradict the assumption that both run.
X->Y (Y->X) = X
Y->X (X->Y) = Y
>>
>>1537668
It's not real
>>
>>1536930
race condition, unpredictable unless using realtime operating system
Thread posts: 9
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.