You all know I'm reluctant to add new intrinsics to the language, as I want to keep the MiniScript core "mini." So to make the cut, a new function has to be (1) fairly commonly needed, (2) really hard to write yourself, and (3) not too confusing to use.
Bitwise operations fall into this category. They come up with surprising regularity in encryption and compression algorithms. RosettaCode considers them a basic data operation. And while you can readily enough "fake" shift-left and shift-right with multiplication and division, trying to do bitwise and, or, or exclusive-or without some intrinsic support is really difficult and really inefficient.
So! I've just added these to the MiniScript core: bitAnd
, bitOr
, and bitXor
. Each is an intrinsic function that takes two (integer) parameters, and returns an integer result.
You'll see this in MiniScript 1.6 when that comes out (probably at the same time as Mini Micro 0.9, which of course will also have them).