Monday, July 14, 2014


Wow, two months passed. Let's write something.

So, I haven't been totally idle. Right now I'm just unmotivated and tired of everything, but before that, I was slightly less unmotivated, and spent a week figuring out how to write an allocator for memory mapped bytes. I can't remember what there was to figure out, really. But there's some amount of compromise involved; speed vs size vs simplicity, as always. And the implementation, which is almost done, depending on your definition of done, was fiddlier than expected; as expected. But surprising. Given that I thought I had found an elegant solution. Perhaps I had. Or maybe because programming in Java what should be done in C is not as fun as it sounds. And I am tired.

It's one of these things that you'd think would be easy to find. Well why would I think that, really, am I that demented? Don't you remember that whenever you search the net for an X that you think should exist, all you find is a) stuff that does nothing resembling what you want, b) crap, c) frameworks that do something at least in the ballpark, maybe, or maybe does it in some non-APId component deep inside, but then you would have to work hard for it like one would with a chisel on a block of concrete with a precious marble vase hidden within it, provided that you could even know for a fact that the vase is somewhere in there, d) things for other programming languages, again probably a, b, c, but probably not X? Note that finding a well written, documented solution for X in another language would actually be very useful; I wouldn't mind translating too much, it'd actually be fun, compared to investing time and effort into something that you feel 'ought to' exist. And I am tired or perhaps depressed. Especially something like a memory manager/allocator, since off-heap storage has become rather popular lately in parts of the Java world.

So maybe I'll publish this allocator, or at least a description of the solution, if I can find the energy. As I said, the solution is pretty simple, but the code unfortunately not so simple nor fast. I should optimize and refactor it, after adding more tests. After I try to use it for some small experiments. But I am tired of pretty much everything right now.

I'd like to not be one of the legion of people who put out crap that others find and waste time on and which I'd be ashamed of. If there was a better way to find and filter for library code, it would feel better to release code of mediocre quality. Or one could instead find code of mediocre quality, but appropriate enough to be improved a little, adapted a little, republished, reused. Such a tool would of course be extremely valuable for finding stuff, regardless.

Well blah blah, somebody please make that tool, I'm busy writing blogs.

No comments:

Post a Comment