Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend logic read and write,support targeting LogicBuild #9550

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

way-zer
Copy link
Contributor

@way-zer way-zer commented Feb 14, 2024

If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:

  • I have read the contribution guidelines.
  • I have ensured that my code compiles, if applicable.
  • I have ensured that any new features in this PR function correctly in-game, if applicable.

@BasedUser
Copy link
Contributor

what

@way-zer
Copy link
Contributor Author

way-zer commented Feb 21, 2024

what

Allow processor to transfer variable to another directly, including Unit, Building...

@The4codeblocks
Copy link

Problem: This allows for processors to act as memory storage, possibly greater than 64, rendering all memory storage useless

@way-zer
Copy link
Contributor Author

way-zer commented Feb 26, 2024

Problem: This allows for processors to act as memory storage, possibly greater than 64, rendering all memory storage useless

Yeah, the processor is more powerful than memory storage, as it can store not only number but object.

But processor don't support string concat, so the read is not indexable. and it's more complex.

The feature of this PR is much powerful, that allow many complex logic design. (like function store processor, mulitiprocessing)

@The4codeblocks
Copy link

Problem: This allows for processors to act as memory storage, possibly greater than 64, rendering all memory storage useless

Yeah, the processor is more powerful than memory storage, as it can store not only number but object.

But processor don't support string concat, so the read is not indexable. and it's more complex.

The feature of this PR is much powerful, that allow many complex logic design. (like function store processor, mulitiprocessing)

@counter arrays:

@way-zer
Copy link
Contributor Author

way-zer commented Feb 27, 2024

Problem: This allows for processors to act as memory storage, possibly greater than 64, rendering all memory storage useless

Yeah, the processor is more powerful than memory storage, as it can store not only number but object.
But processor don't support string concat, so the read is not indexable. and it's more complex.
The feature of this PR is much powerful, that allow many complex logic design. (like function store processor, mulitiprocessing)

@counter arrays:

I know that, but it can't stop using that without this pr as it can use inside the same one processor. And this pr is also a enhancement for many advanced players like ones using @counter arrays.

Read&Write memory is simple and effictive. Read&Write processor allow more complex design and usage.

PS: @couter arrays for multiprocessor is more complex than single processor, as you need wait to sync. It is still better to use @couter arrays just in one processor. If you use processor to replace memory block with @couter arrays style, you need 2+2 line to implement, so that only allow lower than 1000/4 variables.

@The4codeblocks
Copy link

Random idea: make the textbuffer in processors usable

@way-zer
Copy link
Contributor Author

way-zer commented Mar 1, 2024

Random idea: make the textbuffer in processors usable

I has thinked that, it sounds good. A special variable points to the textbuffer StringBuilder and can be used in read and write.

@Anuken
Copy link
Owner

Anuken commented Mar 1, 2024

Reading from the text buffer implies making an allocation to copy the string to a variable, which is not acceptable.

@The4codeblocks
Copy link

Reading from the text buffer implies making an allocation to copy the string to a variable, which is not acceptable.

welp

though that should also mean string variables would be unacceptable?

@Anuken
Copy link
Owner

Anuken commented Mar 1, 2024

Strings in logic are immutable. You can reassign the variable to a difference reference of a string, but you can't modify what it points to.

@The4codeblocks
Copy link

Strings in logic are immutable. You can reassign the variable to a difference reference of a string, but you can't modify what it points to.

yeah, strings in logic are like java.lang.String, not java.lang.StringBuilder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants