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.

Forgive my brain dump. I wonder if my rambling makes any sense to anyone but me.

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.

Now that my lambda calculus interpreter evaluation is basically correct, it is important to start working on a garbage collector so that I can avoid writing programs which use up all my computer's RAM (a rather common issue when natural numbers take up memory linearly proportional to their rank).

I quit. Spotify is horrible. When I click play on a song, that does not mean you should automatically skip through songs until the next ad comes on. Grrrr. Maybe it's time I start just buying songs as I want to listen to them.

I think it is kind of cool that the fediverse is slow enough that I can watch and keep up with the whole federated timeline.

Every line of code I write is a protest against the incumbent best practices.

Over time the local timeline has become more useless to me because I follow most of the active people on this instance.

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.

I used to think I was good at not talking, but then I realized there's little motivation to talk when nobody listens to you, so I'm just doing the easiest thing.

Sigh. Do I *really* have to vertically center this login div? I hate how we try to make rectangular UIs with the browser's scrolling-document oriented model.

All software is garbage.

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?

Can you spot the bug? I wrote this code a couple days ago and am only now testing it.

for (size_t i = cs.name_stack.size - 1; i >= 0; i--) {
...
}

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++.

By switching from malloc to a pool allocator, I improved my lambda calculus parser from 1.16 seconds for 300k lines of code to 1.25 seconds for 500k. Not too shabby I would say.

Close only counts in horseshoes, hand grenades, and hashing algorithms.

Show more
Functional Café

functional.cafe is an instance for people interested in functional programming and languages.