Page 1 of 1
Logical NOT operator
Posted: Sat Jul 23, 2016 11:01 am
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 [!].
Re: Logical NOT operator
Posted: Sat Jul 23, 2016 12:57 pm
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).
Re: Logical NOT operator
Posted: Sun Jul 24, 2016 7:39 am
by GotLag
While I'm at it, a MOD function for arithmetic combinators would be a godsend.
Re: Logical NOT operator
Posted: Sun Jul 24, 2016 5:21 pm
by siggboy
GotLag wrote:While I'm at it, a MOD function for arithmetic combinators would be a godsend.
And bitwise operations.
Re: Logical NOT operator
Posted: Sun Jul 24, 2016 5:39 pm
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.

Re: Logical NOT operator
Posted: Sun Jul 24, 2016 7:00 pm
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.
Re: Logical NOT operator
Posted: Sun Jul 24, 2016 9:18 pm
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.

Re: Logical NOT operator
Posted: Tue May 19, 2020 6:15 am
by Seraphendipity
And now, a couple years later, we have Bit-Wise Operators and Mod.