Page 2 of 2

Re: And / Or etc for circuitry

Posted: Tue Jan 17, 2017 3:35 pm
by Klonan
Sneak peek of 0.15

ImageImage

Re: And / Or etc for circuitry

Posted: Tue Jan 17, 2017 3:44 pm
by Yoyobuae
@Klonan: Nice! Seems even bitwise AND, OR, XOR are in there. :o

Re: And / Or etc for circuitry

Posted: Tue Jan 17, 2017 4:09 pm
by DRY411S
Yoyobuae wrote:
DRY411S wrote:
Yoyobuae wrote:
DRY411S wrote:Integer functions (DIV, MOD, x^y, factorial!)
Signals are integer values. So Arithmetic combinator division is actually integer division.
Indeed. DIV would be no different to '/', but it would help readability.
Eh? I didn't know the assembly language DIV mnemonic was actually common knowledge.

Readability for who? Software engineers? Not all players have that kind of background.

Similar problem with MOD and even x^y (but there's no other good option for those).
Hmm, I'm not sure I knew DIV from assembly language. Think it may have been SQL.

If you don't want me to have DIV and want me to use / instead, can I have % on the arithmetic combinator instead of MOD? That definitely won't help readability for 'ordinary' players. ;)

I appreciate that DIV, MOD, x^y are advanced, but there's no harm in having some extra complexity for people who'd like to exploit it is there? There's no need to dumb down the combinators as long as the complexity doesn't impact the game performance. It might encourage players to stretch their knowledge of arithmetic and engineering, and that wouldn't be a bad thing would it? IMO the combinator part of the game would actually be more accessible if these type of functions were available.

(Don't get me started on combinators that have 2 outputs, one on the red wire and a different one on the green....)

Re: And / Or etc for circuitry

Posted: Tue Jan 17, 2017 4:11 pm
by DRY411S
Klonan wrote:Sneak peek of 0.15

ImageImage

Woohoo. :!:

Re: And / Or etc for circuitry

Posted: Tue Jan 17, 2017 4:18 pm
by DRY411S
Yoyobuae wrote:@Klonan: Nice! Seems even bitwise AND, OR, XOR are in there. :o
And DIV and MOD and x^y :D

Re: And / Or etc for circuitry

Posted: Tue Jan 17, 2017 6:28 pm
by ChurchOrganist
Klonan wrote:Sneak peek of 0.15

ImageImage
Awesome!

Please, pretty please, may we have Hexadecimal entry of values now :)

Re: And / Or etc for circuitry

Posted: Thu Jan 19, 2017 8:51 pm
by Gertibrumm
DRY411S wrote:
Klonan wrote:Sneak peek of 0.15

Woohoo. :!:
Woohootoo :o

now I can remove two deciders and add one!
but the /= seems intimidating.

How are the bitwise operators going to work?

Re: And / Or etc for circuitry

Posted: Fri Jan 20, 2017 10:26 am
by DRY411S
Gertibrumm wrote:Woohootoo :o

now I can remove two deciders and add one!
but the /= seems intimidating.

How are the bitwise operators going to work?
I'd imagine the same way they've always worked. :P

Input: >> or << (shift left or right): this_many_shifts => output_here

Re: And / Or etc for circuitry

Posted: Fri Jan 20, 2017 7:26 pm
by Gertibrumm
DRY411S wrote:I'd imagine the same way they've always worked. :P

Input: >> or << (shift left or right): this_many_shifts => output_here
So we got x bit channels now or is this shift stuff encoded into integer numbers?

Re: And / Or etc for circuitry

Posted: Fri Jan 20, 2017 8:10 pm
by Yoyobuae
Gertibrumm wrote:
DRY411S wrote:I'd imagine the same way they've always worked. :P

Input: >> or << (shift left or right): this_many_shifts => output_here
So we got x bit channels now or is this shift stuff encoded into integer numbers?
Integers are encoded as binary numbers (signed 32 bit integers). ;)

I imagine those operations will be applied to the underlying binary representation (ie. just like the operators would work in a programming language).

One thing that I kinda wanted but still is missing is bit test as condition operator. Right now the work around is using extra arithmetic combinators and abusing less/greater than operators. Either option has it's limitations.

The use case is having hundreds of inserters, lamps, pumps, belts being controlled in parallel by only a handful of signals. Minimizes the amount of wiring and the amount of signals, which in turn minimizes the required combinators to control them.

Re: And / Or etc for circuitry

Posted: Fri Jan 20, 2017 10:03 pm
by orzelek
Yoyobuae wrote:
Gertibrumm wrote:
DRY411S wrote:I'd imagine the same way they've always worked. :P

Input: >> or << (shift left or right): this_many_shifts => output_here
So we got x bit channels now or is this shift stuff encoded into integer numbers?
Integers are encoded as binary numbers (signed 32 bit integers). ;)

I imagine those operations will be applied to the underlying binary representation (ie. just like the operators would work in a programming language).

One thing that I kinda wanted but still is missing is bit test as condition operator. Right now the work around is using extra arithmetic combinators and abusing less/greater than operators. Either option has it's limitations.

The use case is having hundreds of inserters, lamps, pumps, belts being controlled in parallel by only a handful of signals. Minimizes the amount of wiring and the amount of signals, which in turn minimizes the required combinators to control them.
You will have both and and or logical oprations. Those are your bit tests :D

I do agree that hex values would be very useful then - makes bit settings much more clear and readable.

Re: And / Or etc for circuitry

Posted: Fri Jan 20, 2017 10:16 pm
by Yoyobuae
orzelek wrote:You will have both and and or logical oprations. Those are your bit tests :D
But I want to program bit tests directly to inserters and such. :(

In the above screenshot the AND, OR operators were shown only for arithmetic combinator (so not available for conditional operators, like in deciders, inserters, lamps, etc).

Re: And / Or etc for circuitry

Posted: Mon Jan 30, 2017 4:43 am
by Roxor128
Yoyobuae wrote:
orzelek wrote:You will have both and and or logical oprations. Those are your bit tests :D
But I want to program bit tests directly to inserters and such. :(

In the above screenshot the AND, OR operators were shown only for arithmetic combinator (so not available for conditional operators, like in deciders, inserters, lamps, etc).
Not a problem. Just work out your boolean expressions before feeding into the decider.

Eg. Let's say you want (A AND B) OR (C AND D) to trigger an output.

Arithmetic 1 : A AND B
Arithmetic 2: C AND D
Arithmetic 3: Artithmetic 1 OR Arithmetic 2
Decider: Arithmetic 3 == 1

There you go. Simple boolean logic.