A new C++ client
Sunday, 14 July 2024 · 3 messages · last reply 16 Jul 2024
BE
Ben Engbers14 Jul 2024 22:43 #
Before I started developing the R client for BaseX several years ago, I used to program regularly in SWI-Prolog. And I always wondered afterwards about the possible benefits of using Prolog in combination with XQuery. So after I finished developing RbaseX, I started developing ProBaseX.
I did not manage to set up a connection in Swipl. Therefore, my initial plan to develop ProBasex entirely in SWI-prolog was changed to a plan to first set up a connection in C++ and then use that connection. This work eventually resulted in a linux shared library that implements the full server protocol. I will now use that library for further development work.
LibBasexCpp and the test program libBasexTest.cpp are now on the Internet: https://github.com/BenEngbers/libBasexCpp
I am curious to see if this library fills a need and if it makes sense to continue working on a dual platform version.
Ben Engbers
CG
Christian Grün16 Jul 2024 11:05 #
Hi Ben,
Thanks for your new client, much appreciated. I’ve added it to our documentation [1].
Out of interest: How does your solution differ from the other two clients that we have listed?
Best,
Christian
[1] https://docs.basex.org/main/Clients
Quoted text · Ben Engbers · 23 lines
On Sun, Jul 14, 2024 at 10:43 PM Ben Engbers <Ben.Engbers at be-logical.nl> wrote: > Before I started developing the R client for BaseX several years ago, I > used to program regularly in SWI-Prolog. And I always wondered > afterwards about the possible benefits of using Prolog in combination > with XQuery. So after I finished developing RbaseX, I started developing > ProBaseX. > > I did not manage to set up a connection in Swipl. Therefore, my initial > plan to develop ProBasex entirely in SWI-prolog was changed to a plan to > first set up a connection in C++ and then use that connection. This work > eventually resulted in a linux shared library that implements the full > server protocol. I will now use that library for further development work. > > LibBasexCpp and the test program libBasexTest.cpp are now on the > Internet: https://github.com/BenEngbers/libBasexCpp > > I am curious to see if this library fills a need and if it makes sense > to continue working on a dual platform version. > > > Ben Engbers >
BE
Ben Engbers16 Jul 2024 11:57 #
Hi Christian,
My solution is intended to be used as a shared object library (or .dll when I manage to modify CMakeLists.txt to generate a dual platform result). I implemented the entire protocol in standard C++. I chose this solution because, as a novice C++ programmer, I did not understand how to use the other C++ clients. (My libBasexTest.cpp is a lot easier to understand ;-))
libBasexCpp is largely a rewrite of the RbaseX client. I did not convert the specific R elements.
I am now going to start working on a SWI-Prolog client. As it looks now, that will be a Prolog shell around libBasexCpp. According to programmers from the Prolog forums, that's a good solution direction.
Ben
Quoted text · Christian Grün · 11 lines
Op 16-07-2024 om 11:05 schreef Christian Grün: > Hi Ben, > > Thanks for your new client, much appreciated. I’ve added it to our > documentation [1]. > > Out of interest: How does your solution differ from the other two > clients that we have listed? > > Best, > Christian
Written for BaseX 11.1. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery