HNHacker News
TopNewBestAskShowJobs

kbr-

180 karma · joined June 23, 2020

submissionscomments
kbr-··on Take Advantage of Git Rebase
What you say is impossible, we pretty successfully apply at ScyllaDB (see https://github.com/scylladb/scylladb/commits/master).

I'm not sure 100% of the commits compile & pass all tests - there may be some mistakes - but generally we're in a pretty good state, and the clean git log is being successfully used for bisecting.

If you want even larger scale - if I understand correctly, the Linux kernel practices a similar thing, which is where we got this practice from (ScyllaDB founders came from kernel development). And since Git was originally created to help developing Linux - that's where you want to look for good practices.

kbr-··on Learn how to unleash the full potential of the type system of TypeScript
Is there any place I could report issues or ask questions about the course other than Twitter?

If the author is reading this, the proposed solution to the `merge` challenge is:

  function merge<A, B>(a: A, b: B): A & B {
    return { ...a, ...b };
  }
That's the "obvious" solution, but it means that the following type-checks:

  const a: number = 1;
  const b: number = 2;
  const c: number = merge(a, b);
That's not good. It shouldn't type check because the following:

  const d: number = { ...a, ...b };
does not type check.

And I don't know how to express the correct solution (i.e. where we actually assert that A and B are object types).

Also, looking forward to further chapters.

kbr-··on What is quantum field theory and why is it incomplete?
I guess the (crazy, I know) assumption that I made is that I have some analytical, symbolic expression for a function that describes the state of the universe at every point. This "state" describes some fundamental quantity (not necessarily a quantity we have a name for yet).

Then we express the value of any particle field at every point as a (potentially very complex) symbolic expression that only uses the state function from my previous paragraph.

All of these expressions need only finite memory to store. They describe functions with domain R^n to some co-domain of operators or whatever.

Then I can calculate the value of this complex function at any point with any precision I like, with finite memory, although unbounded - I need to allocate more memory when I want more precision.

Point is, I delay the process of "latticization" (calculating the numerical values at each point of a chosen lattice) to the very end - only then I have to choose how fine-grained my lattice is.

kbr-··on What is quantum field theory and why is it incomplete?
> The point is that it can’t be simulated on any lattice of any density. It doesn’t matter how fine the lattice is compared to the sensitivity of the measurement.

It feels like you want to do sth like: first discretize (choose a lattice), then simulate (do calculations on this lattice).

I want to do the opposite: first simulate (do calculations on a continuous domain), then discretize (restrict my results to a lattice).

> For your case you showed, it would be like if x^2 simply didn’t exist on a lattice, and couldn’t be calculated by a computer no matter how much memory you threw at the problem.

So the functions we're talking about do exist on continuous domains - but they don't have a corresponding definition on a lattice?

Couldn't we embed a lattice in the continuous domain, then restrict the function along the embedding, thus getting a definition on a lattice?

Unless it's not possible to embed the lattice in a continuous domain - then my reasoning breaks.

(note: I know nothing about physics, I'm a programmer with math education, talk to me like I'm an idiot)

kbr-··on What is quantum field theory and why is it incomplete?
> The theorem is called the Nielsen-Ninomiya theorem. Among the class of quantum field theories that you cannot discretize is the one that describes our universe, the Standard Model.
kbr-··on What is quantum field theory and why is it incomplete?
> There is a mathematical theorem that forbids you from writing down a discrete version of certain quantum field theories.

> (...)

> You know, if you take this theorem at face value, it’s telling us we’re not living in the Matrix. The way you simulate anything on a computer is by first discretizing it and then simulating. And yet there’s a fundamental obstacle seemingly to discretizing the laws of physics as we know it. So we can’t simulate the laws of physics, but it means no one else can either. So if you really buy this theorem, then we’re not living in the Matrix.

I don't buy this reasoning.

I can encode the continuous function f(x) = x^2 on a computer. Then I can calculate this function for any number up to any digit, if I allocate enough memory.

I don't need to allocate a discrete domain up-front and then stick to it at all times. I can increase and decrease the accuracy as needed.

In a similar fashion I could simulate a continuous universe encoded with continuous operators. I could simulate it on a discrete lattice with certain precision as long as nobody inside the simulation builds equipment that can measure things "in-between" the lattice points. And when somebody does, at that moment, I can simply pause the simulation, calculate the values of my operators using a locally-denser lattice, then unpause. The observer with their equipment wouldn't notice anything because the simulation was paused, they would just get the correct measurement.

kbr-··on Strict-serializability, but at what cost, for what purpose?
Ok. From skimming through the paper, it seems that for a given transaction, only the replica sets of the shards touched by this transaction need to participate. Thus for two transactions touching disjoint sets of shards, they can run completely in parallel. Hence the scalability. Is that right?
kbr-··on Strict-serializability, but at what cost, for what purpose?
What do you mean by "scalable without restriction"?

I understand scalability by being able to handle more traffic through adding more nodes to your cluster. But if you want to handle more traffic, adding more replicas to a single Accord replica set won't help. Any two (fast path) quorums must intersect. And that intersection point for two queries is where you need to spend resources to handle both queries.

So - unless I'm missing something here - in order to scale out to be able to handle more traffic, you must shard the data, there's no way around it. Even assuming 0 failures won't help.

And once you shard your data and use multiple Paxos/Raft/EPaxos/Accord/whatever groups, you lose strict serializability across the shards.

kbr-··on Writing my PhD using groff
Ahh the procrastination when writing a PhD.

Instead of actually writing it, you research a million different ways how to render it, and then you write a blog post on it :)

kbr-··on Crimes against transhumanity
I'm scared of a future in which uploading minds into computers and precisely simulating them becomes possible.

The concept of "the right to life" has been widely discussed.

I think there's an important right that all of us should also have - the right to die. If I want to stop living, I should be able to stop living. Nobody should be able to force me to continue living (and possibly suffering).

When we're able to copy someone's mind exactly and save it in a computer, and then replicate it endlessly, we take away that person's right to die. We enter the dark world shown in some episodes of Black Mirror (e.g. White Christmas or Black Museum) - where any person can hold a mini computer with a copy of someone else's mind where that someone is being constantly tortured. They can't even die. They are forced to suffer.

This possibility terrifies me to the point where I would consider killing myself (in a way that irrecoverably destroys my brain) just to prevent my mind from being copied.

← PreviousPage 2 of 2