Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I never thought I would have any use for something as weird as the way you model shared, atomic read/set in the actor model, but here we are.
A simple actor cell might look like
MOV initial_value ACC
L: MOV ACC ANY
MOV LAST ACC
JMP L
As soon as you read from it, it's locked to that node until you write a new (or the original value) back to it.
This is an example from my version of the SEQUENCE PEAK DETECTOR's maximum accumulator which is slightly more complicated, in that you have to read twice
MOV -500 ACC
L: MOV ACC ANY
MOV ACC LAST
MOV LAST ACC
JMP L
You read twice because of the lack of registers it's used as
SUB DOWN
JLZ ...
and if you decide to keep the original value you have to read it again
ie.
MOV DOWN ACC
MOV ACC DOWN
In that machine I set it from one node and read it from another. It doesn't make the fastest SEQUENCE PEAK DETECTOR possible (I got it down to 329), but it's very clean.