Your proposed solution is to have the user manually implement a hash table, but if you have a good optimizer, users can focus on writing clear code without bugs or logic errors and let the machine turn that into efficient code.
262 karma · joined October 1, 2014
Your proposed solution is to have the user manually implement a hash table, but if you have a good optimizer, users can focus on writing clear code without bugs or logic errors and let the machine turn that into efficient code.
typedef void* var;
struct Header {
var type;
};
// ...
#define alloc_stack(T) header_init( \
(char[sizeof(struct Header) + sizeof(struct T)]){0}, T)
var header_init(var head, var type) {
struct Header* self = head;
self->type = type;
return ((char*)self) + sizeof(struct Header);
}
The section "struct Header* self = head" is UB.
The alignement requirement of the local char array is 1 but the alignment
requirement of struct Header is that of void* which is probably 8.The undefined behavior is always when the null reference is created. The issue will _usually_ manifest when you try to dereference the pointer, but the undefined behavior was creating the null reference in the first place.
Do you not believe that a CEO could have at least 20 times the impact on the value of a company than the average employee, and if so, should they not be compensated accordingly?
Do you actually know this is true? Have you tested this?
> 8. Don't put in more money than you're willing to lose.
Cryptocurrency-think
Why are big changes a good thing? As someone who started playing brood war since the remastered release, I really like that the game is the same as it ever was. Leave tweaks to the community through map making. People come up with all kinds of fun ways to change up the game like reverse ramp mains or that weird assimilator/neutral egg setup on gold rush.
When I was still playing SC2 I appreciated how well thought out the changes were, for example when they increased the range of queens. That had such a huge affect on the game but it all came from such a small change.
In one project, I use a Point2D class as a namedtuple. Because it is just a tuple, I can easy convert it to a numpy array when working with a collection of points.