Code center > Suggestions

dupbool

<< < (4/5) > >>

EricL:
You can do it for the integer stack this way I think.

swapint dupint 55 store swapint *55

This works because we have temporary places to store integers.  So if we use a mem location to store boolean values:


swapbool dupbool
1 55 store
dropbool
swapbool
*55 1 =

Then I think this works in gene bodies at least...

EricL:
swapbool
1 55 store
swapbool
*55 1 =

even shorter...

Gobo:
Sure, you can do that with memory allocation. You can even do swapint with memory. But that takes energy.

Numsgil:
I'm really on the fence on this.  On the one hand, it's a nice operator in that it operates on just the top two values on the stack-- meaning it's a binary operator.  It easily fits in with other commands like swap, etc.

On the other hand, it provides some really weird possibilities for nonsensical DNA.

EricL:
I vote for it.  A user is requesting it.  It's rational.  It's easy to implement.  Sanger can use it.  Hand coded bots too.  It provides a one step way to evolve a potentially useful operation that otherwise takes at least 8 base pairs.  And we are well beyond the point IMHO of worrying departing from a RISC approach to DNA oeprators....  

So, unless there are strong objections...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version