Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
aflax
Aflax is a JavaScript library that enables developers to utilize nearly all of the features of the Adobe Flash platform from JavaScript.
My favorite prime number generator is the undocumented __next_prime():
https://github.com/llvm-mirror/libcxx/blob/78d6a7767ed57b501...
There is no good reason to use this one except in a code golf environment that includes all headers by default, which is where I learned about it.
curious about how it works: https://github.com/kidd/arraylangs-index/blob/master/noteboo...
Simple C based approach on Sieve of Eratosthenes (by yours truly):
* https://github.com/intc/c-notes/blob/master/threads/4-thrd_e...
It is still flash. Appears they incorporated aflax, a "run most of flash in js" library. https://github.com/aptana/aflax
Are you actually familiar with Project Euler?
https://projecteuler.net/
Absolutely none of your arguments make sense in a context of a series of programming puzzles of fixed size. Back in the real world, there is a real need for exploratory programming on mathematical problems. I' prefer to use Python for that. If your problems are statistical, R is a better choice. C++ is a poor fit for exploratory programming.
C++ is a good choice for serious mathematical computing. But not always the best. https://www.hpcwire.com/2020/01/14/julia-programmings-dramat... shows the growing popularity of Julia, even for the most demanding computations.
Looking to the future, I would choose Rust over C++ for most new projects where people currently use C++. It seems bizarre to me that C++ evangelists can talk about type safety and ignore memory safety, when memory safety is a giant problem for security and correctness in any large program.
So, yeah. C++ is great for what it's great for. But if I'm going some exploratory back of the envelope calculations, I'm still reaching for Python. And yield is one of the reasons why.