Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 3y ago · link · parent

Some percentage of children are going to die before getting a chance to have their own children.

comment 3y ago · link · parent

I see in the Netherlands church is financed by donors, which sounds better. But here in Poland we have an even worse variant than in Germany: the Church receives money from the government every year. The quantity doesn’t depend on the number of members. In fact, even though there was a huge wave of apostasies, the amount of money grows asymptotically year after year. So everyone, regardless of membership (no opt-out), has their money given to the church and the amount seems to be going in the opposite direction than membership. That’s strictly worse than in Germany.

comment 3y ago · link · parent

But when they are in the middle of a film, they often make the film twice as long, and films these days are already awfully long. They can also give you a heart attack when they are thrice as loud as the film, and often start after there was a silence in the film.

comment 3y ago · link · parent

This "acceptable quality" photo at the top in AVIF made me initially think someone took a blurry photo. I only understood what happened after switching to original and JPEG, which look much better. So this is an apples-and-oranges comparison IMO. I'd never use that AVIF version on my photography website.

comment 3y ago · link · parent

Your functional core also includes an imperative core inside it. Most of your “pure” functions modify the process page table and GC roots. Basically all the runtime is imperative. Finally some of your functions are written in something equivalent to the ST monad to have reasonable performance.

comment 3y ago · link · parent

Except in “Celtic” and “Cillian” the “c” is a k.

comment 3y ago · link · parent

Currently you can be an anonymous creator and sell your stuff in various places. You can also be a celebrity and live from a mix of Patreon and social media. The suggestion to allow free sharing of everything would remove the first model. I’d prefer the first model to stay viable. And being a celebrity also involves business skills. You’re just selling yourself instead of things.

comment 3y ago · link · parent

> There will always be piracy, but that doesn't impact the creator because people who like a work want to support the creator if they can afford to. Fear of piracy comes from insecure creators, and that insecurity comes from the lack of skill or perceived lack of skill.

That leads to a reality where creators earn money from charity based on celebrity status, instead of from a trade of goods. A reality where every creator needs to be a celebrity to make ends meet is a horrifying one.

comment 3y ago · link · parent

Because your filesystem is a storage layer. Its concern is storage, not display. It shouldn’t concern itself with how bytes are interpreted by your terminal, GUI, whatever. Those will also differ based on the particular program doing the interpreting.

comment 3y ago · link · parent

An even sadder example of it: Windows.

comment 3y ago · link · parent

Not just when you rent/move. It's nice to be able to routinely read 1k+ pages long books, holding them in a single hand without straining your wrist, being able to comfortably do it on public transport, without a table etc.

comment 3y ago · link · parent

Popper is more methodology of science, while Kuhn is more protosociology of science. Kuhn’s book doesn’t refute Popper’s, even if he would have liked it to.

I don’t know about the two others, but after reading about them briefly they seem as antirational as any philosophers subscribing to Hegel and/or Marx. When it comes to Lakatos specifically, I can say with certainty that his philosophy of mathematics has so little to do with mathematics that it’s not worth any paper (I studied maths and know many professional mathematicians personally).

comment 3y ago · link · parent

I don’t know if it’s different in the US, but here in Europe you can bring water bought after going through security. I think it’s more a means to make people buy things at the airport at inflated prices.

comment 3y ago · link · parent

Yes. Not just them. A lot of mathematics was done by Indians. But that’s not Rome.

comment 3y ago · link · parent

Using maths is not the same as inventing new maths.

comment 3y ago · link · parent

The collapse of mathematical thought that was the Middle Ages actually began with a huge slow-down in hellenistic (Roman) times, i.e. the Middle Ages was more of a continuation of a trend. I’m not convinced that Rome on its own would develop the necessary mathematics to drive progress forward.

comment 3y ago · link · parent

I can tell you that 9 times of 10 when I hit a 404 on an ecommerce website, I can’t find the product anymore through a website’s search function. Knowing this, sometimes I don’t even bother to search at this point anymore and go somewhere else. So there is at least one lost customer here in such a transition. And, observing how my less tech-literate relatives interact with websites, I suspect there are many more lost customers.

comment 3y ago · link · parent

Cars are commodities though. Your business won’t be disturbed when you change your car. There’s basically no difference from the point of view of your customers. But when you use a managed ecommerce service and you want to migrate to another provider, your old links will stop working, order histories will be lost etc.

comment 3y ago · link · parent

> Why are small businesses like that running their own servers?

Because the more managed a service, the less of a commodity it tends to be and leaves you at the mercy of the service provider wrt price changes, future availability, general quality.

comment 3y ago · link · parent

Taking up photography as a hobby made me notice and appreciate good shots and colours in films much more. So the opposite effect.

comment 3y ago · link · parent

AwesomeWM as well. It allows you to write your own tiling algorithms in Lua.

comment 3y ago · link · parent

The question should rather be: why would it protect you? This switch statement also runs on a CPU, which is still vulnerable. This CPU still speculates the execution of the switch statement. No amount of software will make hardware irrelevant.

comment 3y ago · link · parent

> Actually running zlib on every request will only make it worse.

I wouldn't be so sure, given that without zlib HTTP connections take longer, thereby increasing the size of the wait queue and the number of parallel connections.

comment 3y ago · link · parent

FWIW, enabling gzip/zstd compression in your HTTP server could help.

comment 3y ago · link · parent

My issues with std::variant in C++ boil down to it being a runtime, not compile-time construct, and surprising interactions with implicit casts, especially in the case of primitive types. After that, unlike what I described about combining union types with lexically-scoped-newtypes, std::variant doesn't let you build sum types when you need them. You're stuck only with union types.

> What is “foo”? Is it an Identifier or a StringLiteral?

Normally, it's an identifier, since there are no quotes. If there is ambiguity about it, the lexical categories you're working with are ambiguous, which is a real issue. When designing a grammar, that should be avoided. Sadly, sometimes we're given a poor-quality grammar like in C, where some tokens can be interpreted both as headers and as string literals (but neither is a subset of the other) and can't do anything about it, but then you just need to decide which category you're going to assign to ambiguous cases (either one of two, or make a third one) and later you can disambiguate based on context. In any case, I don't consider it an issue of the tool, but an essential domain problem to be solved explicitly by the programmer.

comment 3y ago · link · parent

That depends more on the producer than the store. Try buying Assassin’s Creed II or any later AC games without DRM.

comment 3y ago · link · parent

Most of my enums are sums of types that don't have any intersection. You can think e.g. of a type Token that is a sum of Identifier, Number, etc. It's annoying to keep wrapping Identifier in Token, instead of just assigning. I solve that by writing generic functions that accept anything that implements the From trait, but it's still boilerplate all the same.

There is no shifting of cost from compile time to runtime, or slowing down access. Just like with sum types you're writing match clauses from time to time, with union types you do the same. If you need to inspect the discriminant, then you need to inspect the discriminant.

comment 3y ago · link · parent

You're thinking about C unions, not union types. Union types behave more like unions in set theory. Sum types behave more like disjoint unions. In particular, if you have a union type A|B, then A is a subtype of A|B. If you have a sum type A+B, then A is not a subtype of A+B, because for A=B, A+B has two instances of A, i.e. A+A != A, so for each element you need to be able to distinguish which instance this element is from. Whereas with union types A|A = A. It doesn't mean that union types are as willy-nilly as unions in C. It just means that you can assign variables of type A to variables of type A|B without any ceremony. If you want to extract an A from A|B, you need to write a runtime check (just like match in Rust with sum types). It does mean though that you can assign a value of type B to a variable of type A+B and then extract an A, if that value was in the intersection of A and B.

comment 3y ago · link · parent

Yes. That's thanks to Hindley-Milner type inference which makes the compiler infer which None you mean. But in longer code snippets full Hindley-Milner type inference can cause hard-to-understand type errors. Here specifically the compiler infers the type of a value in your function body based on the type of the function it belongs to, which is in the opposite direction than what a programmer typically thinks in. It leads to spooky actions at a distance.

comment 3y ago · link · parent

I agree with Rich Hickey here and I think this is a flaw of sum types compared to union types. If Option<T> was a union type, T would be a subtype of Option<T> and those changes wouldn't be breaking. When writing Rust, I find myself repeatedly writing implementations of the From trait for enums, just because most of the time I actually want union types, not sum types. I think sum types should be built on top of union types by combining union types with a "lexically-scoped newtype", if that makes sense (i.e. they wouldn't be built in, they would be the result of two orthogonal features, while allowing for other combinations as well).

Edit: another nice consequence of this design would be None being its own type, which can be transparently converted to an Option<T> for any T, allowing for type inference to go in only one direction, while still avoiding the boilerplate of Option<T>::None. Unidirectional type inference would make for more intelligible compiler errors. Full Hindley-Milner can get confusing.

1
111213
55