Recent submissions

Comment · 3 months ago
Comment · 3 months ago
Could you duplicate `RECORD_INST` before each `INSTRUCTION_N`, so that:

```

   INSTRUCTION_1:
     // subroutine 1
     ip++;
     goto *dispatch_var[*ip];

   INSTRUCTION_2:
     // subroutine 2
     ip++;
     goto *dispatch_var[*ip];
```

becomes: ```

   RECORD_INST_1:
     // record logic
   INSTRUCTION_1:
     // subroutine 1
     ip++;
     goto *dispatch_var[*ip];

   RECORD_INST_2:
     // record logic
   INSTRUCTION_2:
     // subroutine 2
     ip++;
     goto *dispatch_var[*ip];
```

This way you could directly swap `dispatch_var` with an array populated with the `RECORD_INST_*` labels, and remove one step at runtime.

Or maybe this is what you are trying to avoid to reduce the binary size ?

Comment · 3 months ago
Can't you solve it using hash trees (or Merkle trees) ?

You tag each computation nodes with a hash of its dependencies and some constant salt, that gives you an ID which identifies the results that the computation node would produce; before running it.

You can then use those IDs to index the computations results in a cache; whenever you query a computation results, as long as you update the IDs of each leaf of the computation graph, you will only re-compute the nodes that need to be updated

Comment · 4 months ago
Comment · 1 year ago
Comment · 2 years ago
I've nothing to add to the conversation, but I jump on this oportinity to tell you that i like the content you've made with Adam Barth on yt very much, have a great day :)
Comment · 2 years ago
hyperref does this with the "\ref{}" command, it can link to any defined \label
Comment · 2 years ago
I thought go binaries were purely static, aren't they ?
Comment · 2 years ago
It doesn't really make sense to compare a 350T sail boat with a super tanker, a comparable diesel boat produce 36g per ton per km(according to the same report), the "grain de sail II" aims to replace those, and the gains are huge.
Comment · 2 years ago
Comment · 2 years ago
I don't really understand how the yearly tonnage per person is relevant here
Comment · 2 years ago
How is 360$ of fuel more eco-friendly than 0$ ? I don't get your argument
Comment · 2 years ago
This is their second boat,and they already do exactly that. So far it's been quite successful
Comment · 2 years ago
Could you elaborate on why this is not a method by which carbon emissions can be significantly reduced ?

This is only the second boat of a small company, they most likely don't have the ressources to get a bigger one. At this scale, the only way to make money is to move luxury products.

IMO it's a good start.

Comment · 3 years ago
Population count is just one of many metrics when evaluating the "niceness" of a place. Maybe "destroyed" is not the best way of describing the effect of car dependency (my english is not that good) but a city that doesn't value walking sounds like hell to me.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton