ZVector C library available for RISC OS
Paolo Fabio Zaino (28) 1882 posts |
Greetings to the RISC OS Community, I’m excited to share that the early (alpha) version of my ZVector, a dynamic array library tailored for C and C++ programming, is now available on GitHub for RISC OS developers and enthusiasts. ZVector is designed to simplify coding in C and C++ (especially with CFront) by providing a dynamic array structure, similar to what’s already included in modern C++ standards. While developers using GCC C++ may already have access to vector libraries, ZVector offers additional benefits and compatibility options. Key Features: Cooperative Multi-Tasking Friendly: I am developing ZVector with a focus on cooperative multi-tasking. This means that operations like sorting and searching can be paused and resumed, allowing for large data manipulations without compromising the responsiveness of the RISC OS desktop. This feature is still under development and not enabled by default, but I encourage early adopters to experiment with it. Performance & Portability: ZVector is not only fast but also designed to run unmodified on various platforms, including Linux, BSD, macOS, and Windows. This makes it an excellent tool for developing portable applications. Supports both DDE and GCC: you can use it with both GCC and DDE compilers, the source comes already with handy building scripts for both. With GCC it builds both static and dynamic libraries as well. I am still refining and testing the library for RISC OS, so your feedback and contributions would be invaluable. For those interested in exploring or contributing to this project, you can find the repository here: https://github.com/RISC-OS-Community/ZVector Thank you for your support, and happy coding! |
Sveinung Wittington Tengelsen (9758) 237 posts |
This must be very good news for the hordes of RISC OS C/C++-coders out there, such as they are. |
Paolo Fabio Zaino (28) 1882 posts |
Added a minor fix in the building system, thanks to Nitrex for the feedback! Also added a code example for DDE that quickly builds a C App that creates a dynamic stack and shows how easy is to use ZVector , included the automatic copy of local variables value (BTW you can store also structs and every single type of object you can think of). HTH |
Jean-Michel BRUCK (3009) 362 posts |
Just tested.Ok By testing your example I saw that you put the application to run in the development directory. |
Paolo Fabio Zaino (28) 1882 posts |
Thanks!
Nice! Yes, when completed the support for cooperative MT, I’ll work the proper wrapper for CFront to have classes dealing with vectors, hopefully that will help improving the CFront situation a bit.
Yeah, sorry, 2023 has been a crazy busy year for me, not much time left for RO stuff, I’ll try to have a look in the last few days I have got left of PTO.
I just copied a code example from DDE codes examples, so that there is nothing new for a DDE user.
Very nice thanks a lot! :) |
Paolo Fabio Zaino (28) 1882 posts |
@ Jean Testing new Diderot, what am I doing wrong? It builds the project fine if I click on Make, but if I click on Run it gives me this error. BTW, shouldn’t the error be in English ? Given I have USA country configured. Or does it defaults to FR when it has no US resources? I think it should default to UK, right? |
Jean-Michel BRUCK (3009) 362 posts |
Sorry, I forgot to say that the Run button allowed you to execute a “!Run” file in the <obey$dir> folder. In this file just write: Dir <Obey$Dir> Dir <Obey$Dir> WimpSlot -min 4096k taskwindow !Example This allows you to execute exactly what you want !Diderot can’t guess that you call your application !Example, an AI either :-) |
Paolo Fabio Zaino (28) 1882 posts |
Ha cool, thanks! :) |