Programming Leftovers
-
Day 14: Trove – yet another TAP harness - Raku Advent Calendar
Since the early Pheix versions, I have paid a lot of attention to testing system. Initially it was a set of unit tests – I tried to cover a huge range of units like classes, methods, subroutines and conditions. In some cases I have combined unit and functional testing within one .t file, like it’s done to verify Ethereum or API related functionality.
Tests became a bit complicated and environment dependent. For example off chain testing like trivial prove6 -Ilib ./t should skip any Ethereum tests including some API units, but not API template engine or cross module API communications. So I had to create environment dependent configurations and since that point I started yet another Pheix friendly test system.
It was written in pure bash and was included in Pheix repository for a few years.
In a middle of June 2022, I introduced Coveralls support and got a few requests to publish this test tool separately from Pheix. Consider that moment as a Trove module birth baby
-
Dirk Eddelbuettel: RcppSpdlog 0.0.11 on CRAN: Small Enhancement
Version 0.0.11 of RcppSpdlog is now on CRAN and in Debian. RcppSpdlog bundles spdlog, a wonderful header-only C++ logging library with all the bells and whistles you would want that was written by Gabi Melman, and also includes fmt by Victor Zverovich.
This release adds support for a basic file logger as a alternative to the console logger. This can be helpful with code which suppresses or hides console output – as for example unit test code does. We also expose the formatting helper function for direct use at the C level from other packages, and mention the handy wrapper spdl in the README.
-
Dirk Eddelbuettel: digest 0.6.31 on CRAN: snprintf Update
Release 0.6.31 of the digest package arrived at CRAN this weekend, and is being uploaded to Debian as well.
digest creates hash digests of arbitrary R objects (using the md5, sha-1, sha-256, sha-512, crc32, xxhash32, xxhash64, murmur32, spookyhash, and blake3 algorithms) permitting easy comparison of R language objects. It is a mature and widely-used as many tasks may involve caching of objects for which it provides convenient general-purpose hash key generation to quickly identify the various objects.
-
Dirk Eddelbuettel: AsioHeaders 1.22.1-2 on CRAN: Small Update
An new minor revision of the AsioHeaders package arrived at CRAN earlier today. Asio provides a cross-platform C++ library for network and low-level I/O programming. It is also included in Boost – but requires linking when used as part of Boost. This standalone version of Asio is a header-only C++ library which can be used without linking (just like our BH package with parts of Boost).
This minor update avoid use of (v)sprintf which CRAN now flags in r-devel (for all R builds), following the decision by Apple to deprecated it for macOS. Winston had notified me about email he had gotten for for his websocket package – also highlighting the issue for both iptools and ipaddress. As the issue ticket dialog shows I was initially a little hamfisted about replicating, falsely thinking I would need an updated compiler. But this really is ‘just’ a change in r-devel once again scanning shared libraries for symbols now warned about. Upstream has newer minor releases but they did not yet cover this; however I found a commit mentioning Xcode and snprint from three days ago which I essentially ported. We needed one more change, and that addressed the issue in websocket. But as it is good to increase the number of random acts of kindness, I also looked into iptools and ipaddress as CRAN has its eyes on them too for this. Turned out they needed simple and limited changes from sprint to snprintf so made those and sent them PRs: iptools PR #42 and ipaddress PR #79.
-
Dirk Eddelbuettel: spdl 0.0.2 on CRAN: First Update
A first update to the recently-released package spdl is now om CRAN. The key focus of spdl is a offering the same interface from both R and C++ for logging by relying on spdlog via my RcppSpdlog package.
This release exposes simple helpers fmt() (to format text according to the included fmt library) and cat() which formats and prints.