source code

Usage of the framework, compiler and tools
rochus
Posts: 13
Joined: Sat Dec 12, 2020 1:15 pm

Re: source code

Post by rochus »

There are several alternatives how to integrate with Qt. For example, in my version of the Oberon System (https://github.com/rochus-keller/oberonsystem/) I simply replaced "Oberon.Loop" by callbacks from the Qt window in which the Oberon system operates. In my Smalltalk-80 VMs (https://github.com/rochus-keller/smalltalk/) its the other way round: the loop including scheduler and co-routine implementation were already written in Smalltalk and part of the virtual image, and the C++ or Lua version of the interpreter just call QApplication::processEvents; even the integrated IDE and debugger implemented in Qt don't have their own event loop but get their time slots from the Smalltalk VM. And all these design variants are fully platform independent; there is no platform dependent code in these projects and it's easy to build them on all platforms due to the qmake based build system.
User avatar
adimetrius
Posts: 68
Joined: Sun Aug 04, 2019 1:02 pm

Re: source code

Post by adimetrius »

When you say, 'Platform-dependent code in bbcb', are you referring to the Host subsystem? If so, then it's there by desing. There's no appetite for moving anything out of Host into the non-Host subsystems.

Well, at least for the most part ))
rochus
Posts: 13
Joined: Sat Dec 12, 2020 1:15 pm

Re: source code

Post by rochus »

I'm not yet familiar with the Blackbox implementation, just had a look at the code in https://github.com/bbcb/bbcp. "platform dependent" is each module whose implementation or API changes with the platform. In bbcp there seem to be quite many of these, accross many subsystems. It's a lot of work to implement and maintain those. bbcp seems to at least have managed to have a platform independent core and sort out features only available on Windows.
X512
Posts: 72
Joined: Sat Feb 07, 2015 2:51 pm

Re: source code

Post by X512 »

Ivan Denisov wrote:As I remember, Peter Kushnir made analysis for compatibility of BlackBox with Qt several years ago. So he said, that this will not have positive outcome, because Qt works like framework with hidden internal loop with it's own garbage collector etc. And there is no access to lowlevel Qt framework mechanisms, so BlackBox is not possible to port with Qt.
It is actually possible to port BlackBox to Qt. Hidden internal loop is not an issue. I have managed to port BlackBox to Haiku operating system (https://github.com/X547/BlackBox-Haiku). It has C++ only GUI API, hidden internal loops and mandatory separate threads for each window. I directly used mangled API functions and vtables from Haiku dynamic libraries and provide C++ compatible RTTI information. I added limited multi-threading support, so different threads can call BlackBox code, but only single thread can run inside safe BlackBox environment (controlled by mutex similar to GIL in Python). There are no BlackBox-managed main loop, OS callbacks call BlackBox code acquiring global mutex. See readme and source code in repository for details.
Post Reply