I generally do this via a `throw UnsupportedValueError(value)`, where the exception constructor only accepts a `never`. That way I have both a compile time check as well as an error at runtime, if anything weird happens and there's an unexpected value.
Anecdotally it seems like most software engineers have heard of linear programming, but very few have heard of convex programming [1], and fewer still can apply it. The fixation on LPs is kind of odd ...
Related, there are a few cryptocurrencies that used things related to finding large primes as part of their proof of work functions. It turns out that ~8 years ago, a really fast primality test implementation could make you a lot of money. (For some period of time I was the author and maintainer of mining software for riecoin. Why, I have no idea, except that I like prime numbers.)
This article omits the number one optimization for fast primality testing: Montgomery multiplication
It forms the basis of fast practical modular exponentiation implementations.
Niall Emmart, then in academia and now I believe at Nvidia, released a really, spectacularly fast GPU bigint library, CGBN: https://github.com/NVlabs/CGBN
It's still the fastest batch modexp implentation that I'm aware of. It's breathtaking, if I can gush in geek for a moment.
(Someday I should write up the story of how that helped me dominate production of a small cryptocurrency for about 5 years. Thanks, Niall - owe you a beer if we ever cross paths!)
Also worth noting that python includes an entirely fine modexp in the three-argument form of pow(x, y, m) --> compute x^y % m
With that, you can very easily implement a fermat or miller-rabin primality test if you want to roll your own, which is quite fun. If you don't, the gmp library provides a very nice mpz_probab_prime() function. Gmp is obviously faster, but it's hard to beat the fun of a two liner fermat test for playing with big primes.
I have been "taking" the MIT 6.824 (6.5840) distributed systems course, and the course is insanely good. (it is not in this article because this is a very advanced CS course.) You can get all the lectures including guest lectures on Youtube, you get labs with TEST SUITES, you get all the Q&As, you get exam questions AND answers. All for FREE. Perhaps the only thing missing from what an enrolled student would get is TA answering questions and discussing with other students or working on projects (and of course MIT credits), which is not too important for me. As someone without a CS background, the course is extremely helpful in getting into dist system.
All the material except video is hosted on their website. No registration or anything. You run the test suites locally to verify that you correctly completed the assignments. It makes you wonder what happened to Coursera, Udacity and many other MOOC projects that were very optimistic and enthusiastic but got worse and disappointing in recent years. This is how it should be done.
If you don’t listen to their “On the Metal” podcast, you’re missing out. So many great stories from legends in the industry. Just start with the first episode.
You could say that Mark Russinovich is a hacker's hacker, the foremost Windows hacker, and a reverse engineering wizard. It was he who discovered and blew the whistle on the Sony rootkit scandal, for example, after finding and reverse engineering it on his machine.
He extensively reverse engineered and documented "Windows Internals" details before joining Microsoft (and before being "encouraged" to change the name of his business to Sysinternals).
His writings and talks on "The case of..." are master classes on reverse engineering.
I found out about this book through the EmbeddedFM podcast [1]. Their latest episode is an interview with the authors of the book. Highly recommend the episode, and the podcast in general for folks that are into electronics.
I'm not sure the authors appreciate the impact of their own invention. This isn't a camera that censors things: it's a passive image segmentation model that runs in real time and consumes zero power. This would have huge implications for robotics applications.
There is a secret keyword that you can use in comments to "sage" a post – i.e. using a secret keyword in the comments of a post will prevent it from gaining traction in the article scoring algo. I cannot say the keyword here because it would sink this post, but if you look around at some posts you can find it.
1) Rational Reminder (Ben Felix & Cameron Passmore) : This is hands down the best in equity investing (start with Nobel Prize winner Eugene Fama in Episode 200)
2) Flirting With Models (Corey Hoffstein) : Deep dives with guests on Factor investing and quantitative finance in general
3) Bogleheads on Investing (Rick Ferri) : Discussion on advanced investing topics from a individual investor perspective (also covers financial planning topics)
Preimplantation polygenetic testing. The idea is that, when doing IVF, you sequence the genome of all the embryos and implant the ones that you predict will have properties that you like.
This already exists for monogenetic screening (for parents who don't want to pass on heritable diseases for their children, where those diseases are localized to one gene). But the idea here is that, by checking thousands of genes, you can make predictions for things that start to be very relevant to parents, like attractiveness or height or intelligence.
I don't think people understand how important this is going to be. If the process is expensive, it will only be available to rich people. In a generation, maybe they'll have children that are more intelligent or more attractive than average.
If that starts happening, I think it would have pretty negative effects on society, but there's no way to really prevent it (rich people will just go to Singapore if you ban it in the US). So the only reasonable option is to have the government subsidize it and make it affordable to everyone.
The author has a newer project, too, MarkovJunior[0], which generalizes to the combination of WFC with arbitrary cellular automata and grammar-substitution-like types of rules, with probabilistic inference robust enough to be able to e.g. solve sokoban levels in addition to generating stunning random results.
Shannon’s insight into the hyperspheres of transmission blew my mind 15 years ago, and I’m still not over it.
The idea of an ideal communication channel rivals most ideas ever had. The original paper is surprisingly accessible. Highly recommended if anyone hasn’t had a chance to give it a tour.
Without a doubt one of the best technical books I have ever read.
To me, it was a missing piece of the big puzzle of "how do computers work". I read many a book to answer this question, and came away with three books:
- CODE by Charles Petzold explains the CPU
- Operating Systems: Three Easy Pieces by Arpaci-Dusseau explain OSes
- Crafting Interpreters by Robert Nystrom explains programming languages
InfoQ's QCon conference frequently has an "architectures you always wondered about", which frequently has good talks. You can find them here: https://www.infoq.com/architecture-design/.
Shameless plug: If you want to hear a bit more history about the previous vulnerability on the LPC55S69, we talked to Laura about it in our podcast: https://unnamedre.com/episode/55
Tailscale reminds me of Fly.io; fantastic tech that "just works", run by people who know what they're doing and know how to write about it. What other companies belong in this all-too-exclusive cohort?
They also have a YouTube channel that adds images and video to the same audio track. A lot of it is just stock footage, but I like the images of ruins and the renders of what cities might have looked like in the past. It’s especially helpful when they’re discussing artwork.