nowfound

Life & fun · June 2, 2025

FR

Fast Random Library for C++17

Morning HN. Random number generation feels is a somewhat underrepresented topic in the C++ realm. There is a lot of questionable info about it found online and even the standard library is quite behind the times in terms of it's algorithms. It suffers from trying to accommodate sometimes impractical standard requirements and has several ways of getting significantly bad statistical results. This leaves a lot easily achievable performance & quality on the table. So, being a mathematician who mostly works with stochastic models and wants these models to run fast and well, I embarked on a…

In plain words

Fast Random Library for C++17 is a random number generation library that provides modern algorithms for C++ developers. It addresses limitations in the standard library by offering better statistical quality and performance for applications requiring random number generation. The library is designed for developers working with stochastic models and scientific computing who need reliable, fast random number generation with contemporary algorithms and implementations.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

Morning HN. Random number generation feels is a somewhat underrepresented topic in the C++ realm. There is a lot of questionable info about it found online and even the standard library is quite behind the times in terms of it's algorithms. It suffers from trying to accommodate sometimes impractical standard requirements and has several ways of getting significantly bad statistical results. This leaves a lot easily achievable performance & quality on the table. So, being a mathematician who mostly works with stochastic models and wants these models to run fast and well, I embarked on a journey of trying to summarize "what is good and what is bad" and implement the "best stuff there currently is". Thankfully, the design of C++ <random> is quite flexible and easy to extend. With some cleanup, generalization and compile-time logic all the different algorithms can be wrapped in a generic standard-compatible API. A result of this work is single-header RNG library which has: - <random>-compatible generators (PRNGSs) with 3x-6x better performance - Cryptographically secure generators (CSPRNGs) - Faster uniform &#x2F; normal distributions that produce same sequences on every platform - Quick approximations of some non-linear distributions - More reliable entropy sources that std::random_device() - rand()-like API for when we just want random numbers without the boilerplate of proper a <random> setup Effectively all of this gets us 2x-8x speedups on many workloads while producing even better statistical quality. Don't think there is anything else like it, so I would like to showcase the result here and hear some opinions on its improvement: https:&#x2F;&#x2F;github.com&#x2F;DmitriBogdanov&#x2F;UTL&#x2F;blob&#x2F;master&#x2F;docs&#x2F;modul... For those interested, there is a more detailed rundown of all the quirks of this topic at end of the docs, might prove an interesting read.

More life & fun this month

the category →
  • TL

    Life & fun · 10d ago · louisabraham.github.io

  • Photosynthesis fires two of your iPhone

    Life & fun · 28d ago · photosynthesis.camera

  • SoloUno310

    Take control of hair pulling, nail biting & skin picking

    Life & fun · 28d ago · solouno.io

  • Scroll through all 43,252,003,274,489,856,000 reachable Rubik's Cube permutations.

    Life & fun · 26d ago · everycube.alen.is

  • The Interactive 3D Encyclopedia

    Life & fun · 21d ago · expeditione.fun

  • Hi HN, I built Eigendrum, a web tool that solves the 2D wave equation for arbitrary shapes so you can hear what they sound like as drums. How it works: * Solves -∇²u = λu using finite element analysis (Kφ = λMφ) on a triangle mesh. * Validated to <0.1% error against closed-form solutions for circles (Bessel zeros) and rectangles. * Sound model factors in strike location, Rayleigh damping, and mallet width. * Includes Kac drums I & II to demonstrate identical sound spectra from different geometries. * No frameworks, build steps, or dependencies. Repo and tests:…

    Life & fun · 26d ago · baselashraf81.github.io

Launched alongside, June 2025

the whole month →
  • IM

    Hey HN! Pilots everywhere are required to keep a logbook of all their flying hours, aircraft, airports, and so on. Since I track everything digitally (some people still just use paper logbooks!), I put together some data visualizations and a few 3D globes to show my flying history. This globe is probably my favourite so far: https:&#x2F;&#x2F;jameshard.ing&#x2F;pilot&#x2F;globes&#x2F;all If you’ve got ideas for other graphs or ways to show this kind of data, I’d love to hear them!

    Life & fun · 2025 · jameshard.ing

  • Stunning presentations with AI. No design skills required.

    AI · 2025 · chroniclehq.com

  • Build native mobile apps for iOS and Android without code.

    Dev tools · 2025 · bble.io

  • Twenty991

    The #1 open-source CRM

    Dev tools · 2025 · twenty.com

  • All your connections, across all your socials.

    AI · 2025 · pally.com

  • WC

    I was the main contributor to workout.lol, an open-source fitness app to easily build a workout routine. The project had traction (1.4k GitHub stars, 95 forks, ~20K visits&#x2F;month), but was eventually sold due to video licensing hurdles. The new owner stopped maintaining it, and the repo went abandoned. Over the next 9 months, I sent 15 emails to try to save it : no replies. Feature requests & issues were ignored. The community was left with a "broken" tool let's say. I couldn't just let it die So I built the new version from scratch with the same open-source spirit, but a better…

    Dev tools · 2025 · github.com