Better HN
topnewbestaskshowjobs
Log inSign up

PartiallyTyped

2,940 karma · joined Oct 16, 2020 (6y ago) · 2,890 submissions

me [at] [$handle].dev

----------------------------------------------------

Submissions

comment 3y ago · link · parent

I'd be interested in more about Generic as that section went over my head though it's not an issue with your blog but rather inept knowledge on my part.

I find it quite interesting though I never had the time to study it further until now, so any recommendations are appreciated!

comment 3y ago · link · parent

I was wrong.

See this fantastic reply by the author:

https://news.ycombinator.com/reply?id=35059519

comment 3y ago · link · parent

This is fantastic, thank you very much!

When I wrote GP I had in mind branding as the "right" way to get those benefits - though I was unaware of the name - however I see that it is still limited by TS' compiler's limitations.

So then going back to the initial snippets, my issue is that the Prime type is essentially behaving like newtype, thus the inner calls can not actually rely on the value actually being prime, yes?

I have to admit that quite a few of the things in the blog are beyond my current understanding. Do you have any recommended reading for post grads with rudimentary understanding of Haskell who would like to get deeper into type systems?

comment 3y ago · link · parent

The argument of OP is that you should first construct your input such that it adheres to a very specific type that contains all the information that you require, e.g. nonEmpty, and then allow that to go through the rest of your code.

Am I mistaken?

My mistake in the above snippets is precisely that TypeScript can not make the type more specific, i.e. Number to Prime, because `type Prime=number` is only creating an alias. I am not creating a type that is a more specific version of number but an alias.

Had I actually created a proper type, the parsing would have been correct. The parsing component is happening in the outer function because at some point I need to make the generic input more specific, and then allow it to flow through the rest of the program. Am I mistaken?

comment 3y ago · link · parent

Ah, you are right, i was under the impression that the compiler made it more specific.

My bad.

comment 3y ago · link · parent

I don't think sum types is necessary. TypeScript's gradual typing should suffice to capture this.

comment 3y ago · link · parent

> I mean, what if the expectation from the data that an value is a prime number? -- How are they going to encode this in their type systems? And this is just a trivial example.

In TypeScript we can define

    type Prime = number

    function isPrime(value: number) value is Prime {
        // run sieve
    }
From here, you may have e.g.

    function foo(value: Prime, ...) {

    }
And it will be typed checked.

    function fooOrFail(v: number) {
        if (isPrime(v))
            foo(v)
        else 
            throw new TypeError()
    }

comment 3y ago · link · parent

Part of gender affirming healthcare - which also includes possibly affirming a gender congruent to their sex - is extensive therapy and investigations by psychiatrists.

People are not handed HRT like candies, nor do they undergo such surgeries on a whim.

By banning gender affirming healthcare you force kids and adults to seek HRT off the market, from possibly malicious and opportunistic actors.

It’s no different to drug policies really. The war on drugs has failed in every state and country that has attempted it, whereas the humanitarian approach taken by Portugal has shown to actually solve the issue.

If indeed there is a trend, doesn’t it make more sense to have the kids reviewed by certified and approved medical professionals and give them therapy and evaluation instead of making it harder and hoping that they don’t go to gray market?

There is an enormous amount of research done on the topic, and is definitely not new either.

comment 3y ago · link · parent

While this is quite different to the usual content, I believe that sharing this information is important for members of our community and their families in order to prepare for the possible outcomes.

The title has been edited to fit.

The complete title is:

“Florida courts could take 'emergency' custody of kids with trans parents or siblings — even if they live in another state”

1570.

Florida courts could take 'emergency' custody of kids with trans relatives(businessinsider.com ↗)

32 points · by PartiallyTyped · 3y ago · 50 comments

comment 3y ago · link · parent

All human art is the collection of human experiences at the time. It is not individual as all interactions we have that shape us as individuals arise out of our interactions with other people.

Kropotkin has something to say about the individual and the influence of others, but in short, you can not construct anything individually without resting on the shoulders of everyone that came before you.

The individual struggle is a struggle because of everyone around you, the way they behave towards you, and the way they don’t. Simultaneously if you were the last person on earth, your struggle would be the absence of everyone else.

Art is, by and large, an expression of the cumulative experiences of a person at that point in time, which come out of their interactions with everyone else. White implies black, and self implies other.

The impressionists, think Degas and Monet, went against the Salon and forged their own path, and that influenced their art. Their counter culture was by influenced by the very existence of mainstream culture.

To look the art in isolation and without context is to ignore their struggle of the individual against the broader society.

And in this view, AI art captures the cumulative experiences of all humanity, and with the right direction can show intent by an individual.

comment 3y ago · link · parent

The child must want to do martial arts or whatever other solution to appreciate it.

The parent ought to build up their child, and __telling__ and reasoning to the child why they are wrong is not the way to solve a social or emotional problem.

comment 3y ago · link · parent

This is a great response.

As a person estranged with their parents, the fact that they did not attempt to interact with me at my own terms and demanded that I meet them on their is one of the main reasons we are as we are.

comment 3y ago · link · parent

A collection of government __enforced__ libraries does not sound good to me, for obvious reasons, unless I misunderstood your idea.

comment 3y ago · link · parent

Praise the all-father

comment 3y ago · link · parent

It's actually pretty easy:

> Customer Obsession: Leaders start with the customer and work backwards. They work vigorously to earn and keep customer trust. Although leaders pay attention to competitors, they obsess over customers.

>Frugality: Accomplish more with less. Constraints breed resourcefulness, self-sufficiency, and invention. There are no extra points for growing headcount, budget size, or fixed expense.

> Deliver Results: Leaders focus on the key inputs for their business and deliver them with the right quality and in a timely fashion. Despite setbacks, they rise to the occasion and never settle.

https://amazon.jobs/content/en/our-workplace/leadership-prin...

comment 3y ago · link · parent

Correction, you had the option of wearing a mask or being vaccinated, depending on the kind of establishment. For metro masks were required. In other spaces, masks were required when moving around, but not when sitting.

comment 3y ago · link · parent

Why not gravitons? A recent post about them had very positive comments from HN.

comment 3y ago · link · parent

> The notion that regular people should restrict their lifestyles and submit to mandates indefinitely over a virus with a >99% survival rate was always stupid.

We didnt know that at the time. The statistics at the time showed a very different story.

You can compare the handling of the situation across countries and regions with similar socioeconomic conditions and observe that certain states performed significantly worse than counterparts outside.

I didn’t speak about indefinite mandates either and mentioned Denmark repeatedly, for a good reason.

In Denmark we didn’t have vaccine or mask mandates, and opened well before most countries in January of 2022 while sustaining far fewer deaths compared to say Sweden.

comment 3y ago · link · parent

Sure, fair enough I used the reported cases to deaths, for that rate which is what the world in data listed. In contrast the CDC claims that it is now a 0.6% rate.

This however, reinforces my point, even with an exaggerated deathrate we failed to properly contain the disease and take things seriously.

comment 3y ago · link · parent

> As we learned that more and more infections were effectively asymptomatic, early numbers on what was happening are hard to take at face value.

According to [1], it's 40.5% of the confirmed population. It's indeed a high rate, but those cases are also taken into consideration wrt to mortality rate as far as I am aware. It also highlights just how transmissible this virus is, allowing it to eventually infect the vulnerable population.

We also learned that covid was a component in a very large portion of excess deaths. Yes, somebody may have died of cancer, but covid was also present. It's possible that the patient sans covid would not have died.

Plus, there is the inverse, long covid and its symptoms lingering and weakening the population making it susceptible to subsequent diseases.

The problem however, in all of this, is that any trust to certain institutions in the US is now gone, which will only cause more harm.

[1] https://jamanetwork.com/journals/jamanetworkopen/fullarticle...

> In this meta-analysis of the percentage of asymptomatic SARS-CoV-2 infections among populations tested for and with confirmed COVID-19, the pooled percentage of asymptomatic infections was 0.25% among the tested population and 40.50% among the confirmed population.

comment 3y ago · link · parent

A year in, it had between 1.5 and 3.5 percent mortality rate, the first few months it was up to 15 percent in some areas and segments of the population [1]. Even today at 0.1-1 percent fatality rate [1], the odds are horrible for something so easy to contract. NB the statistic does not differentiate by vaccination status.

Yet, despite those odds, an enormous segment of the population of the US failed to all sorts of cognitive biases, and is convinced, contrary to all evidence [2], that it's better to get covid than a vaccine. This indicates to me that the US has failed as a society to respond well to such a preventable disease.

Denmark ( where I lived during Covid ) handled it much better and is a similarly capitalistic society, but with a different attitude towards institutions, and the issue was not politicized. The general population listened to the CDC-equivalent institution. The government offered free testing, (rapid+the more expensive ones), and was proactive with respect to vaccination. The government coordinated a very successful booster vaccination campaign in early January of 2022, effectively ending the covid era.

[1] https://ourworldindata.org/mortality-risk-covid

[2] https://ourworldindata.org/grapher/united-states-rates-of-co...

comment 3y ago · link · parent

I am all for reducing noise pollution. It's quite a transformative experience to move from a lower floor apt where you are bombarded with sound up to a higher floor where the only outside sound comes from birds.

comment 3y ago · link · parent

Something that has been bothering me for a while is whether poisoning of OpenAI's dataset is possible, willingly or otherwise.

An example here is getting chatGPT to accept that that 2+2=5, it's a lot of effort, but can be done. Then the users can give thumbs up when such responses are given.

Could this cause issues?

comment 3y ago · link · parent

There’s a video of a Jeep getting remote controlled in the middle of a highway, all because the audio and entertainment system was connected to the brain. Iirc wired had an article on this.

comment 3y ago · link · parent

While there have been a few public failures that were rather ... embarrassing ... and had their plug pulled off quickly, I don't think anyone can, in good conscience, claim that Meta has not been supportive of the AI/ML community, both in terms of research output and in terms of tooling [1].

[1] https://pytorch.org

1
525354
97