Logical NOT operator

Suggestions that have been added to the game.

Moderator: ickputzdirwech

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Logical NOT operator

Post by GotLag »

Combinators and control conditions would be more accessible (and useful) if they had the the inverse of their three operations: GREATER THAN, LESS THAN, EQUAL TO. Adding a NOT option in front of the operator is a simple way to allow three very useful commands:
  • NOT GREATER THAN - the same result as LESS THAN OR EQUAL TO
  • NOT LESS THAN - alias for GREATER THAN OR EQUAL TO
  • NOT EQUAL TO
These would be especially handy when controlling light colours, as currently if I want a light to change colour at, say 40 iron plates, I need a combinator with [iron plate] < 40 and another with [iron plate] > 39. If I want to use a control variable instead of setting the amount by hand in each combinator, I need an additional arithmetic combinator to subtract one from the variable for one of the comparators.

A simple way to implement this on the GUI would be another button to the left of the logical operator, which toggles [!].
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Logical NOT operator

Post by siggboy »

Yes please. Especially "not equal" is important, because right now it's not possible to do "x != 0" in a single combinator (in the general case).
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: Logical NOT operator

Post by GotLag »

While I'm at it, a MOD function for arithmetic combinators would be a godsend.
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Logical NOT operator

Post by siggboy »

GotLag wrote:While I'm at it, a MOD function for arithmetic combinators would be a godsend.
And bitwise operations.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Logical NOT operator

Post by ssilk »

And bitwise left- and right-shift operators. And programmable combinators. And dealing with relational numbers. And matrix-multiplication.

...not. :)
Reason: I think they will not add more combinators, cause it with the belts: Deal with possibilities you have. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Logical NOT operator

Post by siggboy »

ssilk wrote:And bitwise left- and right-shift operators. And programmable combinators. And dealing with relational numbers. And matrix-multiplication.

...not. :)
Reason: I think they will not add more combinators, cause it with the belts: Deal with possibilities you have. :)
What you just did was to create a strawman argument. Nobody asked for any of the things you've mentioned.

They added stack inserters -- they could have said "deal with the possibilities you have".
They added a power switch -- they could have said "deal with the possibilities you have".
They added readable accumulator level -- they could have said "deal with the possibilities you have".
They added controllable belts -- they could have said "deal with the possibilities you have".

Do I have to go on?

There's always something you can add to the game (including the combinator, of which there currently are only 3 with very basic functions) without being outlandish. At some point, you have to stop or you'll overload the UI and create a mess.

It's still a long way before we're at this point.

The original suggestion was to create a "NOT EQUALS" comparison for the decider combinator (and not "add a new combinator" as you said). This is a very reasonable suggestion.

Bitwise left- and right-shift does not have to be added, because that's multiplying and dividing by powers of two. That would be an unreasonable suggestion.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Logical NOT operator

Post by ssilk »

siggboy wrote:What you just did was to create a strawman argument. Nobody asked for any of the things you've mentioned.
Ok, you're right this was not needed. Ignore my negative input, it is just a moderators thought to avoid useless discussion. Sorry, sometimes I run beyond the target. :roll:
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
Seraphendipity
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jun 08, 2019 5:26 pm
Contact:

Re: Logical NOT operator

Post by Seraphendipity »

And now, a couple years later, we have Bit-Wise Operators and Mod.
Post Reply

Return to “Implemented Suggestions”