BlackFly

Joined 15 years ago

Karma
2,043
Submissions
645
Member since
Aug 8
Theoretical physicist, theoretically now a software engineer
View on Hacker News

Recent submissions

Comment · 1 month ago
If you pair mutability with exclusive access then you have handled the objection raised by the (some may say overly) strict definition of subtyping here and also the attempt to argue over the objection. No code which asks for an immutable instance will ever observe the mutability because the ask for an immutable reference is exclusive. Therefore, you could pass the mutable reference but so long as something holds onto that reference the mutability is no longer available to other code.

So mutability xor aliasing provides this strict subtyping relation. Of course, you also then need ways of loosening this by providing objects without such a contract and you enter the land of interior mutability, where again the mutable methods can be understood as a part of a subtype because a holder of the reference without mutable methods was explicitly told that there was no the guarantee that the object wouldn't change.

Comment · 3 months ago
This is also how I have seen this particular thought terminating cliche used. The problem with the framing is that on the one side you have someone complaining about unrestrained slop and then this thought terminating cliche is offered. Why yes, it matters how you use it and the complaint is that users are not refining the output enough before presenting it to others.

The thought terminating issue with the phrase is that it isn't just a tool. Once you automate its use (automated PR reviews, ticket fixups, etc.), it becomes a process as well. You are almost certainly purchasing it as a service and not as a tool. It also contains elements of randomness that most tools do not. These quibbling points are what triggers the cognitive dissonance to produce the thought terminating effect. It is quibbling so you cannot really argue that point but the point is irrelevant; the second part of the cliche seems to be agreeing with the complaint about slop and yet the sentence is offered as some counterpoint. This termination prevents the actual conversation about how valuable its use is when the quality standard is not lowered.

Comment · 4 months ago
I agree completely, the features the parent is mentioning like "identity mapping, unit of work, and change tracking/events" are exactly the things I don't want out of the ORM because that is the leaky abstraction I don't want to constantly be working with and around.

If it was just a query builder we could have a conversation about the benefits of that vs sql and when one beats another. But it is all kinds of other features that are implicitly activated and then conspire to ruin your day when you were trying to solve some other problem. ORMs bring too much baggage by default. So now you have to talk about its relative merits compared to just writing SQL and the merits of always having these other features activated. Which other features? You need to read your full ORM manual because they really vary from one to another.

Comment · 4 months ago
That's not the framing:

> The private interest is genuine, [...] rational for the individual Nigerian saver

You expand upon that rationale. It is individually rational precisely because of corruption, incompetence, external sanctions and many other situations across the world.

This choice is corrosive for Nigeria regardless of whether the Nigerian government is benevolent or malevolent because American monetary policy is ignorant of what would be beneficial for Nigeria and the more people that make that choice the more the future of their society is tied to American monetary policy. It is an incompetent policy by construction. Now you have two problems: corruption, and an inability to effect monetary policy.

You might think, well if and when we solve the corruption problem we can transfer the stable coin back to effect a monetary policy... triggering the run that will drop the peg because the private entities backing the coin aren't regulated like a bank. Although comically, maybe the American taxpayer will then bail out the entity and the Nigerians will get their money!

Comment · 4 months ago
If I understand the point being made here then the idea is that a stateless session via a cryptographically verified bearer token needs a stateful revocation list to eliminate hijacking (a user logout should completely invalidate the login but a bearer token would otherwise continue to be valid) and if you are maintaining state then you can just use a complete stateful session and avoid the complexity of the cryptography.

This point is not made very clearly and is buried by overemphasising JWTs instead of just quickly pointing them out as an example of a stateless session. But yeah, it is a good point.

Comment · 4 months ago
We fear that these drugs have developmental impacts but beyond that we also forbid them in restaurants and indoor environments quite generally even for adults. So adult usage is tolerated in their own home or in the outdoor public environment (although some further restrictions apply here).

I am sympathetic to the idea that social media may also have social development impacts separate from their negative social impacts, but my experience in life is that actually people appear to socially degenerate with overexposure. Thus we probably need some regulation analogous to forbidding smoking in restaurants but for social media or limiting gambler's access. But indeed, maybe on top of that we also need bans for minors.

Comment · 4 months ago
Network effects from the other side:

If one parent forbids their child then their child becomes a pariah. If no child is able to access social media then they will all interact without it. So yeah, a parent needs their peer's children to also not use social media so that their child is not left out.

In general I'm against age based bans. I think there are alternatives where we would identify and just generally regulate the harmful features of social media. In the meanwhile, I feel empathetic towards the difficulties of parenting in this era.

Comment · 5 months ago
Have you met someone who claimed that their dog liked being slapped? When I imagine such a situation I imagine a person who is just excusing abuse because of the priors in my life, I have an easy time imagining this since I have encountered more than one such person. Impossible is probably too strong of a word, but I mean that you must interpret their behavior and interpretation is to me more a form of estimation not knowing, these examples are intended to show that non-verbal communication is still deficient when compared to a person with problems with verbal communications. Whether it is ok (ethical) to slap another individual that hasn't done anything to you is dependent on knowing their preferences and that takes communication and hence we apply our ethics based on communications.

"Insects die for carrots," is a problem for vegans who base their preference on the idea that killing any animal is wrong for sustenance. A person willing to kill a cow because they like the way the flesh tastes or finds it more nourishing simply isn't going to see a problem with an insect dying for a carrot. One person is holding themself to a higher standard and therefore is vulnerable to this critique. Animals need to die so that we may live, people quibble about where the line should be drawn but the line exists for almost everyone (excluding the Jain vegetarians, but practically speaking it exists for everyone).

I am not so much conflating those two as arguing that a) anti-specism much like freedom of speech has all kinds of caveats built in and isn't absolute even in the few people that would preach it, b) anti-specism doesn't form a basis for ethics because there are more absolute truths that override it but also render it unnecessary.

Comment · 5 months ago
Post hoc, ergo propter hoc?

> But the article doesn't consider whether restricting children's wanderings is the REASON it is so much safer for children now.

The article considers exactly that.

> Similarly, in an international study that looked at 7 to 15 year old children across 16 different countries they found that most english-speaking countries were in the lowest autonomy tier (12th- Ireland, 13th- Australia, 16th- South Africa). Americans weren’t surveyed, but countries like Finland, Germany, Norway, Sweden, Japan, and Denmark scored the highest on autonomy.

These countries are considered because they would generally be considered roughly as safe as one another (generally safer than America). These countries are the counterexample to your hypothesis: you can simultaneously have safe and independent children.

Comment · 5 months ago
We definitely apply our ethics and premise it based upon communication.

Given a stranger, all I can do is, "Do unto others as you would have them do unto you," and make assumptions about how they want to be treated. This will be generally more successful given my broader exposure to the world or if they are from the same culture as me but individual differences can be stark. After some interactions where they can make their preferences known to me I can then follow the better precept of, "Treat others how they want to be treated," assuming the actions required of me are not especially burdensome and I can find compromises with them otherwise.

I have an easier time imagining a severe autist in a consensual BDSM relationship than that I could believe that someone knows that their dog actually likes being slapped. I have an easier time believing this because an autist in abstract may have some communication problems but it is not impossible for them to make their preferences known. These are both so hypothetical though, real situations would require much context of which communication forms a basis (I am not saying we don't understand dogs at all, just that the gap is large).

There is no real anti-specism. What there is the proposition that a central nervous system is a prerequisite for consciousness and from that stems moral value (few people argue that we shouldn't enslave and consume members of the Brassica species). But even then, few of the staunchest vegans are against pesticides or anti-parasitic medication, how many animals (insects) must die to bring one carrot to my table? I don't know the answer but it will always be more than 0. Meanwhile, it is instead possible to believe that the guinea worm has as much inherent moral value as a human but that it is ethical for humans to try to eradicate the guinea worm completely.

Comment · 5 months ago
> In logic, equivocation ("calling two different things by the same name") is an informal fallacy resulting from [...] knowingly and deliberately using words in a different sense than the one the audience will understand.

Of course I mean data race, most people in such a thread will implicitly understand that is the race meant. Nobody building a webshop with limited supplies wants to prevent "first come first served", it barely makes sense to think about preventing that kind of race

Data races have obvious real world analogues, they are just so obvious people naturally synchronize. You can look over someone's shoulder while they update a paper master copy and observe data tearing as they erase a field and start writing in another value while that is inconsistent with the rest of the form. It is easy to see that data is being modified and wait until the writer is complete instead of memorizing a partial update and walking away to make decisions on the basis of the incomplete information. A good mutex/rwlock is like having a private separate room to go into to make the update so that no overeager person can even observe the partial update (some languages have non callback style mutexes so there the mutex/lock is the analogue of the visual cue that someone is performing the update). I don't find this at all strange to consider. In a concurrent system it is just all too easy to forget that there are other threads (analogue of people) reading/modifying at the same time. So rust makes that manifest through the borrow checker and it becomes obvious.

Rust prevents more than just data races. Even in single threaded code, if you have a reference to a struct (without explicitly choosing interior mutability), you are guaranteed that its value has not changed since the last time you read it, despite other parts of the code having a reference to it. You don't need to make defensive copies. Some people may find this useful, but generally it won't be enough to convince someone to drop their current language in favor of rust. This transfers into multi-threaded code as well: only a single thread can make modifications to a struct through a reference xor as many threads as you want can read from the struct with references. You can easily write go/java/python programs that have these features and so don't feature data races, but they are difficult to reason about: how do you know that there is only a single reference featuring mutation or many threads only reading? The answer requires non-local knowledge which is difficult to reason about and this is enough for some people to consider rust where the answer is local (defined by the variable).

Comment · 5 months ago
Certainly you pay a price for lifetimes but you buy compile time race condition detection via the borrow checker's aliasing-xor-mutability enforcement. So all that is happening is the complexity of concurrency is being made explicit and therefore easier to reason about. Many applications can be architected in a way that wouldn't ever trigger a race, so for people working on that it isn't something they would need to reason about and they can call it unneeded complexity. This is the simpler vs. simplistic distinction also made in the article. If you can be simplistic, garbage collection is less cognitively demanding, but if you are designing race free algorithms with shared memory then rust will be. I do believe more developers and applications live in the former.

The better example actually comes from the article: returning a struct and an iterator over that struct isn't possible in rust. Heck, initializing a struct to return an iterator might lead to issues. Most people will encounter this before needing a linked list and the lesson it teaches will help out with the linked list.

Comment · 5 months ago
We have absolutely no way of reconciling ethics with animals. In human society, the same individuals will often be using force against others but those individuals may be the police or criminals. The notion of righteousness or injustice in a given situation is contingent on context. Until we can speak with animals, we lack that context. Violence is not inherently wrong: we do not know their nature.
Comment · 5 months ago
Rarely do people get the right takeaway from this effect. Take a normal bottle of red wine and some top tier, swap them around so the ordinary is in the expensive bottle and vice versa. Serve them. People prefer the ordinary wine in the expensive bottle.

Bad takeaway: taste is meaningless.

Good takeaway: qualia depends on many contextual cues beyond the obvious.

Part of the appreciation of Monet is the fact that it was made by Monet. The art pieces 4′33″ or Black Square are early examples of this within the are world. Many pieces will have you saying, my 8 year old could have done this, so why is this piece famous? Critiques and appreciation are often not literal because we cannot properly express these subconscious effects.

Comment · 5 months ago
> When you use an LLM agent correctly you are adding value beyond just the prompt, and those three additional paragraphs won't just be extra noise.

So send me the prompt and the three extra paragraphs that you wrote. The improved LLM will generate the additional context for me if I need it. But heck, maybe I wrote that context myself or have read it many times and don't need it parroted back to me.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton