Better HN
topnewbestaskshowjobs
Log inSign up

codeflo

9,664 karma · joined Jun 14, 2010 (16y ago) · 1,504 submissions

Submissions

comment 4y ago · link · parent

It’s not about area, but about actually physically placing an object in a higher dimensional object, like placing a long stick (1D) in a room (3D): the stick can be longer than the longest side of the room, but not by that much. In higher dimensions, this effect is more extreme.

comment 4y ago · link · parent

> One way to make the weirdness of the "other parts infinitely far away" concrete is to recall that, say, the Empire State Building can fit entirely inside of an n-cube with sides of 1 cm, for sufficiently large n.

That’s a striking illustration. Even the entire Earth fits into a 1 cm n-cube, but — and that’s important — only diagonally.

comment 4y ago · link · parent

There’s perhaps another way to think about this.

The unit “1” in terms of hypervolume is a n-hypercube with side length 1, so the question is really, how many of those hypercubes fit into an n-ball of a given radius.

Now, the thing I realized is that a unit hypercube in n dimensions is an unimaginably weird object. Its side length is, by definition, 1. But as n goes to infinity, the distance between the center and the corners of this unit hypercube goes to infinity — this follows directly from the Pythagorean Theorem. The center of the hyperfaces, on the other hand, is always only 0.5 distance units away from the center of the cube. An inscribed ball touches those hyperfaces, so 0.5 is also the radius of that inscribed ball. This makes the hypercube in some sense very “spiky”, with parts of the boundary close to the center (0.5) and other parts infinitely far away. Also, there are 2^n of those corners.

Indeed, and that’s just another way of stating the submission headline, most of the volume of the hypercube is near those spiky corners. Stated another way, as n goes to infinity, none of the volume of a hypercube is at a bounded distance from the center. And note that we’re still talking about a unit hypercube, so the side length in all of this always remains 1.

So, if you accept the math, the question is: Is the quoted result really something unintuitive about high-dimensional balls, which are perfectly symmetrical objects? Or is the “weirdness”, in terms of human intuition, better blamed on the hypercubes we implicitly compare them to when we talk about volume?

comment 4y ago · link · parent

It looks like several territories that were once ruled by Austria tend to vote more to the right, if I'm reading the maps correctly. Is that a coincidence, or is there anything specific about the history of the Austrian Empire that (seemingly) caused generation-spanning right-wing resentment in its populace?

comment 4y ago · link · parent

Also more commonly/colloquially called “Panzerlimousine” — armoured limousine.

comment 4y ago · link · parent

There’s something between having random ideas (easy) and implementing ideas (hard, but learnable) that I find very difficult: the ability to pick a promising idea — which includes having the confidence to stick to it. I don’t think that’s entirely captured by the word “executing”, and I think it’s also vital.

comment 4y ago · link · parent

I think if you had swapped Trump with Obama, the downvotes wouldn’t change.

comment 4y ago · link · parent

My impression is that this is an opinion about the stdlib that many programmers concerned with performance share.

comment 4y ago · link · parent

> That and understanding when big O doesn't matter for your problem size.

For example, an extra factor of log(n) is hardly ever relevant, constant factors are almost guaranteed to dominate there.

On the flip side, people are also sometimes surprised to see how quickly an n^3 algorithm becomes infeasible even for very modest data sizes.

comment 4y ago · link · parent

What you're basically suggesting is that feature development at Atlassian moves at such a glacial speed because of course they're using Jira to manage it. This kind of blows my mind right now.

comment 4y ago · link · parent

To simplify even more, both the Earth and your head would eventually collapse due to gravity if it weren't for electromagnetic forces pushing the atoms apart. I would be in free fall towards the Earth's center right now if it weren't for the atoms in my couch pushing the atoms in my butt upwards.

comment 4y ago · link · parent

But in fact that did happen. Several languages started to implement “editor neutral” code analysis and refactoring. That worked, for the most popular editor/language combinations, but not as a general solution because of N*M.

comment 4y ago · link · parent

Hmm, maybe I misunderstood the author’s point slightly, but I find what you suggest the argument was even less convincing.

Here’s the history: Every editor has a language abstraction already. And some language analyzers had an “editor abstraction”, perhaps notably Roslyn for C# with its programmable refactoring rules that worked in multiple editors.

None of that was new. But that’s still N*M if you do the math, so that graph was never completely filled — for the obvious reason that this would have been practically impossible. No mystery about it.

comment 4y ago · link · parent

This is a “correction” of a strawman only: The left diagram is exactly what would have been necessary to achieve the same result. Since that’s clearly infeasible, most of the arrows didn’t actually exist, and never would have. That was always the point. It’s precisely because the left picture is impractical that something like the LSP was necessary.

Somehow, the author misunderstood the original argument, dismissed it, independently discovered the actual argument, and now claims they’re the one who found the true reason for LSP, when in reality, it’s just the standard argument.

comment 4y ago · link · parent

Bit flips are scary even on Earth.

At a previous job, we had a customer who suddenly couldn’t send us email anymore. When their IT sent us the server logs to “prove” it’s our fault, we saw that the one letter in the cached MX record was wrong. This was puzzling, until I looked at the ASCII table to verify that the difference was exactly one bit.

We never found out where in the name resolution process the bit got flipped. The problem healed itself a few days later when the DNS cache expired, so it wasn’t worth further investigation.

That really gave me pause how often random bits are wrong in other data.

comment 4y ago · link · parent

> In my career I feel like I have seen hundreds of examples of me saying the systems equivalent of “lets put the dining table indoors?” to be told that the dining table is outside because the original budget meant the front door could only be yay wide so we had to leave the table in the yard and put a tent over it. And I’m just left standing there agape at how we eat in a cold wet tent every night instead of fixing it.

Oh wow, that hits home. To be fair, the historical context for the decision can be valuable information, the problem is the next step. Even if you can't fix it right now, you might make steps towards that. Or you might say: Now that we have this heavy table outside, why not attach more things to it?

comment 4y ago · link · parent

If I get it right, the claim is that if A is better than B at fast time controls, they tend to be less dominant at slow time controls?

If this were true statistically, I think that should be reflected in the Elo spreads: Players winning more in blitz should mean they’re able to separate farther from the middle of the rating distribution.

This doesn’t seem to happen at the very top end. Looking at the Elo range of ranks 1 to 100 to get a feeling for the distribution:

    Blitz:    2850 to 2610
    Rapid:    2847 to 2620
    Standard: 2864 to 2645
It seems if anything, the top players at slow time controls are even more dominant. Of course, top players are outliers by definition. Maybe it’s different in the middle of the rating range?

(Source: https://ratings.fide.com/top_lists.phtml)

comment 4y ago · link · parent

As I said, transportation is a red herring, trade is mostly not about that. And just so I have this straight: you dispute the claim that Marxists think trade is not beneficial, and argue that they instead think it’s an inefficiency.

comment 4y ago · link · parent

Even indentation has a meaning, usually quotation.

comment 4y ago · link · parent

> All he says is that exchange of objects of equivalent value does not create any surplus, which is true.

I know Marx says that, and it’s false. Trade can raise both utility and price. The reason is that price is highly context dependent; a shoe in a shoe shop is worth more than a shoe in a shoe factory. And it’s not the “labour of transportation” that makes it so, only part of that is location: Having a selection of products to choose from makes each individual one worth more, because you know you get to pick the one you want.

comment 4y ago · link · parent

Since all labourers necessarily are consumers, a point that Marx hits home repeatedly, the question whether labour prices are too low or consumer prices too high is irrelevant, they are mathematically equivalent.

comment 4y ago · link · parent

I'm not even sure what you're disagreeing with. I gave a direct quote, from the very article we're discussing, that Varoufakis directly attributes a price difference to "profit". You may believe that, but it contradicts all (non-Marxist) economic theory, which is the only thing I'm pointing out.

In fact, I realize most Marxists never read Das Kapital, but Marx himself is very clear that he doesn't believe trade creates value:

> Turn and twist then as we may, the fact remains unaltered. If equivalents are exchanged, no surplus-value results, and if non-equivalents are exchanged, still no surplus-value. Circulation, or the exchange of commodities, begets no value.

Source: https://www.marxists.org/archive/marx/works/1867-c1/ch05.htm

comment 4y ago · link · parent

Straight from Das Kapital:

> Turn and twist then as we may, the fact remains unaltered. If equivalents are exchanged, no surplus-value results, and if non-equivalents are exchanged, still no surplus-value. Circulation, or the exchange of commodities, begets no value.

Source: https://www.marxists.org/archive/marx/works/1867-c1/ch05.htm

comment 4y ago · link · parent

I've seen interviews with Varoufakis before, there are several on YouTube. I find him very hard two bear for two (unrelated?) reasons.

First of all, I have the impression that he's incredibly vain. Maybe that's not entirely his fault, because parts of the left in Europe celebrate him like a rock star. But when he retells the story of how he negotiated with other leaders of the EU about the Greek debt crisis, the framing is always that he was the only wise person in a room full of idiots, and they wouldn't agree to the rational course of action because they were intimidated by his superior intelligence. This is of course just my observation, and I don't have a good source ready, so I'm curious if others have the same impression.

Second, although he downplays it somewhat when asked directly, he is a full-on radical marxist. This includes the view that anytime someone makes any money anywhere whatsoever, that can only mean somebody else is being exploited. I don't know how marxists square their conviction that no trade is ever beneficial to both sides with the reality that nobody is held at gunpoint to make those trades, but here's an example quote from the interview:

> So, when a recession hits, and the central bank decides to stimulate the economy, the central bank lowers the interest rate of the overdraft it grants commercial bankers – who then exploit this to profit from arbitrage (by lending the money on to customers at a higher interest rate).

I find this incredibly disingenuous because as an economist, he knows better. Lending is a service that banks provide that many (arguably perhaps too many) people choose to make use of. And Varoufakis is fully aware of the difference between risk-free and risk-adjusted interest rates. But of course, "banks bad", that's what his audience wants to hear. I think there, he agrees with the crypto people to a much larger extend than he would admit.

TL;DR: I think Varoufakis is overrated, although I somewhat agree with him on crypto.

comment 4y ago · link · parent

I've seen beginners, especially those without a very strong maths background, struggle with the concept of syntax. The idea that you need to put the thing you want the program to do into a very specific form. That any deviation is an error, even though "it's clear" to humans. I think that's something fundamental beginners need to learn, regardless of the language they use.

But once you accept that there are rules to follow, and that they are somewhat arbitrary, languages do differ wildly in the amount and obscurity of syntactic forms you need to learn just to get started. Just count the amount of different syntactic concepts in this simple program:

    #include <stdio.h>

    int main(int argc, char **argv) {
        printf("Hello world\n");
        return 0;
    }
and compare it to the Python version.

comment 4y ago · link · parent

I know you're not the GP, but please give some specific examples of such workloads, I honestly want to know.

To be clear, yes, it's well-known that the kernel will page out rarely used stuff, but those are (almost by definition) pages that are basically never written to. The claim was that writes to swap occur all the time, to the point where they wear out the SSD, that seems to be something different.

At least I've never seen anything like that with any of my (workstation) workloads, like large C++ builds, TensorFlow experiments, or running lots of virtual machines. And that was only with 64 GiB RAM, not even the 512 GiB that the post I replied to mentioned.

comment 4y ago · link · parent

> Try putting a consumer-grade SSD into a machine with 512 GiB RAM and let the kernel swap to it -- that SSD will be dead in a year.

Are you sure? I’ve heard the argument before that swap is one of the better cases for SSD longevity, because it’s few big writes instead of many tiny ones, and found that convincing. Also, on which workloads would a machine with that much RAM touch swap at all? My workstation has “only” 64 GiB, has swap configured (to enable suspend), even during heavy use with some databases running never touches it.

comment 4y ago · link · parent

I don’t think there’s a bifurcation between “good” and “bad” people in crypto, the real world is a lot more grey, and how people behave doesn’t depend so much on their character, but on culture and incentives.

These days, we painfully observe the culture of crypto in every single online medium that isn’t very carefully moderated, for example Twitter.

And about incentives, I think it’s very hard not to become some kind of “evangelist” or “shill” when a significant fraction of your net worth is invested in a digital item whose sole value depends on enough other people also believing in the project. You need to spread the hype.

In my opinion, all of this would be fun and games if it weren’t for the massive negative externalities all of this cause in terms of environmental damage and accelerating the climate catastrophe. This is completely evident, which doesn’t stop some crypto holders from denying it with all kinds of illogical arguments. That’s understandable — see previous paragraph.

comment 4y ago · link · parent

> Separate the bits that stay the same, and inject the bits that change.

Basically, treat your build/deployment scripts like you would any other code. Strive to have a single source of truth for any fact that can change etc.

That seems obvious, but in my experience was at first counterintuitive for many people who otherwise had no trouble applying these principles in application code. A lot of modern CI/CD principles boil down to “it’s just code”.

comment 4y ago · link · parent

I don’t think we disagree, if I understand you correctly, that’s more or less what I wanted to express.
1
262728
51