Repository navigation
0.8.0
Simple, elegant solutions are more effective, but they are harder to find than complex ones.
Bali 0.8.0 is a new release with deceptively a small number of commits: just 13! However, this version breaks most Nim code that was written for previous Bali versions and used the runtime bridge API.
The major change here is that the global heap state has been isolated and moved into the Runtime class, so a programmer can spawn as many Runtime instances as they please with no fear of undefined behaviour or even run Bali on different threads to free up the main thread!
The Bali programmer's manual pretty much sums up what you need to do in order to migrate from Bali 0.7.x to Bali 0.8.0
Refactors
- The global, thread-local heap manager state has been fully removed.
- The death callback is now contained in the
Runtime, and can be changed by modifyingdeathCallback with a procedure with the signature:proc(vm: PulsarInterpreter)` - Bali is now GC-safe*, meaning it can safely run on a different thread. (Don't try running one
Runtimeon multiple threads, though!)
Both of these require manual intervention in order to migrate programs using previous versions of Bali to Bali 0.8.0 or ahead!
Fixes
- Balde no longer quits upon an exception being thrown in REPL mode. Instead, it simply shows you a message and goes back to the REPL prompt.
- Singletons now store their base
constructorand have the[[Construct]]property attached to them.