Better HN
topnewbestaskshowjobs
Log inSign up

cuspycode

292 karma · joined Aug 25, 2015 (11y ago) · 178 submissions

Submissions

comment 5y ago · link · parent

Agreed, the XOR trick is just a clever trick that might be useful in some esoteric niche cases, but otherwise don't bother. GCC will even optimize away the XOR operations when this is used for simple things like ints on amd64. I did a simple compile test, and with -O1 and higher I got identical machine code for the XOR algorithm and the naive swapping version. Without optimization I did get the XOR instructions, but the number of machine instructions was longer than for the naive case, and the number of CPU registers used was the same.

comment 5y ago · link · parent

And in the old days people were accustomed to be able to resolve local hostnames, without having to supply any domain part. The "search" keyword in resolv.conf is a remnant of this. By adding a final dot, you ensured that the domain part you wrote referred to the global DNS root, not any local one. Unless of course someone had changed "ndots" which controls how many dots are needed to disable the search feature.

comment 5y ago · link · parent

I've had good experiences with ngircd. It's an IRC server that is very easy to self-host, and it can be installed via APT on any debian/ubuntu/raspbian etc system, and I'm sure on many others.

comment 5y ago · link · parent

I'm not in the medical field either, but I remember they used niacin (a form of vitamin B₃) as an active placebo in the Good Friday Experiment[0] in 1962. The niacin doses produced some noticeable physiological effects, but it didn't take long before it became abundantly clear for everyone present who had gotten the psilocybin and who had gotten the niacin.

[0]. https://en.wikipedia.org/wiki/Marsh_Chapel_Experiment

comment 5y ago · link · parent

I have stopped arguing about it. I just cynically observe the people who keep insisting that they have nothing to hide, and then watch them suffer the consequences of their own decisions.

comment 5y ago · link · parent

I have the opposite experience, at least with regard to your first two paragraphs. Most of the things that I have backed up on other people's computers over the past 3-4 decades are irretrievably lost. But most of the things that I have taken care to make backups of on personal equipment over the years, are still with me.

Cloud storage is still useful of course, but I prefer to view it as a cache rather than as a dependable backup.

comment 5y ago · link · parent

I would like a more unified notation for the concept of "inverse". But I have no good suggestions for how to implement that. However, I have some bad suggestions just to illustrate what I mean:

INV(*) x, instead of 1/x

INV(+) x, instead of -x

INV(f) x, instead of f^{-1}(x)

The last one should really be (INV(°) f) x = f^{-1}(x), where ° denotes function composition as the group operator. But involving this operator in the notation would probably be overkill in most circumstances.

comment 5y ago · link · parent

I agree, it's very irritating that so many people respond to who the messenger is, rather than to what the message is. You don't really have to anonymize the author's identity in order to focus on the message rather than the messenger. You just have to let go of identity politics and any similar goofiness.

comment 6y ago · link · parent

If you do the key exchange face-to-face, all you need is some bytes from /dev/random for the key, and the cryptographic algorithm Data XOR Key. They can't outlaw the XOR operator and they can't "backdoor" all random number sources (not even the most trivial ones), so the idea that it is even remotely possible to obtain political control of encryption is quite insane.

comment 6y ago · link · parent

I look forward to the day when this is no longer the case. But we need to get better at punishing bullying behaviour to make this happen.

comment 6y ago · link · parent

OK, I think I get it now. So comment macros saved from an earlier REPL session can be brought back for use later? That's pretty cool, and it does highlight the LISP roots of Clojure.

comment 6y ago · link · parent

What does "save point" mean in this context? The concept is mentioned several times in the article, but I didn't see any references to saving anything.

comment 6y ago · link · parent

You don't have to invoke color-blindness or tetrachromacy to explain that. Even normal trichromatic people will have differences of opinion about shades of blue or green. But every difference of opinion that might involve gender will always be exaggerated.

comment 6y ago · link · parent

Terminology is not always unambiguous. The spin quantum number is discrete for electrons {-1/2,1/2}, but spin also means the physical entity that gives rise to the so-called intrinsic angular momentum, which is a vector.

comment 6y ago · link · parent

GDPR does not require any banners or consent dialogs at all for cookies that are necessary for authentication, navigation, or keeping track of shopping cart contents in the current session, etc.

It's only the unnecessary tracking that needs explicit consent. So it's a good thing if such sites are slow to load and have to present irritating banners for legal reasons. This will hopefully put them at a competitive disadvantage compared to sites that don't insist on tracking their customers.

comment 6y ago · link · parent

I too have had great experiences from doing recursive descent. I don't understand why so many people don't like it. The techniques for handling left- and right associativity of infix operators have been well known since many decades, so I am surprised that the original article thinks it is still an issue. But I have met some people who felt uncomfortable by recursive descent parsers that were implemented via recursive procedure calls, just because they didn't quite understand recursive procedure calls in the first place. So maybe that's part of the reason.

comment 6y ago · link · parent

The IMSAI 8080 was considered a clone of the Altair at the time.

comment 6y ago · link · parent

"Measure twice, cut once."

comment 6y ago · link · parent

I am reminded of the "Pokémon Shock"[0] incident in 1997 that triggered epileptic seizures in a number of viewers, resulting in 685 people requiring medical attention.

[0] https://en.wikipedia.org/wiki/Denn%C5%8D_Senshi_Porygon

comment 6y ago · link · parent

It's even worse. Putin's failed attack on Skripal ultimately resulted in the murder of Dawn Sturgess[0] four months later. This was a case of using illegal chemical weapons on foreign soil, which puts Russia squarely in the same category of rogue nations as North Korea.

[0] https://en.wikipedia.org/wiki/2018_Amesbury_poisonings

comment 6y ago · link · parent

Yes. I just discovered that I have done it by mistake, twice during the past six years. I'll blame glitches on the trackpad on my previous laptop. I wasn't even aware of the feature.

comment 6y ago · link · parent

Do you have any practical suggestions for how to accomplish that?

I'm not rich, but I'm thinking that anything a billionaire can do with $1 billion can also be done by ten thousand households who have $100k each. So the middle class could perhaps get richer if they only knew the secret?

comment 6y ago · link · parent

There are however google search results for "Happy people don't need to tell themselves they are happy, they just are". So maybe it transformed telling into asking, on a grammatical level?

comment 6y ago · link · parent

I am very likely naive in these circumstances, but I honestly don't understand how cancel culture can work at all. So there are some voices on twitter who loudly express their immature mob mentality. Why don't all the sane people just block them and ignore them, and then go on with their lives as if nothing happened?

comment 6y ago · link · parent

> No, I’m pretty sure it’s just rest mass. The gravitational force doesn’t change based on your kinetic energy.

The energy-momentum tensor (a.k.a. stress-energy tensor) is what determines spacetime curvature, and it depends on both rest mass, kinetic energy, momentum, pressure, and shear stress.

comment 6y ago · link · parent

I didn't know anything about the topic before I clicked the link. Nothing in the comment that introduced the link revealed anything about the topic. And I only clicked the link because I was intrigued by the discussion here about rudeness. I was not motivated to click by the suggestion that watching would be worth my time (without any further details). That I found the topic interesting-sounding came after I swallowed the bait and clicked. Such things happen sometimes. And I still don't know if it actually is interesting, I won't actually know until I have set aside 3 hours to watch the video.

comment 6y ago · link · parent

I didn't find it rude at all. The comment that presented the link was pure click-bait. I prefer it when a brief explanation accompanies a link, especially when the link points to a 3 hour long video, as in this case. The YouTube teaser says "explores the workings of the human mind, intelligence, consciousness, life on Earth, and the possibly-simulated fabric of our universe". I certainly agree that the topic sounds interesting.

comment 6y ago · link · parent

Infinite sets are a useful abstraction, but uncountable infinities can probably be avoided since the Löwenheim-Skolem[0] theorem says that any countable first-order theory has a countable model.

[0] https://en.wikipedia.org/wiki/Löwenheim-Skolem_theorem

comment 6y ago · link · parent

No blockers, just using the built-in privacy/incognito modes.

comment 6y ago · link · parent

I got the same CAPTCHA, running Firefox 68.4.1 on Linux. Normally when this kind of thing happens, I just close the tab and move on with my life. But this time I tried opening with Chromium instead (version 76.0.3809.100) and then no CAPTCHA was required. Neither browser has Privacy Pass, so why are they treated differently?
123456