HNHacker News
TopNewBestAskShowJobs

BlackFly

2,043 karma · joined August 8, 2011

Theoretical physicist, theoretically now a software engineer
submissionscomments
BlackFly··on US Court of Appeals: TOS may be updated by email, use can imply consent [pdf]
My personal preference is for laws that promote reasonable limits on "Standard terms and conditions" and then recognizing that nobody reads them and making them applicable regardless of whether people read them or not. Then companies can stop pretending like people are reading the standard terms and unfair terms are just unenforceable. This does require that your civil law defines what unfair terms look like (generally that they are too one sided in favor of the contractor or are surprising given the service provided).

Obviously, this doesn't exist in the USA but does exist in (for example) the Netherlands. I would recommend lobbying in your country for such laws since in practice the vast majority of contracts like these that people face aren't actually negotiated nor negotiable.

BlackFly··on Don't create .gitkeep files, use .gitignore instead (2023)
The point of that line is to robustly survive a rename of the directory which won't be automatically tracked without that line. You have to read between the lines to see this: they complain about this problem with .gitkeep files.
BlackFly··on X offices raided in France as UK opens fresh investigation into Grok
I really find this kind of appeal quite odious. God forbid that we expect fathers to have empathy for their sons, sisters, brothers, spouses, mothers, fathers, uncles, aunts, etc. or dare we hope that they might have empathy for friends or even strangers? It's like an appeal to hypocrisy or something. Sure, I know such people exist but it feels like throwing so many people under the bus just to (probably fail) to convince someone of something by appealing to an emotional overprotectiveness of fathers to daughters.

You should want to protect all of the people in your life from such a thing or nobody.

BlackFly··on There is an AI code review bubble
For it to be evidence, you would need to know the number of Greptile comments made and how many of those comments were instead considered to be poor. You need to contrast false positive rate with true positive rate to simply plot a single point along a classifier curve. You would then need to contrast that with a control group of experts or a static linter which means you would need to modify the "conservativeness" of the classifier to produce multiple points along its ROC curve, then you could compare whether the classifier is better or worse than your control by comparing the ROC curves.

Sample number of true positives says more or less nothing on its own.

BlackFly··on Like digging 'your own grave': The translators grappling with losing work to AI
For such a literal case, automatic translations generally suffice. The real translator touch comes about when their is some nuance to the language.

Was that a double entendre or not? If not, you might make a literal translation to get the meaning across. If so, then a literal translation will not get the message across. Vice versa, if it was not a double entendre but you translate it as one, you may confuse the message and if it was and you translate it as such, then the human connection can be maintained.

That is also the tricky bit where you cross from being proficient in the language (say B1-B2) to fluent (C1-C2), you start knowing these double meanings and nuance and can pick up on them. You can also pick up on them when they weren't intended and make a rejoinder (that may flop or land depending on your own skill).

If you are constantly translating with a machine, you won't really learn the language. You have to step away at some point. AI translations present that in full: a translated text with a removed voice; the voice of AI is all of us and that sounds like none of us.

BlackFly··on Understanding Rust Closures
The biggest friction I experience with respect to rust closures is their inability to be generic: I cannot implement a method that takes a closure generic over its argument(s).

So then I'm forced to define a trait for the function, define a struct (the closure) to store the references I want to close over, choose the mutability and lifetimes, instantiate it manually and pass that. Then the implementation of the method (that may only be a few lines) is not located inline so readability may suffer.

BlackFly··on European Alternatives
It merged with Mastercard almost two decades back: https://en.wikipedia.org/wiki/Eurocard_%28credit_card%29
BlackFly··on Your brain on ChatGPT: Accumulation of cognitive debt when using an AI assistant
If you realize that what we remember are the extremized strawman versions of the complaints then you can realize that they were not wrong.

Writing did eliminate the need for memorization. How many people could quote a poem today? When oral history was predominant, it was necessary in each tribe for someone to learn the stories. We have much less of that today. Writing preserves accuracy much more (up to conquerors burning down libraries, whereas it would have taken genocide before), but to hear a person stand up and quote Desiderata from memory is a touching experience to the human condition.

Scribes took over that act of memorization. Copying something lends itself to memorization. If you have ever volunteered extensively for project Gutenberg you can also witness a similar experience: reading for typos solidifies the story into your mind in a way that casual writing doesn't. In losing scribes we lost prioritization of texts and this class of person with intimate knowledge of important historical works. With the addition of copyright we have even lost some texts. We gained the higher availability of works and lower marginal costs. The lower marginal costs led to...

Pulp fiction. I think very few people (but I would be disappointed if it was no one) would argue that Dan Brown's da Vinci Code is on the same level as War and Peace. From here magazines were created, even cheaper paper, rags some would call them (or use that to refer to tabloids). Of course this also enabled newspapers to flourish. People started to read things for entertainment, text lost its solemnity. The importance of written word diminished on average as the words being printed became more banal.

TV and the internet led to the destruction of printed news, and so on. This is already a wall of text so I won't continue, but you can see how it goes:

Technology is a double edged sword, we may gain something but we also can and did lose some things. Whether it was progress or not is generally a normative question that often a majority agrees with in one sense or another but there are generational differences in those norms.

In the same way that overuse of a calculator leads to atrophy of arithmetic skills, overuse of a car leads to atrophy of walking muscles, why wouldn't overuse of a tool to write essays for you lead to atrophy of your ability to write an essay? The real reason to doubt the study is because its conclusion seems so obvious that it may be too easy for some to believe and hide poor statistical power or p-hacking.

BlackFly··on Waiting for dawn in search: Search index, Google rulings and impact on Kagi
In addition to what others are telling you, Kagi also allows you to

- filter out results from specific websites that you can choose, - show more results from specific websites that you can choose, - show fewer results from specific websites that you can choose,

and so forth. When you find your results becoming contaminated by some new slop farm, you can just eliminate them from your results. Google could also do that, but their business model seems to rely more on showing slop results with their ads in those third party pages.

Just like mobile phone providers, third parties can provide lots of value add by reselling infrastructure. Business models can be different, feature sets can differ. This is not a delusion but the reality of reselling.

BlackFly··on Finding Matrices that you can multiply wrong, right
That reminds me of all the bad tests of numerical algorithms you can write if you use numbers like 0, 1, 2 as test inputs because:

- 0 * x = 0 so you don't necessarily test the correct computation of x,

- 1 * x = x so you don't necessarily test if you actually use the input 1,

- 2 * 2 = 2^2 = 2 + 2 so you can get some pretty weird masking.

BlackFly··on Are arrays functions?
Yeah, in languages with effects (exceptions/panics). That is a bit more than a partial function though.
BlackFly··on Are arrays functions?
Yes, as I said, you must use bounds checking or dependent types or effects or monad returns.

Arrays are the effect choice in most languages. The signature as a function becomes a gnarly continuation passing if you insist on the equivalence and so most people just tend to think of it imperatively.

BlackFly··on Are arrays functions?
Arrays are syntactic sugar over something that resembles a function, sure.

Real signature of an array implementation would be something like V: [0, N] -> T, but that implies you need to statically prove that each index i for V[i] is less than N. So your code would be littered with such guards for dynamic indexing. Also, N itself will be dynamic, so you need some (at least limited) dependent typing on top of this.

So you don't want these things in your language so you just accept the domain as some integer type, so now you don't really have V: ℕ -> T, since for i > N there is no value. You could choose V: ℕ -> Maybe<T> and have even cases where i is provably less than N to be littered with guards, so this cure is worse than the disease. Same if you choose V: ℕ -> Result<T, IndexOutOfBounds>. So instead you panic or throw, now you have an effect which isn't really modeled well as a function (until we start calling the code after it a continuation and modify the signature, and...).

So it looks like a function if you squint or are overly formal with guards or effects, but the arrays of most languages aren't that.

> for one of the best ways to improve a language is to make it smaller.

I think this isn't one of those cases.

BlackFly··on Stepping down as Mockito maintainer after ten years
I cannot put my finger on it exactly either. I also often find the mocking DSL the better choice in tests.

But when there are many tests where I instantiate a test fixture and return it from a mock when the method is called, I start to think that an in memory stub would have been less code duplication and boilerplate... When some code is refactored to use findByName instead of findById and a ton of tests fail because the mock knows too much implementation detail then I know it should have been an in memory stub implementation all along.

BlackFly··on Stepping down as Mockito maintainer after ten years
An anonymous inner class is also ephemeral, declarative, inline, capable of extending as well as implementing, and readily readable. What it isn't is terse.

Mocking's killer feature is the ability to partially implement/extend by having some default that makes some sense in a testing situation and is easily instantiable without calling a super constructor.

Magicmock in python is the single best mocking library though, too many times have I really wanted mockito to also default to returning a mock instead of null.

BlackFly··on More on whether useful quantum computing is “imminent”
Eh, quantum computing could very well be the next nuclear fusion where every couple of years forever each solved problem brings us to "We're 5 years away!"

Yet, for sure we should keep funding both quantum computing and nuclear fusion research.

BlackFly··on The appropriate amount of effort is zero
Except that the conclusion is wrong because you need tolerance. A bridge is designed to tolerate a certain weight, then you factor in some large tolerance for special circumstances, the same is true of effort.

You put more effort into your team presentation just in case there are guests. You cannot suddenly have a better presentation instantaneously when you arrive and see the CTO. In sports, such as bouldering, you will grip a hold slightly harder than strictly required in case you suddenly slip or just to easily accommodate the dynamics necessary as you shift your weight without requiring ultra precision which is a different form of effort.

The additional effort you expend is based on your estimation of the risk. As you master whatever skill it is, then you are better able to estimate the risks and the need or lack thereof for additional effort. Novices expend more effort than masters because they cannot gauge the need, but they will also make more mistakes by correctly guessing the correct effort but not accommodating for the risk.

The appropriate (over)effort is never 0 because there is always some context dependent risk.

BlackFly··on The Cloudflare outage might be a good thing
I think this really depends on your industry.

If you cannot give a patient life saving dialysis because you don't have a backup generator then you are likely facing some liability. If you cannot give a patient life saving dialysis because your scheduling software is down because of a major outage at a third party and you have no local redundancy then you are in a similar situation. Obviously this depends on your jurisdiction and probably we are in different ones, but I feel confident that you want to live in a district where a hospital is reasonably responsible for such foreseeable disasters.

BlackFly··on Cloudflare outage on November 18, 2025 post mortem
> it's essentially a checked exception without a stack trace

In theory, theory and practice are the same. In practice...

You can't throw a checked exception in a stream, this fact actually underlines the key difference between an exception and a Result: Result is in return position and exceptions are a sort of side effect that has its own control flow. Because of that, once your method throws an Exception or you are writing code in a try block that catches an exception, you become blind to further exceptions of that type, even if you might be able to or required to fix those errors. Results are required to be handled individually and you get syntactic sugar to easily back propagate.

It is trivial to include a stack trace, but stack traces are really only useful for identifying where something occurred, and generally what is superior is attaching context as you back propagate which trivially occurs with judicious use of custom error types with From impls. Doing this means that the error message uniquely defines the origin and paths it passed through without intermediate unimportant stack noise. With exceptions you would always need to catch each exception and rethrow a new exception containing the old to add contextual information, then to avoid catching to much you need variables that will be initialized inside the try block defined outside of the try block. So stack traces are basically only useful when you are doing Pokemon exception handling.

BlackFly··on KaTeX – The fastest math typesetting library for the web
Katex produces MathML. The problem katex solves is that MathML is really ungainly for authoring equations. So instead you write equations in a DSL (which most people just call latex) and Katex compiles that to HTML/MathML for you.

You can do this server side or client side and sadly too many people do it client side. If you do it server side, it is just one more step in your build next to transpiling and bundling.

BlackFly··on Minecraft removing obfuscation in Java Edition
A singleton is more than just, "I only need one of these," it is more of a pattern of "I need there to be only one of these," which is subtly different and much more annoying.
BlackFly··on What we talk about when we talk about sideloading
DMA in Europe required Microsoft to enable offline accounts without special tricks. When a government is doing their job properly they patch up holes in the laws that allow behavior that the majority consider to be against the prevailing norms.

You can also uninstall Edge and all the other Microsoft bloatware. Google on Android is actually one of the worse offenders in Europe for not being able to uninstall software as they consider far too many things to be critical to the operating system (for example, search).

BlackFly··on Do not accept terms and conditions
I too often idealize that.

The problem as I see it, when people start offering novel services it is hard to have a ready made contract for that. Hence the idea of reasonability and voidability that so many people have forgotten. If the term is clearly unbalanced in favor of the controlling party (ability to terminate the contract at any time without penalty while the contractee faces a penalty for early termination) without some specific consideration for this imbalance. These general reasonability notions need to be enforced more agressively. Instead, too many people think that anything goes once you signed the contract, but at the extreme end of this, slavery is clearly illegal. So there is clearly a line where you cannot agree to unreasonable things, but people forget that.

So I think these reasonability clauses were our attempt to capture novel contracts, but they have lost their teeth in the minds of people and in our legal systems. Then I start to entertain the enumerated contracts approach again...

BlackFly··on Computer science courses that don't exist, but should (2015)
Most hate of OOP comes from the definition that OOP = inheritance. Meanwhile, among people that consider themselves OO programmers, there is often the same revulsion towards inheritance and a preference for encapsulation while still calling that OOP. Because each language is subtly different, these things tend to flame war.

Which of course people do and why of course you have:

> PSYC 4410: Obsessions of the Programmer Mind

BlackFly··on Do not accept terms and conditions
The world should just follow the Dutch and stop pretending like explicit consent occurs or matters for standard terms and conditions:

http://www.dutchcivillaw.com/civilcodebook066.htm

As long as you had the opportunity to read them, you and the company are bound by them even if it is clear you never read them. Surprising terms and conditions are always voidable. There is a whole large list of voidable stipulations. I prefer Canadian law (this differs by province) where voidable stipulations invalidate the contract to a standard contract on the other hand.

BlackFly··on Lockless MPSC/SPMC/MPMC queues are not queues
In principle there is an infinite number of possibilities for service disciplines, since it is an arbitrary function to select an element from sets. Service disciplines can also include randomness. I only know the basics of the mathematics of queue theory, but my introduction to it gave me the impression that almost anything but the most basic of disciplines didn't have closed form solutions to most questions. Like many models, you can introduce some things as approximations to get close enough answers. I personally prefer simulation, but that has its own problems.
BlackFly··on That Secret Service SIM farm story is bogus
They are obviously allowed to discuss certain aspects, "We have a suspect," "We have our best detective, Sherlock Holmes, working on the case," "Here is a photograph of our suspect, please contact us if you have any information regarding the suspect."

Then there are other aspects that they would be prohibited from sharing in some legal jurisdictions, that hinge on privacy law (divulging sensitive but irrelevant details regarding the suspects alibi that they learned by interviewing the suspect) or on affecting potential jury members.

Instead they use the idea that they aren't allowed to share any information to just avoid answering questions.

BlackFly··on The Death of Utilitarian Programming
> If you wish to make an apple pie from scratch you must first invent the universe.

This take just pushes the notion of utilitarian to an extreme. In this framing, primary industry isn't utilitarian and only some subset of secondary industry is (chiefly B2C industry of products that aren't used as tools or parts of a final product by the consumer: a framemaker isn't utilitarian). The only utilitarian software in this definition is games or other entertainment software since otherwise the "utility" is an means to an end as a tool but that is exactly what a library is.

Making transistors is utilitarian. Making a library is utilitarian.

I am otherwise sympathetic to the pain points but I don't think there is an easy label for the layers of non-essential complexity that have built up and cannot easily be stripped away.

BlackFly··on Lockless MPSC/SPMC/MPMC queues are not queues
Yes, the author hasn't heard the term "service discipline" before. Sure, queuing theory is easier if you don't consider all the various service disciplines that real life queues use in practice (both physical queues and digital queues).
BlackFly··on That Secret Service SIM farm story is bogus
The author explains it in the next sentence.

> It’s the “Washington Game” of “official leaks”, disseminating propaganda without being held accountable.

In general, you can spot this kind of propaganda by realizing that the anonymous source is actually promoting the government's position and so isn't actually in danger. I.E. they aren't a whistleblower, they have no reason to fear repercussions.

← PreviousPage 2 of 22Next →