mavam / libbf

:dart: Bloom filters for C++11
http://mavam.github.io/libbf
BSD 3-Clause "New" or "Revised" License
354 stars 89 forks source link

Wrapping for Python 3 #34

Open mristin opened 6 years ago

mristin commented 6 years ago

Hi, First of all, thanks for the great work!

Have you considered making a Python wrapper around the library? If not, would you mind if I paraphrase (and reference) your code and package it in a separate python module? The dependency on threading would need to be removed as well as C++11, I suppose.

mavam commented 6 years ago

Have you considered making a Python wrapper around the library?

That's certainly an option. However, I wonder whether there are not any other Python packages out there that already cover the functionality of libbf.

If not, would you mind if I paraphrase (and reference) your code and package it in a separate python module?

Not at all, I appreciate any contributions! I'm happy to provide feedback, reviews, and discuss design. I just happen to lack the cycles right now to do the heavy lifting myself.

The dependency on threading would need to be removed as well as C++11, I suppose.

Yeah, that's just a legacy artifact. It could technically be dropped already.

mristin commented 6 years ago

Have you considered making a Python wrapper around the library?

That's certainly an option. However, I wonder whether there are not any other Python packages out there that already cover the functionality of libbf.

Believe it or not, all the current libraries are implemented in pure Python and hence very slow.

The dependency on threading would need to be removed as well as C++11, I suppose. Yeah, that's just a legacy artifact. It could technically be dropped already.

I'm making a pull request.

mristin commented 6 years ago

It seems that the test code requires Threads (see file test/unit_test_impl.hpp; I closed the pull request https://github.com/mavam/libbf/pull/36).

Is there any chance to use a testing framework that does not require Threads?

Otherwise, we'll just stick to conan'izing the package and use it in our C++ code base (see issue #35).

mavam commented 6 years ago

Believe it or not, all the current libraries are implemented in pure Python and hence very slow.

Oh, wow. That's surprising.

Is there any chance to use a testing framework that does not require Threads?

I would also prefer a simple solution that doesn't require Threads. I've written a small unit test framework for CAF. With minor modifications, it's probably a reasonable drop-in replacement.

mavam commented 6 years ago

If you're using the library in production and considering contributing, I'd be more than happy to discuss with you a few ideas on how to improve the code. Feel free to drop me a mail.

mristin commented 5 years ago

Hi @mavam , Let's keep the discussion first public -- if the correspondence grows larger and branched, we can move to private email.

I would also prefer a simple solution that doesn't require Threads. I've written a small unit test framework for CAF. With minor modifications, it's probably a reasonable drop-in replacement.

Is there a reason not to use something more common/standard like https://github.com/catchorg/Catch2? (Let me make a separate issue about removing Threads since this is now not only related to Python bindings.)