HNHacker News
TopNewBestAskShowJobs

BlackFly

2,043 karma · joined August 8, 2011

Theoretical physicist, theoretically now a software engineer
submissionscomments
BlackFly··on LIGO detects most massive black hole merger to date
It is difficult to talk about the shape of the event horizon because the ordinary definition of a sphere is "surface where all points are equidistant from a given point" is already complex in a differentiable manifold, but even more so when the distance is infinite because of a singularity (or the point doesn't exist/isn't unique because of geodesic structure). So you switch to a definition of "surface of constant scalar curvature with the topology of a sphere", the topology being important to distinguish it from a plane and a hyperboloid.

From there, I haven't personally done or seen the calculations of the shape of the horizon for Kerr or merging black holes, but my intuition is that it would be indeed peanut shaped for a merger (there are likely some saddle points). The coordinate shape certainly is but you can choose coordinates so that a Schwarzschild black hole is a coordinate peanut so coordinates aren't very meaningful.

BlackFly··on Anthropic cut up millions of used books, and downloaded 7M pirated ones – judge
Making a copy differs from taking an existing object in all aspects: literally, technically, legally and ethically. Piracy is making a copy you have no legal right to. Stealing is taking a physical object that you have no legal right to. While the "no legal right to" seems the same superficially, in practice the laws differ quite a bit because the literal, technical and ethical aspects differ.
BlackFly··on Nobody has a personality anymore: we are products with labels
When you eliminate problems in people's lives, they do not suddenly feel that they have no problems. Instead they lower the bar for what they consider a problem. If the bar gets lowered too far, suddenly the previously minute things are problematic and there may be many of them.

Stress is caused by our internal perspective of our problems, not by some external unchanging measure of it.

BlackFly··on Nobody has a personality anymore: we are products with labels
In order to hold someone accountable for their actions you need to allow them a choice in the first place. Disallowing children from making choices is one way of protecting them from the consequences of a bad decision: by not allowing them to make it in the first place. That is what coddling is, protecting from the environment. Protecting them from the choice is just a more extreme version of shielding them from the consequences.
BlackFly··on Eastern Baltic cod grow much smaller than they did due to overfishing
Here is a decade old study talking about that: https://www.science.org/doi/10.1126/science.aac4249
BlackFly··on Scientists identify culprit behind biggest-ever U.S. honey bee die-off
Yeah, science.org is editorializing. The actual investigators say

> While viruses are a likely end-stage cause of colony death, other stressors such as nutritional stress and agrochemicals may have also played significant roles.

because their study just cannot tease apart the origin cause due to selection bias in the methodology. That isn't the point of their study. Their hypothesis was that miticide resistant varroa were killing (possibly already compromised) bees due to novel viruses and pathogens. Thus the use of current miticides won't help colony collapse.

BlackFly··on Proton joins suit against Apple for practices that harm developers and consumers
Proton is explicitly suggesting that a company can choose to help a government with an authoritarian agenda, so they agree with you that a company has no obligation to protest. They make no assertions as to whether corporations should be above nation states but they do wear their politics on their sleeve (that authoritarianism should be opposed).

Their point is that they, as a separate company, can choose to object and attempt to offer products to help people evade authoritarianism and that Apple shouldn't be able to interfere with that in the US market in ways that they do. Obviously in the market of the authoritarian regime they can interfere, but that has no bearing to a US court.

BlackFly··on Want to meet people, try charging them for it?
Author notes that there is still a standing offer to answer questions for free "if time allows" but doesn't get any inquiries. I believe this shows that it isn't due to fame or the payment making the author seem more legitimate.

Instead I think that the payment creates the expectation that the inquiry will be answered and when someone expects an answer they are more willing to inquire. When the consultation is free or "time permitting", then it might simply be refused but making the inquiry itself isn't zero cost for the individual and their mental calculus makes it not worth asking. The mental calculus is, "What is the person getting out of this interaction and why would they choose to answer me but not someone else?" When it is financial you can see that you are equal to everyone else and you see exactly what the consultant is getting out of it.

BlackFly··on Error handling in Rust
The article expressly suggests not wrapping/embedding those errors but instead putting the errors into context. That suggestions starts with the sentence "Define errors in terms of the problem, not a solution" and explicitly shows a wrapping as an anti-pattern then lays out the better solution. Note that the author's solution serializes the underlying error in some cases to avoid leaking it as a dependency.

You can use ? when you implement From (to get an automatic Into) which which can be as easy as a #[from] annotation with thiserror. You can manually implement From instead of inlining the map_err if you so choose. Then you are only ever using map_err to pass additional contextual information. You usually end up using ? after map_err or directly returning the result.

BlackFly··on America’s incarceration rate is in decline
Well apparently 43% of American inmates are incarcerated for drug related offenses. https://www.bop.gov/about/statistics/statistics_inmate_offen...

This article claims that about 32k people in 2021 were for cannabis related offense, and simply carrying that to today would be 23% of the prison population: the largest offense type. https://www.lastprisonerproject.org/cannabis-prisoner-scale

BlackFly··on How to Think About Time in Programming
> How does general relativity relate to the idea of time being a universal, linear, forward-moving "entity"?

TAI provides a time coordinate generated by taking the weighted average of the proper times of 450 world lines tracked by atomic clocks. Like any other time coordinate, it provides a temporal orientation but no time coordinate could be described as "universal" or "linear" in general relativity. It would be a good approximation to proper time experienced by most terrestrial observers.

Note that general relativity doesn't add much over special relativity here (the different atomic clocks will have different velocities and accelerations due to altitude and so have relative differences in proper time along their world lines). If you already have a sufficiently general notion of spacetime coordinates, the additional curvature from general relativity over minkowski space is simply an additional effect changing the relation between the coordinate time and proper time.

BlackFly··on The cultural decline of literary fiction
Yeah, this is basically the argument of the op. That somewhere in the 70s, that whole genre started to target critics as the audience instead of the general population and sales have been dwindling since that alienation.
BlackFly··on The cultural decline of literary fiction
According to the author this isn't the case, but the take is complicated:

> People don’t read books or short stories in magazines anymore because they’re too busy scrolling? There’s data on this: according to the National Endowment of the Arts, the number of Americans who “read literature” has fallen from 56.9% in 1982 to 46.7% in 2002 to 38% in 2022. I’m not even going to bother pulling data on the percent of time people spend on their phones or on the internet. So the internet means people spend less time reading books and (presumably) less time reading literary fiction in particular because it’s weighty, boring, dense, etc. There are two problems with this theory: one is that the facts are wrong — the actual size of the fiction reading population has not shrunk a meaningful amount (population growth), and the second is that even if the facts were right, it couldn’t be correct: in 1955, the number of Americans who even read one book a year (39%) was lower than it is today (53%).3 And the 1950s and 1960s were supposedly the golden-age of American fiction. What’s actually going on?

Most easily digestible evidence submitted by the author is https://fred.stlouisfed.org/data/DRBKRA3A086NBEA showing that actual per capita expenditure on reading material has increased indexed to 2017 dollars...

BlackFly··on Generative AI coding tools and agents do not work for me
Did I say AI didn't work for me? Nope, so it is unclear to me why you are projecting some kind of perceived deficit onto me.

The difference between me and the person I responded to is that I feel I understand the perspective of the OP and I was trying to help the person who it didn't make sense to to understand the perspective.

BlackFly··on The Grug Brained Developer (2022)
Debuggers absolutely help in distributed environments, in the exact same way that they help with multithreaded debugging of a single process. It is certainly requires a little bit more setup, but there isn't some essential aspect of a distributed environment that precludes the techniques of a debugger.

The only real issue in debugging a distributed/multithreaded environment is that frequently there is a timeout somewhere that is going to kill one of the threads that you may have wanted to continue stepping through after debugging a different thread.

BlackFly··on The Grug Brained Developer (2022)
The tools are not mutually exclusive. I also do quite a lot with print debugging, but some of the most pernicious problems often require a debugger.

> It takes less time to decide where to put print statements than to single-step to the critical section of code

Why would you ever be single-stepping? Put a break point (conditional if necessary) where you would put the print statement. The difference between a single break point and a print statement is that the break point will allow you to inspect the local variables associated with all calls in the stack trace and evaluate further expressions.

So when do you debug instead of using print statements? When you know that no matter what the outcome of your hypothesis is, that you will need to iteratively inspect details from other points up the stack. That is, when you know, from experience, that you are going to need further print statements but you don't know where they will be.

BlackFly··on Generative AI coding tools and agents do not work for me
One of the many ways that search got worse over time was the promotion of blog spam over actual documentation. Generally, I would rather have good API documentation or a user guide that leads me through the problem so that next time I know how to help myself. Reading through good API documentation often also educates you about the overall design and associated functionality that you may need to use later. Reading the manual for technology that you will be regularly using is generally quite profitable.

Sometimes, a function doesn't work as advertised or you need to do something tricky, you get a weird error message, etc. For those things, stackoverflow could be great if you could find someone who had a similar problem. But the tutorial level examples on most blogs might solve the immediate problem without actually improving your education.

It would be similar to someone solving your homework problems for you. Sure you finished your homework, but that wasn't really learning. From this perspective, ChatGPT isn't helping you learn.

BlackFly··on Cops want Apple, Google to kill stolen phones remotely – so why won't they?
As much as I would love thieves to lose access to stolen property, I'm not willing to give a kill switch to my property to these companies specifically and most companies in general.

Worse, in most jurisdictions that I am aware of it is perfectly possible to become the legal owner of stolen property and a company destroying that property due to theft would make them liable for the damage in those cases. In order to lawfully disable the device they would need a court order that proves that the person who currently possesses it doesn't do so lawfully... but that just means that the person who possesses it was (civilly) tried to not have lawful possession, so how did the court not order the device seized and returned? Why would you ever want to open that can of worms?

Then there are all the terrible revenge possibilities where an ex or whoever decides to report a phone as stolen. Again, either you know who has the device and can solve it civilly or you have no idea who has it and what the legal status is. The thief is criminally and civilly liable, but that might not be the person currently in possession.

BlackFly··on The truth about soft plastic recycling points at supermarkets
What fraction of all total soft plastic is collected by supermarket take back schemes compared to road side curb collection (where only 10% of municipalities "support" its recycling)?

I have a strong prior that they can achieve such high numbers only because they only capture a small amount of the total amount of soft plastic waste. If they had to deal with it all there wouldn't be enough demand to burn or recycle and it would end up buried. This is somewhat supported by the fact that by official definitions supermarket take back schemes are not counted in official recyclability numbers:

> Soft plastic collected via supermarket collection points does not satisfy this definition [of working at scale] and therefore was not counted towards WRAP’s UK Plastics Pact recyclability target.

BlackFly··on Why I no longer have an old-school cert on my HTTPS site
Java BigInteger is signed.

https://docs.oracle.com/javase/8/docs/api/java/math/BigInteg...

You deserialize with a leading 0x80 you don't get a working key. You can check the bit or you can just prepend a 0x00.

BlackFly··on Initialization in C++ is bonkers (2017)
You missed the forest for the trees. Since my claim is that

> people who care and have your interests in mind

that have valuable insights about the problems of the language and so understand constructors and destructors but don't make you susceptible to survivor bias are

>> especially people that stopped using the language.

People that don't want to learn the language in the first place offer a different kind of insight, insight into a world where constructors and destructors aren't needed.

BlackFly··on Initialization in C++ is bonkers (2017)
> Should the committee do some breaking changes to make HN commenters happier, who don’t even use the language?

As phrased, you clearly want the answer to this question to be no, but the irony there is that that is how you kill a language. This is simply survivor bias, like inspecting the bullet damage only on the fighter planes that survive. You should also be listening to people who don't want to use your language to understand why they don't want that, especially people that stopped using the language. Otherwise you risk becoming more and more irrelevant. It won't all be valuable evidence, but they are clearly the people that cannot live with the problems. When other languages listen, better alternatives arise.

BlackFly··on Initialization in C++ is bonkers (2017)
I would say the answer is to replace both with explicit init unless you explicitly say some equivalent of "Trust me, bro," to the compiler. Some structs/data (especially RAII structs backing real resources) have no sensible default or zero.

But yeah, most structs have a good zero value so a shorthand to create that can be ergonomic over forced explicitness.

BlackFly··on The Awful German Language (1880)
Is https://guidetogrammar.org/grammar/twain.htm not what you are looking for?
BlackFly··on Changes since congestion pricing started in New York
Bikes just don't take up nearly as much space as cars and don't really block each other as much: gridlock is a problem for cars but not really for bikes. In the Netherlands there are a number of famous intersections where there are no signs nor right of way rules and people on bikes and pedestrians just pass through each other by slowing down and taking turns. These intersection rules were chosen because of the high density: individuals in them can simply deal with the conditions better than formulated timeslots for right of way that waste time while changing priority. Some of these intersections also permit cars but the number of cars in such areas is generally small or limited to buses.

There is a natural limit to how far people want to bike (in a statistical sense, as the distance increases the number of people willing to bike that far drops). The highest density ends up occurring around train stations which is a focal point for foot and bicycle traffic and necessitates large bike parking lots. Those people then switch to trains although they might pick up a bike on the other side. Some people prefer bike rental for these reasons, since when you drop off your bike someone coming the other direction can take it and you can pick up another one at the end of the train ride.

BlackFly··on Flattening Rust’s learning curve
If you understand how it will work then that is just a decision to be made and a decision (although design is not necessarily easy) isn't what I would call hard: it is the ordinary work. By difficulty I mean bugs and bugginess, and bugs happen in this area because there are unintentional race conditions on the mutability. Total immutability is merely one way to force yourself to understand it, if those two clients need to observe the modifications then you have to propagate the changes manually instead of relying on shared memory semantics. But worse than that, even if you decide that they should observe the changes, then you can often end up with tearing if you are changing multiple properties non-atomically. That is a lifetime issue: the mutable reference is allowed to coexist at the same time as an immutable reference. In rust you cannot share an ordinary reference to have runtime observability like that, once shared the object becomes immutable. This forces you to use internal mutability via a RefCell and the exclusive/shared reference is enforced at runtime to eliminate tearing. Lifetimes of these borrows matter and how they matter depends on the choice of semantics, but I wouldn't call the choice the hard part.
BlackFly··on Flattening Rust’s learning curve
I would say that RAII is very explicit: Resource Acquisition Is Initialization. When you initialize the struct representing the resource you are acquiring the resource. If you have a struct representing a resource you have the resource. Knowing this, you are also acquiring a call to drop when it goes out of scope. I would argue that the difference here isn't explicitness.

Instead, I would argue that rust is favoring a form of explicitness together with correctness. You have to clean up that resource. I have seen arguments that you should be allowed to leak resources, and I am sympathetic, but if we agree on explicitness as a goal then perhaps you might understand the perspective that a leak should be explicit and not implicit in a the lack of a call a some method. Since linear types are difficult to implement auto-drops are easier if you favor easily doing the correct thing. If you want to leak your resource, stash it in some leak list or unsafe erase it. That is the thing that should be explicit: the unusual choice, not all choices and not the usual choice alone.

But yeah, the drop being implicit in the explicit initialization does lead to developers ignoring it just like a leak being implicit if you forget to call a function often leads to unintentionally buggy programs. So when a function call ends they won't realize that a large number of objects are about to get dropped.

To answer your original question, the rationale is not in one concise location but is spread throughout the various RFCs that lead to the language features.

BlackFly··on Flattening Rust’s learning curve
The truth is that by the time you are a senior developer, you will have encountered the lessons that make rust worth learning but may not have truly understood all the implications.

Many people will think, I have a garbage collected language, rust has nothing to teach me. Even in garbage collected languages, people create immutable types because the possibility of shared references with mutability makes things incredibly chaotic that they look for immutability as a sort panacea. However, once you have immutable types you quickly realize that you also need ergonomic ways of modifying those objects, the methods you create to do so are often more cumbersome than what would be permitted for a mutable object. You wish there was some way to express, "There is a time where this object is mutable and then it becomes immutable." Enter the borrow checker.

Once you are borrow checking... why are you garbage collecting? Well, expressing those timelines of mutability and existence is a cost because you need to understand the timeline and most people would rather not spend that energy--maybe mutability or the poor ergonomics of immutable objects wasn't so bad. So, I garbage collect because I do not want to understand the lifetimes of my objects. Not understanding the lifetimes of objects is what makes shared mutability hard. Immutability eliminates that problem without requiring me to understand. Rust can teach this lesson to you so that you make an informed choice.

Of course, you can also just listen to me and learn the same lesson but there is value for many people to experience it.

BlackFly··on Flattening Rust’s learning curve
That really doesn't explain the model because you have completely left out the distinction between exclusive/shared (or mutable/immutable) borrows. Rust made a large number of choices with respect to how it permits such borrows and those do not follow from this brief outline nor from intuition or common sense. For example, the no aliasing rule is motivated not by intuition or common sense but from a desire to optimize functions.

The most complicated aspect of the borrows comes about from the elision rules which will silently do the wrong thing and will work fantastically until they don't at which point the compiler error is pointing at a function complaining about a lifetime parameter of a parameter with the trait method implying that the parameter has to live too long but the real problem was a lifetime in the underlying struct or a previous broken lifetime bound. Those elision rules are again not-intuitive and don't fall out of your explanation axiomatically. They were decisions that were made to attempt to simplify the life of programmers.

BlackFly··on Modern LaTeX
I always wonder why people compare Latex with word and not with the single most popular document markup (especially here): HTML + css + javascript.

The problems are quite similar, "How do I center a div?" vs "How do I keep this float on this page?" Has latex really modernized? I don't hear a lot about new layouts or style mechanisms.

Most people are probably reading articles online these days, although there is a lot to be said about printing an article to read. It seems to me that adding responsiveness to journal articles instead of using a fixed paper layout regardless of media might be a good improvement for many readers in many situations.

← PreviousPage 4 of 22Next →