1,489 karma · joined July 27, 2016
There was also the issue of error handling, which is much easier with promises.
v2.0 addresses some of the feedback in the previous thread, and uses Promises rather than synchronous non-blocking access.
As of now there is no automatic mirroring, because nodes only store the data they request, but in the future one will use filecoin (http://filecoin.io/) to incentivize mirroring.
However, you raise an interesting point: blacklists could reasonably be put into place. I'll make a merge request to use Spintax.
Edit: whoops, apparently static_assert is in C11 as well as in C++11. Ignore this comment.
The thing is - there isn't much consistency in his syntax. The most obvious example is the indentation, that appears to be 8 spaces except for one line which is indented with 4; there isn't consistency in whether to have a space or not before semicolons, before and after parentheses, or before and after binary operators.
int CountBits (unsigned int x )
{
static unsigned int mask[] = { 0x55555555,
0x33333333,
0x0F0F0F0F,
0x00FF00FF,
0x0000FFFF
} ;
int i ;
int shift ; /* Number of positions to shift to right*/
for ( i =0, shift =1; i < 5; i ++, shift *= 2)
x = (x & mask[i ])+ ( ( x >> shift) & mask[i]);
return x;
}
as opposed to: int countBits (unsigned int x) {
static unsigned int mask[] = {
0x55555555,
0x33333333,
0x0F0F0F0F,
0x00FF00FF,
0x0000FFFF
};
int i;
int shift; // Number of positions to shift to the right
for (i = 0, shift = 1; i < 5; i++, shift *= 2)
x = (x & mask[i]) + ((x >> shift) & mask[i]);
return x;
}For instance, you have a statistical population of one hundred men and one hundred women: you collect as much data as possible about them - as many features as possible, actually - until you find something which happens to be statistically significant for your group (eg. salt consumption). Then, you publish your results, pretending that the feature you found was the original hypothesis for the study ("Our study confirms that salt consumption is higher in males.")
VSCode is used by a non-negligible number of users, and seems to rely on npm to operate at its best. It would have been good etiquette to let npm know, even though they couldn't forecast this exact situation.
* I don't think the asynchronous flow can be further simplified. If you do find a sleek solution, do submit a PR, or even an issue with some sample code.
* Stack overflow is not an issue at this time (and even less in the future, with tail call optimization in V8), except for pathological objects. As such, I didn't use lodash, to keep the library as small as possible.
* JSON.parse errors are not an issue, under the assumption that the Redis database is only written to by Rebridge itself. If you find otherwise, do submit an issue. Circular references are indeed a known limitation, documented in the README.
* Thanks, I removed it in beda881. It was probably a debug line.
For the sentinel, I haven't yet had to use it (I used it in a small Telegram bot with a single Redis server on a cheap VPS). I'll open an issue for that.
Anyway, yeah, it's just meant to be some sort of synchronous syntactic sugar on Redis.
Edit: I think you meant macros. In that case, consider that it's not as simple as that, because a) the redis library is only asynchronous, and b) such an approach requires to implement wrappers for every function that writes to the object, eg. Array.proto.splice.