#vim: going plug-in free

I once read an article titled Stop the Vim Configuration Madness , where the user advocates avoiding plugins. I have read a number of similar articles.

Since then, I have disabled syntax highlighting, backing-up of files, and a couple of other tweaks. Actually, the suggestion of turning off syntax highlighting turned out to be a good one. I have always felt discontent with highlighting schemes. There is always something wrong with them. Usually is is comments or strings that are bad.

Having disabled syntax highlighting for over a year now, I can honestly say that I I prefer non-highlighting.

The only plug-in I had installed is “emmet”, which does some html insertions. I have recently written a script that obviates the need for it.

I basically do two things when I am writing html: have a nice layout for header level two, and creating links in lists.

Here’s what I do now:

In .vimrc, add the line:

command H :r! hh

The H is just my mnemonic for “html”, which I can call up by tyong


What his does is call a script that I’ve written called “hh”, which does the donkey-work. Here’s the script:

#!/usr/bin/env bash

# helper for the H vim command
read cmd
case “$cmd” in
2) read title ; echo -e “<hr><h2>$title</h2>\n” ;;
lia) read link ; read desc ; echo -e “<li><a href=\”$link\”>$desc</a></li>” ;;

So, you call up H, and then enter a command. I chose “2” to represent a heading of level 2., and “lia” to create a link. “lia” is the most complicated one, so I’ll describe how it works:

  1. You type in “lia”, then return
  2. Type in the link, then return
  3. Type in a description, then return

The script then echos an appropriate <li> <a> combo. The “:r!” command in vi takes the output from the script and places it in the buffer. Fantastic.

No doubt the script will grow as I place more demands on it.

The reason that I want to get rid of all plugins is that I often work on different machines and experiment with different Linux setups. I am growing tired of having to install plugins. So now I am determined to go plugin-free.

I’d like to share one final great little mapping that I have:

map <F7> mzgg=G`z

This reformats the whole of the file with proper indentation for the file type.

I think that we should remind ourselves that vim is not emacs, and they have, or ought to have, different philosophies. Emacs is “maximal”, where you set things up your own way. Vim ought to be “minimal”, where you don’t do things your way, you do them the vim way.


Posted in Uncategorized | Leave a comment

The markets

Morningstar reported yesterday that it was the worst year for the FTSE100 since 2008. The index was down 12.5% over the year, starting at 7648, and ending at 6728. Although disappointing, I don’t think it was necessarily anything exceptional.

It peaked in May at about 7877, a decline of 14.6%. So we’re not in a bear market yet, although we have had a correction. The support levels established in March 2018 failed and we’re in a distinct downtrend, so it wouldn’t surprise me if further falls are on the cards.

My portfolio is down 19.9% this year, so that’s obviously a huge disappointment to me. Undoubtedly most people did much better than me. Maybe I should have stuck to a Greenblatt Screen, or something. This year I have mostly been using mechanical criteria that I have seen on Stockopedia.

My prediction for 2019: the stock market will end up. Let’s see if I’m right, shall we? My reasoning is that Stockopdeia reports that the FTSE is on a trailing PE of 12.8. Although not screaming value, it’s pretty damn reasonable. Also, 2018 was a down year, which makes 2019 more likely to be an up year. There can be multiple down years, but they’re not all that common. I think we’d need more of a mess for that to happen.

Can the market end down on 2019? Yes, of course it can. The market can do anything it wants. But I think that the odds favour it being an up year.

Stay safe out there.

Posted in Uncategorized | Leave a comment

An adventure in Slackware

Ubuntu kept freezing on me for some reason. It seemed that Firefox was able to lock up the system. So I decided to install Slackware again.

Slackware is a fast system. And you know what, I really like its init system. It is so easy to understand. systemd is an opaque box of mysteries. There’s nothing obvious about it at all.

I think the problem with Linux is is aptly summed up in this post on reddit:

I’ve been a Linux user for a while now (around 2 years) and I can’t help but notice the difference between command line tools / kernel and the GUI options that are available. Running a Linux server without GUI is a flawless experience, running a desktop distro on the other hand is always a rough ride with bugs, glitches, driver problems etc…

Why is it that the lower level stuff is so well written and the front-end is so inconsistent?

Here’s some of the problems I ran into with Slackware:

  • VNC from sbopkg didn’t seem to work properly. I had to download and compile the latest version from its site
  • KDE seemed pretty nippy to me, which was a surprise, but doing something simple like pinning an app to the taskbar seemed frought with risk. It was too easy to delete stuff, and not easy enough to add stuff.
  • I have a pink noise generator which I use a lot. For some reason, it always locks the system when I run it from a virtual console. I have to run it within X Windows. Last night, alsa stopped working for some completely mysterious reason that I have yet to determine. It has forced me to reboot into Ubuntu
  • Lilo did not detect my Ubuntu partition correctly. I finally managed to fix it by copying the Ubuntu kernel over to the Slackware partition, and tweaking lilo.conf. There was a bit of effort on my part figuring out that I needed to copy over the kernel. Having said that, lilo was easy to configure thereafter. It is much easier to understand than grub. Grub is symptomatic of a lot of modern-day Linux tools: everything is hidden behind yet another layer of abstractions. As the saying goes: We can solve any problem by introducing an extra level of indirection, except for the problem of too many levels of indirection.
  • My root directory of 40GB is 60% full, according to ‘free -m’, which is odd, because I don’t even have a 40GB partition on my hard drive. I’ve yet to figure out what’s going on there.
  • Firefox is quite old, making it difficult to find adblockers. I guess I should try to download the latest version
  • Compiling Java from sbopkg was a mistake. It took a long time to compile, and my Java program looked like garbage anyway. I generally try to avoid Java like the plague, but there’s an app, “fidocadj”, that I really like. It is written in java. I also wanted to run the Arduino IDE, and thought Java might be necessary. I think that it bundles a version of Java, though, so I might be OK on that score. In the end, I found that Alien Bob had a binary version of Java, and that worked well for the app I was interested in.
  • I have yet to figure out automounting, and integrating it in with the desktop. I don’t mind typing out some mount commands, but it seems a little labour-intensive setting things up

So although Slackware is “stable”, I think you have to use a slightly odd definition of the word. It is certainly not without its wonks. It would be better if they had a more frequent release schedule. I’m sure it could be done if they put their mind to it. The problem is, some of the stuff in there is just a little too old and crufty, and could definitely do with a refresh.

I guess Slackware can be described as somewhat incomplete out of the box. You’re almost certainly going to have to sort something out. It’s a learning-curve. Distros like Ubuntu for the most part Just Work. The problem there is that you’re stuck with what you’ve got. “Automagical” is good until something goes wrong.

I think the Redditors post was spot-on. Linux stability is a little bit of a myth.

Random thought: Fluxbox is actually quite a nice window manager. It’s very simple. It looks butt-ugly out of the box, but with a few simple tweaks, it can look quite presentable. It’s very lightweight, and supports grouping. I think I’ll have to explore that feature more.

Happy new year, folks.

Posted in Uncategorized | Leave a comment

Speculations on womens’ mating strategies

I saw a video on YouTube the other day which put forward the proposition that a man’s looks is of primary importance to a woman. This is part of the so-called “Black Pill Theory. And it got me thinking …

So the idea behind this is that most of our conventional wisdom about what attracts a woman to a man is mostly a red herring. It’s not “being alpha”, warm, intelligent, a good sense of humour, etc., that are important qualities that a woman looks for in a man. The argument is that most of the spark or chemistry is looks.

Basic premise

Then it dawned on me: in order to understand womens’ behaviour, you have to understand biological imperatives, not self-reported motives. Women behave not in ways that is beneficial for them personally, but in ways beneficial to the species. Or put it another way: a woman must get Chad’s genes no matter her personal cost. If you accept that proposition, then a lot of pieces of the jigsaw fall into place.

OK, so what is a woman’s biological imperative? If we can understand that, then so my thinking goes, we can understand everything. Here it is: women bear a huge cost in having a baby, so they need to procure the best seed they can. Let’s call the possessor of said seed “Chad.” Not “alpha”, because that’s confusing the issue, but “Chad.” Chad is defined by his physical characteristics of being a 10, and all that implies: square jaw, good teeth, strong upper body, and so on. You know … Chad … the perfect physical male specimen.

A woman, wants Chad, and only Chad, because she wants to breed the best offspring possible. This has profound implications for her behaviour.


Have you ever noticed how a woman deems one man’s behaviour adorable, and another man’s behaviour creepy, even though both men are acting exactly the same? This may seem illogical on her part, but if you refer back to my basic premise, it makes sense: the first man is a Chad, and the second isn’t.

You see, to her, non-Chad is a repulsive snot. In fact, let’s call him Snot, in honour of the show American Dad, where the son Steve has a best friend called Snot. She’s trying to eliminate Snot, who’s buzzing around her like a pesky mosquito, so that she can concentrate on getting Chad’s attention. Should we perhaps Snot a “vagina-blocker”?

Many women, particularly good-looking women, are actually offended when a Snot approaches her. Implicitly he is stating that he is on at least the same level as her, an assumption she rejects even, or especially, if it is false.


Do women like being objectified? And if not, how do you explain why women constantly “doll themselves up” in what logic clearly dictates is an attempt to be sexually alluring? And if men are so thirsty, why does she need to doll herself up anyway?

I am going to define “Objectification” as viewing someone as physically sexually desirable. Let’s not argue over semantics here, let’s just agree that it’s a reasonable definition and see where it gets us.

In answer to the first question, I would say “yes,” but only to Chad, otherwise “no.” Here we see Nature’s cruel trick on women. Nature requires that all men act as Chads, whether or not it is true. The woman must be bombarded by a lot of men whom she finds objectionable. From the biological perspective, it is the price she must pay in order to secure Chad.

This also explains why women wear make-up. Explanations such as “I’m doing it for myself” is a mere misdirection. Women must wear make-up because they are competing for Chad’s attention. Here’s the great inequality: women’s attention for men is a seller’s market, but for Chad, it’s a buyer’s market. Women may be the gatekeepers of sex, but Chad gets to make the final decision.

At this point, it is interesting to consider what strategies rabid feminists use. Take this abomination by way of illustration:

Presumably it’s not a conscious decision on her part, but she has taken herself out of the game by presenting herself as hideously as possible. No need for her to fear men’s sexual advances; although what she lacks in unwanted sexual interest, she makes up for by open condemnation.

Bad boys

It is often considered that all women love a bad boy. I would like to reframe that idea in light of the basic premise. It’s not that a woman loves a bad boy, it’s that she is biologically mandated to accept whatever heartache or physical violence a Chad inflicts on her, just so long as she gets his superior genetic material for the good of the species.

This leads us naturally onto a discussion of its opposite, “nice guys”, and …

Modern marriage

We have all hear the term “divorce rape”, where a man is taken to the cleaners by his wife. The man loses a significant proportion of his assets, access to his kids, and is forced to pay alimony. According to an ONS (Office for National Statistics) report in 2015, marriage rates for opposite-sex couples were the lowest on record.

It’s plausible to suppose that we could attribute at least some of this to the greater autonomy of women. However, it should be borne in mind that women are reporting dissatisfaction with their inability to find a suitable partner.

Divorces now weigh heavily in the womans’ favour. I might add, parenthetically, in the age of so-called gender equality, that this is a hypocrisy.

It adds a new dimension to mating strategies. Erstwhile, women had to make a considerable investment in having a baby. Now men must make a considerable investment. They must perform a risk-assessment exercise that they did not formerly have to do. Is it fair? Well, maybe it’s not unfair, but it certainly does alter the dynamics of relationships. Men must now ask the question of women: “and what do you bring to the table?”

The privilege (yes, I used that word) that women enjoyed of marrying up the genetic pool, is eroding. Women will either have to adjust their expectations downwards, or hope that they aren’t allergic to cats.

Where will this all lead? To quote Woody Allen: “We stand at a crossroads. One path leads to despair, the other to destruction. Let’s hope we make the right choice.”

Posted in Uncategorized | Leave a comment

Market stats

It’s time for me, once again, to compile a list of stats for the market, using what I hope is a reliable data source. Here are the results:

DATE          --------------PBV-------------     --------------PER---------------
               P20   P40   P50    P60   P80      P20    P40    P50    P60    P80
14-Nov-2018   0.97  1.69  2.17   2.80  5.14     8.31  11.82  13.63  15.93  23.01
14-Nov-2017   1.11  2.04  2.63   3.52  6.55     9.07  13.87  15.91  18.32  25.50
14-Nov-2016   1.09  1.82  2.33   3.03  5.40     8.42  12.97  14.73  16.61  23.01
04-Nov-2015   1.16  1.92  2.54   3.12  5.30    10.30  13.83  15.62  17.40  23.09
08-Nov-2014   1.12  1.75  2.20   2.77  4.65    10.30  13.58  14.96  16.58  21.83
05-May-2014   1.23  1.93  2.39   3.10  5.06    11.66  14.73  16.37  18.11  22.77
06-May-2013   0.85  1.34  1.71   2.19  4.12    -1.27  10.87  12.77  14.51  20.09
21-Nov-2010   1.13  1.88         2.76  4.93



As you can see, the median PE is 13.63, slightly less than the long-term average. I am therefore happy that the UK market is not over-valued.

Posted in Uncategorized | Leave a comment

Magic Hat Portfolio: SOM stays in

The MHP (Magic Hat Portfolio) has taken a dive over the last month, and I thoroughly expected it to have under-performed the indices. To my surprise, it has actually done relatively well over the short term: 1-week, 1-, 3- and 6- months.

SOM is due for ejection from the protfolio this month, but I have decided to be lazy and keep it in, despite it not passing the Greenblatt Screen. However, it does have a Magic Formula Score of A+, a PE less than 12, a yield above 5%, and a Stockopedia StockRank of 94.

That will do for me.

The support level for the indices seems to have held, so I would expect a quick recovery, at least in the short-term. Valuation levels seem reasonable, so I am actually sanguine about the state of the market. I am, of course, disappointed that I am nursing a loss.

No-one knows what the future will bring, and for all anyone knows we still have further substantial falls on the cards. In my view, that’s not the way to bet, though.

Stay safe out there.

Posted in Uncategorized | Leave a comment

Ubuntu is the best all-round distro

Ubuntu 18.10 was out yesterday, and it’s quite a pleasant distro.

Ubuntu’s look is good, certainly much better than the hideous brown they had for many years. It looks better than Windows 7 by default. I have only interacted with Windows 10 once, and I found it to look quite good, too. I doubt that I will ever install it on my machine, though. The horror stories I have heard make me want to avoid it.

I have even grown to tolerate Ubuntu’s default desktop. I hated it for a long time, but now find it acceptable. I think there are more usable window managers out there. I think the flatter icons are a step down from their previous design, which were about the best I have seen and could hope for.

As Alan Kay once said, the problem with computing is that it’s a pop culture rather than a real engineering discipline. There’s too much fad-chasing.

Ubuntu is often considered a “beginner” distro, and not for “professional” use. Whilst it certainly is beginner-friendly, I don’t see how it would be considered unprofessional. Ubuntu, for the most part, Just Works (TM). Why waste time fiddling around when I can get something useful out of the box.

I have tried many distros in the past, including:

  • Arch: my second-favourite Linux distro. It is a rolling-release distro, and I actually find it the most stable. You need to do jiggering around with Arch than you do with Ubuntu, though.
  • Debian: pretty good, although rather behind the curve
  • Fedora: this distro is an abomination. Every time I have installed it, I have regretted it. It’s too much cobbled-together half-broken junk. I hesitate to say all this, because I just know that the advocates will come up with a bunch of rationales as to why they think I’m wrong. I’m not going to rehash their arguments, suffice it to say, my answer is still “no.”
  • Mint: tried it, and liked it. I don’t really have anything bad to say about it, and it’s been a long time since I have actually used it. It’s a perfectly fine distro
  • OpenSuse: can’t see the point. It was OK, but it didn’t have many of the packages I was interested in.
  • Slackware: my third-favourite Linux distro. It’s solid, but dependency management is tedious. I am aware of apps than can help here, but still, it’s more work than I would care for

What Ubuntu offers is ease-of-use and a large collection of up-to-date software. It may not the absolute latest version, but it’s close enough. I like the Aptitude package management system, and it seems faster than some of the other systems I have tried. You can also get proprietary software and drivers for it. I am not puritanical.

Downsides? Well, it’s unlikely to be as fast as Arch or Slackware, nor as stable. I wish it wouldn’t ask to send crash reports, either.

Posted in Uncategorized | Leave a comment