Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for dode
| Type | On... | Excerpt | Status | Date |
|---|---|---|---|---|
| Comment | Post #296632 |
I will for sure try it sometime!
For now I have a compromise - a simple wrapper exposing just that one function I need.
It is [magic.cppm](https://forgejo.luniks.net/gitdode/ocr-cpp/src/branch/main/magic.cppm) and [magic.cpp](https://forgejo.luniks.net/gitdode/ocr-cpp/src/branch/main/magic.cpp)... (more) |
— | 10 days ago |
| Comment | Post #296632 |
Very nice, thank you for your comprehensive answer!
Since `magic_t` is a pointer, for now I went for your "If magic_t really is a pointer..." solution. I have some homework to do to really understand the difference to what I did.
Your "I would wrap the C interface in a proper C++ interface..." ... (more) |
— | 12 days ago |
| Edit | Post #296631 | Initial revision | — | 12 days ago |
| Question | — |
Smart pointer with custom deleter with 'using pointer = <pointer type>' To manage libmagic's `magict` aka `magicset` cookie with a `uniqueptr` and a custom deleter in a RAII wrapper, I have: struct MagicDeleter { // magict is already a pointer (magicset) using pointer = magict; void operator()(magict cookie) noexcept { if (c... (more) |
— | 12 days ago |
| Comment | Post #296548 |
Interesting! I realize my Debian forky has `/usr/include/oneapi/tbb.cppm` via `libtbb-dev`, so I could just `import tbb;` and replace `std::for_each` with `oneapi::tbb::parallel_for_each` as you suggest and it works as well.
But yes, it would be nice to be able to use the standard API with modules. (more) |
— | about 1 month ago |
| Edit | Post #296542 | Initial revision | — | about 1 month ago |
| Question | — |
Parallel execution with algorithms and execution policies I've just learned about algorithms, ranges and views (from a book), including execution policy such as `std::execution::par` and I naively tried: ``` cpp import std; int main() { auto values {std::ranges::views::iota(0, 10)}; std::foreach( std::execution::par, std::begi... (more) |
— | about 1 month ago |
| Comment | Post #296420 |
Thank you! I'm happy to have found Codidact.
I'll move over from SO and ask future questions here, and I agree with you - given there is (some) constructive feedback, even a simple question can produce inspiring thoughts and ideas.
And it is another quality talking to humans versus an LLM... (more) |
— | about 2 months ago |
| Edit | Post #296420 | Initial revision | — | about 2 months ago |
| Answer | — |
A: What’s the point of Q&A sites anymore? Asking the last five or so questions on SO (I am new here), I felt pretty much the same as you do. I've put a lot of effort in illustrating the problem and ask a concrete question. While others confirmed they were legit questions, they received downvotes without explanation, and as one commenter... (more) |
— | about 2 months ago |
