ak-coram / cl-duckdb

Common Lisp CFFI wrapper around the DuckDB C API
https://github.com/ak-coram/cl-duckdb/blob/main/README.org
MIT License
36 stars 1 forks source link

Phase out serapeum dependency #21

Closed ak-coram closed 1 year ago

ak-coram commented 1 year ago

This library currently prevents loading cl-duckdb with Clasp as it doesn't compile: https://github.com/clasp-developers/clasp/issues/1365

Only serapeum:mvlet* and serapeum:count-cpus are currently used, which doesn't warrant the inclusion of such a large library dependency.

ak-coram commented 1 year ago

DuckDB seems to be using std::thread::hardware_concurrency to determine the number of threads, maybe this could be exposed via the C API.

snunez1 commented 1 year ago

For mvlet* type things, I quite like let+ and use it often. It's easily extensible too, and I'd be happy to extend it if required.

As a replacement for serapeum:count-cpus, perhaps cl-cpus?

ak-coram commented 1 year ago

@snunez1: I've replaced the single call we have to mvlet* with let+

As a replacement for serapeum:count-cpus, perhaps cl-cpus?

This project was originally using cl-cpus before, but that was even less reliable compared to the serapeum implementation (by less reliable I mean it gave different results compared to the DuckDB defaults in more cases).

I've opened a PR where I simply open a temporary connection to DuckDB to determine their internal defaults when cl-duckdb is first loaded. This should be more future proof in case they decide to change the logic behind the defaults.