Repository navigation
Raise default max signal queue size to 1024 - #226
Dream-Master merged 2 commits into
Conversation
|
I think the previous behavior of adding a config option for this was not a good idea. First, in the official documentation https://ocdoc.cil.li/component:signals, the description of this signal is as follows:
Here it only mentions the length limit, and there is no description at all about splitting by line. Meanwhile, in OpenOS there are only two places that respond to the clipboard signal. One is in the edit library, where edit.lua#L641 correctly splits the clipboard signal by line. The other is in the cursor library, where cursor.lua#L147 also correctly splits the clipboard signal by line. Moreover, the paste behavior of I think reading input through the interfaces provided by OpenOS is standard behavior. Even for a user-implemented UI that includes input functionality, one can call In my view, the official API documentation has never mentioned this, and the OpenOS implementation has no design specifically for it. Therefore, I think this is a bug rather than an intentional design, and the original fix was reasonable. |
I appreciate you looking into the official docs and OpenOS source code. However, in a 13-year-old mod, undocumented behavior essentially becomes the API contract. |
|
I definitely understand the concern about existing community code, and that was also why I was previously willing to compromise and keep batch clipboard cutting disabled by default. At the same time, I wonder if we should also consider the longer-term evolution of OpenComputers. Python 3, for example, was released in 2008, and Python 2 was officially discontinued 12 years later. Of course, I’m not suggesting that the two situations are directly comparable, but it does make me wonder how much compatibility we should expect to preserve indefinitely for behavior that was never formally documented. OpenComputers itself is now around 13 years old. I think it’s worth leaving some room for the API and its underlying mechanisms to evolve as well. As the project grows, the amount and complexity of information being communicated through signals may also grow, and there may eventually be limitations that the older behavior simply cannot accommodate very well. I certainly don’t want to disregard the existing community or break things unnecessarily. I just wonder whether continuing to preserve every historical behavior is necessarily the best approach in the long run. If we’ve confirmed that the newline does not conflict with OpenOS or the standard library, I’m finding it increasingly difficult to justify keeping the new behavior disabled by default. Perhaps it would be reasonable to treat this as a small compatibility transition rather than something that needs to be preserved indefinitely. |
|
However, I think it’s still worth keeping in mind that 1024 is ultimately only a workaround. In practice, it’s difficult to imagine users of any reasonably capable operating system accepting that it simply cannot handle more than 1024 lines by default. I suspect that for the vast majority of users, such a limitation would simply make the operating system feel incomplete or inadequate, regardless of the technical reasons behind it. If there are still concerns or further points to discuss, perhaps we could merge this PR (1024-line limit) for now and continue the discussion in a separate PR, possibly one that enables batch clipboard by default. |
I agree with moving forward, but honestly, I still feel changing the default behavior isn't worth the risk. Since many script authors have left the community, any broken code will likely stay broken forever. Multiple line paste just doesn't offer enough benefits to justify forcing a breaking change by default, especially when server owners can easily enable it in the config. |
Summary
Most players who encounter the 256-line paste limit will simply be left confused and start looking around for the reason why their paste doesn’t work. Simply increase the default 256-line limit to 1024 would be a solution.

Checklist