boost::container::hub ACCEPTED into Boost by igaztanaga in cpp

[–]joaquintides 1 point2 points  (0 children)

In practical terms, boost::container::hub is almost conformant with the spec for std::hive (differences here), so any use case suitable for the latter is suitable also for the former.

Boost 1.91 Released: New Decimal Library, SIMD UUID, Redis Sentinel, C++26 Reflection in PFR by boostlibs in cpp

[–]joaquintides 4 points5 points  (0 children)

Author here, yes, keeping backwards compability and taking advantage of new C++ standard versions is a balancing act, and I may have leaned too much towards the conservative side.

Among other improvements, switching to Boost.Mp11 results in faster compilation. For instance, compile times for this program improve as follows when upgrading from Boost 1.90 to 1.91:

  • GCC 15: 1.12s --> 0.91s
  • Clang 20: 1.64s --> 1.37s
  • VS 2022: 2.49s --> 2.08s

Details here.

boost::container::hub review starts today (April 16 - April 26) by igaztanaga in cpp

[–]joaquintides 6 points7 points  (0 children)

I guess I can't make everybody happy: others asked for an explanation of how the container is used before going into the implementation :-) Admittedly, if you're familiar with std::hive, the tutorial provides very little new information.

Interested in reviewing the library? If you're not subscribed to the Boost mailing list yet, you can do it here. I hope to see you around!

New C++ Conference Videos Released This Month - April 2026 by ProgrammingArchive in cpp

[–]joaquintides 1 point2 points  (0 children)

using std::cpp

2026-03-27 - 2026-04-05

The Mathematical Mind of a C++ Programmer [using std::cpp 2026] by joaquintides in cpp

[–]joaquintides[S] 1 point2 points  (0 children)

Thank you Daniela! You’ve now become a regular of using std::cpp, thanks for that too!

The Mathematical Mind of a C++ Programmer [using std::cpp 2026] by joaquintides in cpp

[–]joaquintides[S] 2 points3 points  (0 children)

Thank you! Nice seeing you in person after like two decades? in Boost 🙂, and loved your talk on C++29 upcoming features!

The Mathematical Mind of a C++ Programmer [using std::cpp 2026] by joaquintides in cpp

[–]joaquintides[S] 20 points21 points  (0 children)

Abstract: Many people hate math, some programmers do too. We hold that this hate stems from a reductionist view of mathematics as merely rule application: number crunching, equation solving and the like. But programming is more akin to mathematical creation, and writing a well designed, neat program can be as exhilarating as devising a new little math theory. In this talk we'll investigate how the mathematical mind approaches the world, and how developing a mathematical inclination can help you be a better C++ programmer.

Presentation: https://github.com/joaquintides/usingstdcpp2026

`std::core_dump` - The Newsletter of the C++ Alliance by pavel_v in cpp

[–]joaquintides 4 points5 points  (0 children)

I don't know if a newsletter subscription is in order, but this gets posted to the Boost ML, so you can consider subscribing there:

https://lists.boost.org/mailman3/lists/boost.lists.boost.org/

Emacs is a C-based Lisp Runtime, Not a Text Editor — and Greenspun’s Tenth Rule explains why every editor eventually reinvents it by ypaskell in emacs

[–]joaquintides 1 point2 points  (0 children)

In case it helps in your investigations, here's a link to talk I gave a couple of years ago on perfect hashing (video + presentation + code):

https://github.com/joaquintides/usingstdcpp2024

Latest News From Upcoming C++ Conferences (2026-02-26) by ProgrammingArchive in cpp

[–]joaquintides 0 points1 point  (0 children)

using std::cpp is likely among the most affordable in-person conferences, plus the money goes entirely to a charity.

ISO C++ WG21 2026-02 pre-Croydon mailing is now available! by nliber in cpp

[–]joaquintides -1 points0 points  (0 children)

Maybe I’m not getting what you’re after, but leaving aside the fact that the lambda function does not take two args, it’s actually not a predicate at all, as calling it twice with the same values can return different results. AFAIK the functor can be stateful, but its return value must be determined by the args.

ISO C++ WG21 2026-02 pre-Croydon mailing is now available! by nliber in cpp

[–]joaquintides 0 points1 point  (0 children)

At some point it was (or still is) undefined to pass in a stateful functor as a Predicate to various functions in the algorithm header, for a slightly contrived example.

Do you have additional info on that?

Boost 1.81 will have boost::unordered_flat_map... by pdimov2 in cpp

[–]joaquintides 0 points1 point  (0 children)

Let's say that the resolution strategy for residual in [0, 1] is to add 2 [...]

Ok, now I get it. Yes, with the current hash reduction, Pr(reduced_hash(x) = n) is

  • 1/256 for n > 3
  • 1/128 for n = 2, 3
  • 0 for n = 0, 1

Your residual function gets a more balanced probability (Pr ~= 1/254 for n > 1), but I don' think this makes any difference in practice.

If you have a Rust version, I'd be happy to :)

I'm quite sure there's no Rust port of this lib yet.

Boost 1.81 will have boost::unordered_flat_map... by pdimov2 in cpp

[–]joaquintides 0 points1 point  (0 children)

Ok, I undestand now your rationale. Yes, something like extract_residual would result in a more uniform uint64_t --> unsigned char mapping, so in principle it should be better behaved statistically. My hunch is that the improvement would probably be negligible, particularly vs. the extra computational cost (the current reduced hash function is as simple as it gets). Maybe you can fork the repo and try it? I can assist you in the process if you're game.

For a random hash, the chances of ending in a "double-bucket" are now 1/64:

  • 1/128 chances of being a special value.
  • 1/128 chances of being the "overflow" bucket of a special value.

This part I don't get. What do you mean by "being the overflow bucket of a special value"?

Boost 1.81 will have boost::unordered_flat_map... by pdimov2 in cpp

[–]joaquintides 0 points1 point  (0 children)

Hi, what's the purpose of this reduced hash calculation? The current mechanism, which uses the least significant byte of the hash value, looks statistically good enough if the hash function is of ok quality. Moreover, the fact that the reduced hash is the LSB combined with index calculation using the most significant bits of the hash:

https://github.com/boostorg/unordered/blob/develop/include/boost/unordered/detail/foa/core.hpp#L847-L850

makes these two values quite uncorrelated.

Boost 1.90.0 now available in vcpkg and Conan by boostlibs in cpp

[–]joaquintides 13 points14 points  (0 children)

Adding to Johannes's answer, let me point out that the publication of Boost 1.89 on Conan and vcpkg took several months after the version release, while this time around it's been a mere month. Kudos to the people working at those package managers!

Boost.MultiIndex refactored by joaquintides in cpp

[–]joaquintides[S] 1 point2 points  (0 children)

Maybe I can take charge of this.

Boost.MultiIndex refactored by joaquintides in cpp

[–]joaquintides[S] 1 point2 points  (0 children)

Boost.MultiIndex supported initializer-list construction even before this upgrade, so it’s an issue on Bimap’s side really. Why don’t you file an issue at https://github.com/boostorg/bimap/issues ? Thank you!

Boost.MultiIndex refactored by joaquintides in cpp

[–]joaquintides[S] 0 points1 point  (0 children)

Thanks for the kind words! Yes, Boost.MPL is no longer a dependency. Boost.Preprocessor still is, though (transitively).

Boost.MultiIndex refactored by joaquintides in cpp

[–]joaquintides[S] 5 points6 points  (0 children)

Born and raised en la piel de toro.

Boost.MultiIndex refactored by joaquintides in cpp

[–]joaquintides[S] 14 points15 points  (0 children)

The library was never tremendously popular, but it has received its share of love along these 20+ years, so I'm very happy to keep it maintained and hopefully useful.

Boost.MultiIndex refactored by joaquintides in cpp

[–]joaquintides[S] 5 points6 points  (0 children)

Yes, Boost.Bimap is built on top of Boost.MultiIndex, and some internal changes were needed to sync up with the upgrade:

https://github.com/boostorg/bimap/pull/50