To solve the problem of phishing emails, we should de-criminalize harmless phishing and flood the market with hobbyist phishers. This would increase the competition that malevolent phishers would have beat without increasing people's risk very markedly.
People and companies might get extremely annoyed by the increase in fake ad emails, but it would force users to be more stingy in giving out emails and companies to be less of an impersonation candidate.
Just started reading "the myths of security" by John Viega, the former CTO of McAfee. Short chapters and entertaining writing style make it quite enjoyable and easy to read during short breaks in my schedule. It feels like a collection of short stories.
Further, to avoid reallocating arenas of memory (which honestly might not be all that expensive), I could use a rolling allocation scheme, so that once the end of the arena is reached, I can wrap around to the beginning again. This could continue until the distance from the oldest node in the expression tree to the newest is the same size as the arena. At that point, I would do the same copying as before, which would compact the expression.
On second thought, a complicated full-featured GC may not be that necessary. If I only ever have one expression to evaluate at a time, and if that expression stays relatively small during normalization/expansion, then every time the allocated memory reaches a certain size, I could copy the current state of the expression into a new arena of memory and deallocate the whole old arena. I believe this would be categorized as a moving GC.
For a bit I was opening netbeans just so that I could click a green play button to start a php server. I realized today that I can just run the same simple command as netbeans from my project root, and I get the same environment.
Now if I can figure out how to make gradle build and install an android app, I can skip opening android-studio as well.
When writing a parser in a low-level language like C, how does one allocate strings with good performance? I can't find anything online about this problem, but it seems significant to me.
I've settled on allocating a large char array up front, and exposing two functions.
void add_char(builder* b, char c);
char* end_string(builder* b);
`end_string` adds a null character to finish the current string, and returns a pointer to where that string started.
Is this a good approach?
I'm not sure how I feel about passing parameters by reference in D and C++. I like it because it abstracts the integer nature of the pointer, so I can guarantee that pointer arithmetic mistakes don't exist. I dislike it because the caller syntax make no distinction between ref and value parameters, so I can't tell if a function will modify a variable.
Related is how D overloads `.` to be used where `.` and `->` are used in C/C++.