HNHacker News
TopNewBestAskShowJobs

jasonhansel

9,140 karma · joined February 2, 2015

Website: https://jasonhansel.com
submissionscomments
jasonhansel··on Type-checked keypaths in Rust
IMHO the issue is that lenses are too powerful. For this reason, they are liable to be used in overly clever ways that reduce readability and increase complexity. Things like keypaths are useful because they are (intentionally) more restricted than lenses, and are thus less likely to be misused.
jasonhansel··on One centimeter long bacterium discovered
Not the only unicellular organism visible to the naked eye. For example: https://en.wikipedia.org/wiki/Valonia_ventricosa
jasonhansel··on Ask HN: Should I be specializing in either front end or back end as full-stack?
Define "beneficial for your career." Do you mean maximizing earning potential? Working on interesting tasks? Having a wide pool of job opportunities available?
jasonhansel··on The brain has a ‘low-power mode’ that blunts our senses
1. By your logic, is type 2 diabetes also not an illness, since it's caused by excess sugar consumption?

2. Why is it wrong to solve problems the easy way? Why should people have to follow the "difficult" path of dieting if an easier method exists? That's not being lazy, it's being smart by avoiding unnecessary effort.

3. Many diets also have side effects (e.g. hunger, fatigue). But regardless, if people would rather experience side effects from medication than go through the difficult experience of dieting, why is that wrong?

jasonhansel··on Mobile-First CSS: Is It Time for a Rethink?
Also: mobile generally requires an interface that is touch-friendly, with e.g. larger buttons.
jasonhansel··on The brain has a ‘low-power mode’ that blunts our senses
+1. People seem to think that, since they had to suffer through diet and exercise to lose weight, everyone else should have to suffer equally; for some reason people think it's "unfair" to lose weight through e.g. medications. This makes no sense, and it isn't consistent with how we treat any other illness.
jasonhansel··on The brain has a ‘low-power mode’ that blunts our senses
There's also semaglutide, which was recently approved for weight loss. It's quite safe and reasonably effective, though using it currently requires a once-weekly injection and your insurance may not cover it.

(Rybelsus is a version of semaglutide available in tablet form, but it hasn't officially been approved for obesity yet.)

jasonhansel··on Pfizer's primary mRNA injections “temporarily” impair semen concentration
Why the scare quotes around "temporarily" in the HN title? The study shows that the change was transient, and its title does not include quotation marks. Putting scare quotes around the word "temporarily" is both unjustified and misleading.
jasonhansel··on Polar bears that can survive without sea ice
Yes, the latter is correct given the unique grammatical conventions of newspaper headlines. These sorts of headlines are called "crash blossoms": https://www.nytimes.com/2010/01/31/magazine/31FOB-onlanguage...
jasonhansel··on Ante: A low-level functional language
This is cool! I really like the syntax for algebraic effects, which would be great for mocking. I also like the way that "impls" can be passed either explicitly or implicitly; the lack of global coherence seems like a reasonable tradeoff. Have you thought about using existential types to support dynamic dispatch (like Rust's "trait objects")?

That said, I'm a bit skeptical of the utility of refinement types (and dependent types in general). They greatly increase a language's complexity (by obscuring the type/value distinction and making type inference and checking more complicated). I'm not sure the benefits are worth it, particularly because of the so-called "specification problem."

jasonhansel··on Data Race Patterns in Go
I actually think the Java ecosystem is part of why people dislike it. Java seems to attract a lot of extremely heavyweight frameworks (like Spring) that are too complex to fully understand and too heavyweight to make sense for most projects.
jasonhansel··on Data Race Patterns in Go
I think the root cause of a lot of these data races is that Go has no way of marking variables/fields/pointers/etc. as immutable or constant. This makes it easy to lose track of shared mutable state.

It's not just data races--it's also logical races, which are near-impossible to detect or prevent without something like transactional memory.

jasonhansel··on If OpenSSL were a GUI
Honestly: this is what I dislike about OpenSSL. There are so many different knobs you can turn that I'm not sure how to use it securely, or whether specific options increase or decrease security. Its documentation seems to assume a lot of background knowledge about cryptography and the technologies involved, making it particularly tricky to get things right or figure out how to perform even simple workflows safely.
jasonhansel··on I cheated on my Microsoft interview (2019)
> Companies ask interview[ees] to not reveal the questions they had to other candidates.

I'm not condoning the author's actions, but I don't think any company has explicitly told me that. (I assume by "interviewers" you meant "interviewees.")

jasonhansel··on Neon – Serverless Postgres
Does this handle sharding? Or is it like ordinary Postgres, which only performs replication?
jasonhansel··on Mental illness, mass shootings, and the politics of American firearms (2015)
They're evil, vicious, and morally reprehensible. They're not (in general) mentally ill.
jasonhansel··on Mental illness, mass shootings, and the politics of American firearms (2015)
"Being a violent criminal" is not a mental disorder; most people who commit acts of violence do not have any diagnosable mental health issues.

Only a small minority (3-5%) of acts of violence are attributable to mental illness: https://www.vox.com/platform/amp/2015/10/1/18000532/gun-viol...

edit: Even most mass shooters are not mentally ill: https://www.washingtonpost.com/local/most-mass-shooters-aren...

jasonhansel··on Mental illness, mass shootings, and the politics of American firearms (2015)
For context: Texas Gov. Greg Abbott recently attributed all gun crime to mental illness, saying at a press conference that "anybody who shoots somebody else has a mental health problem, period."
jasonhansel··on Expert systems and the legal world
Indeed. What I'm suggesting just amounts to taking that approach to its limits, by putting the "definitions" into a separate document and having the contract contain conditionals that depend on that document.
jasonhansel··on Expert systems and the legal world
IANAL also, but: IIRC contracts typically have an "integration clause" that specifies that the contract constitutes the entirety of the agreement between the two parties. Couldn't the integration clause instead specify that the contract, as combined with the additional document into a single whole, constitute the agreement? See: https://en.wikipedia.org/wiki/Integration_clause
jasonhansel··on Expert systems and the legal world
Instead of using templates to generate a contract based on questionnaire answers, my idea is to use a single unaltered contract that refers to the questionnaire answers provided as a separate document.

One could even imagine those "universal contracts" being open-source, if you could find a business model.

jasonhansel··on Expert systems and the legal world
Here's a question: instead of using expert systems to write a contract, could you just write a contract that refers to a form that can be filled out by someone without legal expertise?

For instance, instead of using an expert system to generate a contract that says "Alice will pay Bob $2000 a month in rent, plus utilities," you could write a contract that says "The party listed on line 1 of the attached form will pay the party listed on line 2 of the form the amount listed on line 3 of the form; if the checkbox on line 4 of the form is checked, then the first party will also pay for utilities."

Then the attached form could look something like this:

1. Name of tenant: _______

2. Name of landlord: ______

3. Amount of rent: $_____

4. [ ] Check here if tenant pays for utilities

That solution would seem to be much more efficient and transparent than using an expert system; essentially, the "templating" is being done by the judges and/or lawyers reading the contract, not by an expert system writing one.

Edit: of course any such contract might contain a lot of "conditional logic" that would only apply in very specific circumstances and thus would prove irrelevant for most users. But although the contract would be long, you'd only need to write it once, and there would only be one copy to maintain.

jasonhansel··on Twitter CEO fires two top executives, freezes hiring
Yeah, it sends a pretty clear message discouraging other execs and high-level employees from taking parental leave.
jasonhansel··on Shaving is an example of how consumer products extract more money
Isn't mineral oil now considered carcinogenic?
jasonhansel··on GraphQL Is a Trap?
> Prefer building a GraphQL schema that describes how clients use the data, rather than mirroring the legacy database schema.

The problem is that almost nobody actually does this, and many GraphQL libraries and tools actively discourage it.

jasonhansel··on How many radioactive bananas would you need to power a house?
It's worth noting that the idea that bananas are uniquely or unusually high in potassium is itself a myth. Many other fruits and vegetables are much higher: a cup of spinach, for instance, has about twice as much potassium as a banana, and a baked potato has even more.
jasonhansel··on How to Walk (12 miles a day)
In my experience, when you go on very long (10-20mi) walks in hot weather, you need a backpack even more, since you have to carry around large amounts of water (either in water bottles or in one of those hydration pack things).

Biking is different, of course--you're not outside for as long (at least for a given number of miles), and you can store your water bottles on the bike itself.

jasonhansel··on What was wrong with SML?
The point AFAICT isn't that the type checker sees "bool -> bool" as an instance of "a -> a". Instead, the issue is that during type inference, when the compiler sees "m := not", it will infer that a == bool, i.e. that "m = ref (fn x ⇒ x)" was really "m = ref (fn (x:bool) ⇒ x)".

But then it will forget that inference when type checking "print ((!m) 23)"; there it will infer that a == int, and that the original definition of m was really "m = ref (fn (x:int) ⇒ x)".

Essentially the issue is that type inference forgets that it already solved for "a" and can't assign it to both "int" and "bool".

jasonhansel··on Limb lengthening surgery is becoming more popular
If your bones get unusually hot, they may be mining Bitcoin for North Korea.
jasonhansel··on Limb lengthening surgery is becoming more popular
It's pretty telling that the surgeon they mention advertises on the same social networks that cause the underlying body image issues. Clearly he knows that the people using these apps regularly will make up a disproportionate share of his clientele.
← PreviousPage 14 of 34Next →