In Copper, to end the program, you simply have to enter the word “exit”. In a way, that’s exactly what I’m doing now. I intend to write a few more articles about using Copper, especially some of the cool tricks you can do with it, but as far as I’m concerned, the language is essentially done and the virtual machine is in a stable state. The new documentation is now available on Github.
My old documentation was hand-coded in HTML. I thought that would be the right way to go at first because, after all, the language was “simple”. Then again, how can anything be simple when it’s over 6000 lines of code? Having become tired of coding documentation, I decided to switch to markup, and with a shiny new logo and a nice docs generator, I now have more professional-looking documentation on Github.
These past couple weeks, I’ve run across a couple of rather serious bugs, resulting in fixes now incorporated in version 0.41 (master/Enu). On the C++ side, everything was fine, but as far as the language of Copper is concerned, certain things were horribly wrong. Such is the nature of software.
Back at it again, this time I’ve made some important bug fixes that have laid hidden since branch Cheetah. Uh oh. Sometimes a bug can be simply reference counting too much, in which case, we call it a memory leak. The major issue, however, was a parsing bug that duplicated variable address names. Hard to believe I missed something as important as that, but it required a certain state of the parser, so I don’t feel quite as bad about missing it. In any case, those are done.
In addition to a memory-saving function for adding foreign functions and a new system function for returning members in a list, Copper now has stack tracing!
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!
A number of things have changed with regards to the internals. A great deal of time has been spent trying to optimize the engine, resulting in some interesting discoveries.