HackerLangs
トップ新着トレンドコメント過去質問紹介求人

pasteldream

no profile record

コメント

pasteldream
·8 か月前·議論
I’m not sure why witx’s comment was downvoted. This is absolutely the standard usage in math and computer science.
pasteldream
·8 か月前·議論
Yes. I’m not sure how slow it is in Julia, but pure functional languages do tend to generate more garbage for this reason. Hopefully the compiler can optimize it away in simple cases.

Edit: It’s not deepcopying the whole struct, just the parts that need to point to something new. So if you update a.b.c, it will shallow-copy a and a.b, but nothing else.
pasteldream
·8 か月前·議論
I think we’re talking past each other.

Lenses serve many purposes. All I’m saying is that in practice, the most common role they fulfil is to act as a counterpart for mutable references in contexts where you want or need immutability.

Can the use of lenses make a program more “composable”? Maybe, but if you have an example of a program taking advantage of that flexibility I’d like to see it.
pasteldream
·8 か月前·議論
Yeah, but I’m saying that in 90% of the cases where a functional program would use lenses, the corresponding imperative program would just use references.
pasteldream
·8 か月前·議論
> Your natural choice in the "OOP style" is to write a lot of boiler plate to point to each different field you want to get/set.

Your natural alternative to lenses in imperative languages is usually to just store a reference or pointer to the part you want to modify. Like a lens, but in-place.
pasteldream
·8 か月前·議論
Immutability gives you persistence, which can be practically useful. It’s not just fear.
pasteldream
·8 か月前·議論
Yeah, sorry, I realized after I commented.
pasteldream
·8 か月前·議論
But what’s the benefit of this approach? It seems needlessly expensive, both in terms of computational overhead (walking up and down the state tree) and how much more code it requires.

I guess you gain persistence of your entire app’s state (which makes time travel debugging easier) but that’s all I can think of.
pasteldream
·8 か月前·議論
You know, I do not actually know that a website had ads before clicking on a link to it; I would be happy to only visit websites without ads.

It’s scummy to shove ads in my face without at least warning me and giving me a chance to leave, I think.
pasteldream
·8 か月前·議論
Imagine asking the browser on my hardware to do things I don’t want it to do, and acting shocked when I tell it not to.
pasteldream
·9 か月前·議論
Can you point me to one of these reviews of case reports? As it is, your reply is too vague to be helpful.
pasteldream
·9 か月前·議論
How much do advertisers pay per customer, and where can I find this analysis?
pasteldream
·9 か月前·議論
It’s not a completely arbitrary framing. It’s a consequence of other beliefs (ethical beliefs, beliefs about what you can or should tolerate, etc.), which are ultimately arbitrary, but it is not in and of itself arbitrary.
pasteldream
·9 か月前·議論
But naturally, won’t there be people who can’t get to a point where life is okay? Isn’t it deeply unethical to force them to live?
pasteldream
·9 か月前·議論
Yes.
pasteldream
·9 か月前·議論
I’m sorry Lifeline did that to you.

I believe that if society actually wants people to open up about their problems and seek help, it can’t pull this sort of shit on them.
pasteldream
·9 か月前·議論
If you accept that “the world and life aren’t particularly pleasant things”, why do you want to prevent suicide?
pasteldream
·9 か月前·議論
> The reason is that they can enable people to take action on their suicidal feelings, before their suicidal feelings are fixed by the treatment.

I see that explanation for the increased suicide risk caused by antidepressants a lot, but what’s the evidence for it?

It doesn’t necessarily have to be a study, just a reason why people believe it.
pasteldream
·9 か月前·議論
Agreed - blue noise dithering is very commonly used in computer graphics because it’s cheap and great, but it might be worth mentioning that it’s a kind of ordered dithering, which is mentioned in the article.

Christoph Peters’s free blue noise textures are the most commonly used, for people who can’t be bothered running void and cluster themselves: https://momentsingraphics.de/BlueNoise.html
pasteldream
·9 か月前·議論
Sometimes repetition serves a purpose, and sometimes it doesn’t.