Zig-style generics are not well-suited for most languages
A discussion of some of the downsides of Zig
Hasnain says:
“If you ever see someone advertise a language feature as “everything is an X”, your first reaction should probably be healthy skepticism, rather than delight. Programming languages generally tend to draw distinctions between distinct things for good reasons.
The C++ committee added concepts after decades of pain with templates, and even these do not overcome all the problems mentioned above. I would not be surprised to see Zig add a similar system (likely with its own twist to it) at some point if it keeps growing in usage.”
Posted on 2024-07-04T02:33:42+0000
Gender Quotas and the Crisis of the Mediocre Man
Quotas aren't anathema to meritocracy: they increase competence levels by displacing mediocre men, write Tim Besley, Olle Folke, Torsten Persson and Johanna Rickne. A common criticism against gender quotas is that they are anathema to meritocratic principles. This research on Sweden shows that the o...
Hasnain says:
“Within each local party, we compare the proportion of competent politicians in elections after the quota to the 1991 level. The figure below show some striking results. The left panel illustrates our estimates for politicians of both genders with black dots showing the change in the proportion of competent representatives in a party which is forced to increase their share of women (by 100 percentage points). The right panel splits the results by men and women (blue dots for men and pink dots for women). It shows distinctly that the average competence of male politicians increased in the places where the quota had a larger impact, and that the effect is concentrated to the three elections following the quota. On average, a higher female representation by 10 percentage points raised the proportion of competent men by 3 percentage points! For the competence of women, we observe little discernible effect.”
Posted on 2024-07-02T15:32:57+0000
The 'soft dictatorship' of this Supreme Court
With the nine justices reconvened for the fall term, SFGATE columnist Drew Magary is here to remind us all to stay angry and demand change.
Hasnain says:
From October. Prescient.
“The momentum is there, but only if you stay angry. Given this court’s pattern of behavior, that shouldn’t be hard for you to do. Don’t treat these judges with respect, and don’t allow our elected representatives to treat them with respect, either. Tell those reps that this court isn’t legitimate. It’s vile, evil and must be destroyed. Never stop saying it to them.”
Posted on 2024-07-02T02:44:03+0000
What does the Supreme Court immunity ruling mean for Trump? 6 questions answered
What happens to Trump’s federal criminal charges, especially if he is reelected? Here are five quick questions about the court’s ruling.
Hasnain says:
I don’t see how the country comes back from this and the Chevron ruling without massive upheaval and someone willing to take action in the moment (and our current democratic leadership is certainly not cut out for this)
As someone wrote on twitter:
“Thinking about how it would be reported if the ex-president of a non-Western country was ruled immune from prosecution by a panel of judges he himself appointed”
Posted on 2024-07-02T01:41:16+0000
A discussion of discussions on AI bias
There've been regular viral stories about ML/AI bias with LLMs and generative AI for the past couple years. One thing I find interesting about discussions of bias is how different the reaction is in the LLM and generative AI case when compared to "classical" bugs in cases where there's a clear bug.....
Hasnain says:
“We can observe something similar in almost every consumer market and many B2B markets as well, and that's when we're talking about issues that have known solutions. If we look at problem that, from a technical standpoint, we don't know how to solve well, like subtle or even not-so-subtle bias in ML models, it stands to reason that we should expect to see more and worse bugs than we'd expect out of "classical" software systems, which is what we're seeing. Any solution to this problem that's going to hold up in the market is going to have to be robust against the issue that consumers will overwhelmingly choose the buggier product if it has more features they want or ships features they want sooner, which puts any solution that requires taking care in a way that significantly slows down shipping in a very difficult position, absent a single dominant player, like Intel in its heyday.”
Posted on 2024-07-01T02:24:58+0000
IPC in Rust - a Ping Pong Comparison
Home » Posts » IPC in Rust - a Ping Pong Comparison IPC in Rust - a Ping Pong Comparison 2024-06-12 · 20 min · | Suggest Changes Table of Contents The Problem A Note on Timing Benchmarking Approach 1 - Pipes Approach 2 - TCP Approach 3 - UDP Approach 4 - Shared Memory Results Syste...
Hasnain says:
“If I had to do this in Production, for the majority of workloads I'd probably still use an HTTP / TCP connection. It's portable, reliable on message failure, and I could split it across machines if needs be. However for the cases where latency really matters, the maintenance overhead of using shared memory is worth it.”
Posted on 2024-07-01T02:03:05+0000
Why Your SSD (Probably) Sucks and What Your Database Can Do About It
Why Your SSD (Probably) Sucks and What Your Database Can Do About It Database system developers have a complicated relationship with storage devices: They can store terabytes of data cheaply, and everything is still there after a system crash. On the other hand, storage can be a spoilsport by being....
Hasnain says:
“In this case, however, you probably have other, more catastrophic data loss vectors to worry about. In other words: You probably don’t care if the fsync call completed when your laptop burns down in a house fire or gets stolen - the data is gone anyway.
If you are running database systems in a production environment, you (or your cloud provider) are hopefully using enterprise-grade SSDs with capacitor-backed write cache that have great write latency.”
Posted on 2024-07-01T01:57:46+0000
Now is a good time to start a service business
Now is a good time to start a service business. Maybe you should try it! A service business is one where your company sells its work output directly instead of selling a product. Dentists, plumbers, design agencies, pool cleaner, consultants: these are all service businesses. The opposite of a servi...
Hasnain says:
“Service businesses have always been the easiest to start because there’s no R&D phase. But they’ve historically been tough to grow because the main ways to grow were raising prices, hiring, or pruning your service into a product. If AI keeps getting better (a guarantee) but doesn’t quite get to superhuman abilities (big question mark), there will be lots of automation opportunities that let you grow your service business beyond the traditional constraints.”
Posted on 2024-07-01T01:33:35+0000
The Great Database Migration
At the end of Q2 2024, we migrated Shepherd’s pricing engine database with zero downtime.
Hasnain says:
The challenges they hit were eminently predictable - but it was still cool to read about their earlier use of SQLite.
“Overall, this migration proved to be a massive success. Shepherd is now better equipped to handle a higher volume of business and priced risks. We no longer need to worry about application/database coupling, and our engineering team’s velocity continues to grow.”
Posted on 2024-07-01T00:53:55+0000
Weekend projects: getting silly with C
C is beautiful yet full of horrors. Here's to uncovering its hidden depths.
Hasnain says:
“This last snippet is probably not UB-safe and is GCC-specific. But the point stands: you can write completely alien and befuddling code in C without making it unreadable.”
Posted on 2024-07-01T00:47:24+0000