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…
Continue reading “Progress Report #9”
Branch 6, version 0.51 has a couple of important bug fixes.
An old bug in Copper that had gone under the radar for a while: The system functions “all” and “any” had been flipped in functionality. Each one was doing the other’s job. The bug was probably introduced during a rewrite of those functions.
CallbackWrapper was also fixed. The Copper callback is now disowned in the destructor so its lifetime is now correctly tied to the CallbackWrapper.
Every good interpreted language needs to have a way to add hooks. Copper used to have one a long time ago, but it hadn’t been rewritten when I made significant changes to the engine. As of today, the callback system has been rebuilt and working!
Continue reading “Callback(Callback())”