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.
Tag: interpreted language
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.
Lately, I’ve been integrating Copper into projects and everything is working seamlessly. Copper has finally matured to being robust enough for full scale applications, not just tinker projects.
A number of little updates have been applied to the Copper interpreter and documentation this week including better type identification and string-related methods.