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

That’s how you can create a gapless ring buffer: <https://learn.microsoft.com/en-us/windows/win32/api/memoryap...> (see scenario 1 in examples).

comment 3y ago · link · parent

That’s a bummer. Most of the technical books I bought on Amazon were supplied by Book Depository. Are they going to just disappear now?

comment 3y ago · link · parent

The reason why originally software was free is that there were no software companies, only hardware companies shipping software with their hardware. It’s good to think whether you’d have a job in that world.

comment 3y ago · link · parent

„What do I need to learn to understand you?”

comment 3y ago · link · parent

Not given back to the original authors, but given to the users.

comment 3y ago · link · parent

Yeah, I got that. Just wanted to expand on the weirdness of what "spicy ketchup" seems to mean in practice.

Fair warning: "Kotlin Extra Hot", although a bit spicy, still doesn't hold a candle to what Indian cuisine can offer (or Japanese — e.g. wasabi).

comment 3y ago · link · parent

In my experience, "spicy ketchup" is almost never spicy, even in the least. What distinguishes it from other ketchups is that it's less sweet (but still very sweet). The only actually spicy ketchup I found is "Kotlin Extra Hot", but I'm not sure if it's a thing outside of Poland.

comment 3y ago · link · parent

OMG: <https://codeberg.org/ngn/k/src/branch/master/a.c>

My maths notebook from high school looked like that. I'm having flashbacks. (At least in text files you can't cram 4 lines of text into 1.)

comment 3y ago · link · parent

So... noone should exercise this freedom, because doing it is selfish? Then what are you paying forward for? Freedom noone should ever exercise? It feels like a prison with transparent bars.

comment 3y ago · link · parent

Garbage collectors, type systems, modules, polymorphic functions are not syntactic sugar. Asm also isn’t syntactic sugar, if only for the polymorphism (how many different CPU instructions are MOV in Asm again?); or just the fact that it’s text and machine code is binary code, while desugaring code doesn’t change its language.

comment 3y ago · link · parent

I’m often called an artist by people who know me IRL, which annoys me for a bunch of reasons. One is that I don’t see myself this way. I just sometimes do stuff that is art-adjacent. Another is that making it a noun instead of a verb reduces me entirely to that one side of me and also suggests that it is something very stable, something that I’m going to be for the rest of my life, because well this is who I am after all. “I shoot photos”/“I make films”/“I write poetry”/“I write software” has a very different shade than “I’m a photographer”/“I’m a film maker“/“I’m a poet”/“I’m a software developer”. The latter feels very reductive.

comment 3y ago · link · parent

They are part of the language, because they require generics to be implemented if you want to implement them in the standard library. Go didn’t use to have generics, so those constructs were hacked into the core language.

comment 3y ago · link · parent

Yes, but if you demand that everyone pays proportionally to the benefit they get, then the threat of moving capital to another country has an outsize influence on politics within the country. So the rich get even more say about how taxes are spent than they normally do, by literally voting with their wallets. And thus state’s spending is optimised to protect the interests of the rich with little regard for the poor.

comment 3y ago · link · parent

Those are enforced by courts and police. So you may end up with well-funded police and courts, but defunded public health services, public education and social benefits.

comment 3y ago · link · parent

Yeah, but they don’t benefit from public health services, since they can pay for a private insurance with a higher quality of services. They don’t benefit from social benefits, since they have much more efficient ways of making money. They don’t benefit from public schools personally, since they can send their children to private schools. So if I were to go with the reasoning that people should pay for received services proportionally to the benefit they get from them, I don’t think we’d end up with a system where the rich support the poor better. That’s all because the needs of the poor are very different from the needs of the rich.

comment 3y ago · link · parent

No? Government is the people currently elected. Nothing to do with courts. And law was decided by previous governments. Giving money to the current/future government to create new law which you like is called lobbying, or bribing (whatever floats your boat).

comment 3y ago · link · parent

That’s settled by law, not by the actions of the current government. If you want to pin down the source of how the wealthy can retain their wealth, that would be the courts and broader law enforcement. So going this way the wealthy would contribute more to the justice system, while they wouldn’t pay as much for public education, health services, and social welfare? Doesn’t seem like something anyone would want.

comment 3y ago · link · parent

People can’t pay in cash due to other people paying with debt, which artificially inflates prices.

comment 3y ago · link · parent

> Clearly wealthier people are getting more benefit.

No. Their wealth doesn’t come from government provided services.

comment 3y ago · link · parent

That's unfortunate. My muscle memory sometimes makes me open DevTools even unintentionally when I try to copy text and press Ctrl+Shift+C.

comment 3y ago · link · parent

Just as there is the law of conservation of energy, there is also the law of conservation of momentum. Both explain it equally well IMO.

comment 3y ago · link · parent

On Ars? I can’t see it anywhere.

comment 3y ago · link · parent

I heard it just a couple years ago, when I used a 2G phone. 3G and 4G don’t have that fault.

comment 3y ago · link · parent

> List<T> is the collection type that most obviously requires no indirection.

Collections in Java as of now (before project Valhalla) are actually collections of pointers to objects, so at least one level of indirection. Another level of indirection is List itself, which is an interface, so the compiler can’t ahead of time devirtualise method calls, only after JIT detects which List implementation it’s dealing with at runtime.

comment 3y ago · link · parent

In Polish em dash is supposed to be surrounded with spaces. I got that rule ingrained in my subconscious so heavily that I feel very uneasy looking at em dashes without spaces even in English. Same way if someone didn’t put a space after a full stop. So I’ve decided to go the British way and use en dash surrounded with spaces. And, after doing that, em dash really feels way too long. :)

comment 3y ago · link · parent

The latter doesn't make for as exciting a story.

comment 3y ago · link · parent

I liked Star Trek TOS (but not the films), mainly for the character development of Spock, and how interpersonal conflicts were handled. Also for the showing of people who strove to be the best of themselves, working on their self-control and discipline. It was and still is hugely inspirational for the development of my own character.

I think that "Balance of Terror" is one of the best episodes of any TV show ever aired.

However, each time I see time travel/parallel universes/dimensions/etc. in films, I cringe, knowing that it inevitably will be inconsistent, only to be used as a plot device by writers who can't write. I avoid watching anything featuring those concepts these days, and I wish none of it was ever done in Star Trek.

I enjoy Greg Egan books. It's the first time I'm hearing of Hannu Rajaniemi. I'm going to check his books out. Thanks.

comment 3y ago · link · parent

For a post-scarcity economy, they were sure running out of dilithium pretty frequently.

comment 3y ago · link · parent

Instagram photos of faces already don’t look right. They are horribly smoothed out and glowing. And people seem to like it.
1
161718
55