Some time ago, I decided to stop making features for the Copper interpreter engine, but I ran across a situation in coding where I came up with an idea for a very convenient built in function.
Tag: scripting language
After deliberating over the matter, I’ve decided that it’d be best to write an extension for Copper that would enable file reading and writing. This would enable the language to finally be general purpose, putting it among the big boys like Python. While the current Copper VM is certainly not fast enough to compete, the ease, power, and syntax of the language make it a highly tempting alternative.
A very simple byte extension was added to Copper’s extension collection recently. It’s just a convenience class with a few features including byte flipping, bit flipping, bit setting and getting. The ByteObject class extends NumericObject, so math operations are possible. Creating a byte instance is done using strings rather than numbers or hex because the Copper VM does not support hex numbers.
mybyte = byte("00001101")
The full byte does not need to be given. Any number of bits less than 8 can be given, and these will set the lowest bits of the byte. The above code could have been written:
mybyte = byte("1101")
Functions are documented at the top of file cu_bytebasics.h.
Good news! CupricBridge and Curri are now online! CupricBridge is a wrapper for the Irrlicht engine GUI system, but it also provides a serialization interface implementation that will work with scene objects. Curri is a project containing the boilerplate code for creating applications with Copper, CupricBridge, and Irrlicht engine.