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.
Tag: interpreted language
A number of little updates have been applied to the Copper interpreter and documentation this week including better type identification and string-related methods.
After some critical debugging of the recently changed runFunctionObject() (used for callbacks), I decided to add a new boolean function in the spirit of doing things fast and efficiently: xall(). This function is the equivalent of any(all(…), nall(…)) where “…” represents the same arguments. Using xall() is much less error prone (since you only need to type the argument names once) and much faster because it’s all on the C++ side.
In other news…
Up to this point, the foreign function system did not allow using callbacks via Engine::runFunctionObject() until after Engine::execute() or Engine::run() (which calls Engine::execute()) had completed. My recent update changes that and makes recursive execution of opcodes easier.
For the second time, I’m changing the foreign function interface. (Actually, I already did.) It’s a rather sudden announcement, but since no one else besides me is using the language that I know of, I can get away with things like this.
One of the features I had been meaning to get around to for some time was improvements to the logging. The original system had one enum value per error. It gets quite tedious pretty quickly when you have to write out redundant messages with only a single word changed. Since it would be nice to have the messages be localized (i.e. translated into different languages), I used an enum, but obviously, I needed to shorten the process.
The result of my long evening of work was a rewrite of part of the logging system that resulting in an easily extensible interface for which I created pretty print logging (which you can see in the feature image of this post).
Recently, I utilized the serialization interface in Irrlicht to allow Copper to create GUIs. The code for this is part of my project “Cupric Bridge”. Also in this project are bindings that allow for callbacks from different types of GUI elements.