HN user

pasteldream

39 karma
Posts0
Comments29
View on HN
No posts found.
Lenses in Julia 9 months ago

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.

Lenses in Julia 9 months ago

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.

Lenses in Julia 9 months ago

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.

Lenses in Julia 9 months ago

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.

Lenses in Julia 9 months ago

Immutability gives you persistence, which can be practically useful. It’s not just fear.

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.

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.

people are far kinder than you may think

Not everyone has this same experience of the world. People are harsh, and how much grace they give you has more to do with who you are than what you say.

That aside, the worst problem with LLM-generated text isn’t that it’s less human, it’s that (by default) it’s full of filler, including excessive repetition and contrived analogies.

Perhaps they disagree with the idea that it’s an addiction or that it’s a problem with screens in particular, rather than a problem with people not being able to or not knowing how to spend their free time in other ways.

The one thing I never understood about these warnings is how they don't run afoul of libel laws.

I’m not a lawyer, but this hasn’t ever been taken to court, has it? It might qualify as libel.

The Tonnetz 9 months ago

Why did they make it like that? I assume accordion makers were aware of the convenience of the harmonic table layout, and had good reasons for choosing something else.

The Tonnetz 9 months ago

the defects of this tuning method became evident and the more flexible “well-tempered” tuning scheme was devised. This ensures that the ratio of pitch between every two adjacent notes is precisely the same.

The author seems to have confused well-temperament and equal temperament.

It is also odd that he calls just intonation a “simplification” of Pythagorean tuning.