What would we be talking about if we weren’t talking about television?

I don’t keep accurate statistics about how much television I watch during the week.  I suppose the figure would shock me, but I like to think it averages about 5 hours a week in the last couple of years.  It’s certainly significantly lower than the American average of 35 hours per week.  I found that figure completely shocking.

When I discuss television with friends and colleagues, I often feel the need to mention my feeling that commodity-media occupies too large territory in our mind space.  I generally refer to television, since television is most obvious culprit.  The television tends to be the most prominent feature of most peoples living rooms.  I haven’t been to the states in a while, but when I lived there it wasn’t unusual to find houses with televisions in the bedrooms, kitchens and bathrooms.  I think my sister has a television in her bedroom.   I fear things have gotten worse in this regard since the advent of flatscreens, but perhaps the existence of tablets and smart phones has killed off that particular symptom.

Swiss tend not to have so many televisions, but tablets and smart phones are ubiquitous and typically one wall of the living room is dedicated to the television.  We don’t have a television, so when I walk by my neighbors and see their ginormous media systems I’m reminded of Fahrenheit 451 (the book, I don’t know the show), or of an altar with the television taking the place of god-statue.

I often find myself thinking about all of the hours I’ve spent on youtube, watching people discuss minutia of Game of Thrones.  I think back to my childhood, listening to people make complex analysis of sports teams based on an encyclopedic knowledge of the history of the sport, the teams and statistics of individual team members.  Imagine that mental energy was being spent on more meaningful topics, like the harm we are doing to our planet, out decreasing chances of survival as a species, economic injustice, social inequality, famine, overpopulation, resource exhaustion, racial intolerance, teacher wages, the health of our local schools, the wellbeing of our children, what to cook for our next meal, the four noble truths of the Buddha… 

It’s not hard to accumulate a list of things that would be better occupiers of our intellectual landscapes, our energy, our time, our lives.   Even if you don’t agree with all the things that come to my mind, I’m sure you have some that come to yours, and no doubt there is some intersect somewhere between our lists.

Imagine if we had as many youtube channels dedicated to discussing those lists, and the content of those lists as we currently have discussing Game of Thrones?  I’m not picking on Game of Thrones here, it’s just that it is my particular sin.

So this post is me taking a little time away from the television to talk about something a little more important than television — the fact that we watch too much television, we talk too much about television, we let the television (streaming media and movies are all television) distract us from interests and activities that would make our lives better.  So let’s be aware of it and strive to do better.

Day 4 of my second extended fast

I’ve been 10-15 kb (22-36 lbs) overweight for well over a decade. I’m vegetarian and eat quite a healthy diet, although I suffer from sugar addiction. I go months at a time where I rigidly control my calories, avoid sugar. I exercise a lot. In that time I ran a marathon, ran an olympic length triathalon (the XTerra in Switzerland), exercised regularly including strength training, yoga, and endurance work. With hard work I could get my weight down to about 88kg, but I always plateaued around there. Inevitably and injury, illness, stress, or a holiday season would come by, and the weight would creep back on, the trousers would get tight, and I’d have to buckle down again. I never let myself get much past 93kg, but I’m pretty sure my wife never knew me with less than 88.

This last summer I started experimenting with with fasting. I started out doing a couple of 22 hour fasts (dinner to dinner), then tried a 48 hour fast, a 4 day fast a few weeks later.

I went down from 93 to 89 pretty quickly with that stuff, and felt pretty good about it, although I did find the longer fasts difficult. I bought a book The Complete Guide to Fasting by Jason Fung, who has a pretty strong internet presence and makes pretty compelling arguments in favor of giving fasting a try.In that book I learned that there are some pretty serious researchers who are pretty convinced that fasting for a week a year dramatically reduces the probability of getting cancer. So I tried a week long fast.

That got me down to around 87 kg, and I’ve maintained that with two or three 22 hour fasts most weeks.

For months after I hit 87 I felt pretty good about my weight. I was using a notch smaller on all my belts, my formerly tight trousers were looser and more comfortable, although I had to retire some of my looser stuff as it got too baggy. When I looked in the mirror I saw the difference to my 93 kg self and felt pretty good about it. When I noticed the weight creep up a little, I just did a 20 hour fast or two, and didn’t overeat too much in the non-fasting time.

The great thing about this approach for me was I could still enjoy food. I could pig out during an evening out or a really good meal without worrying about my weight, since I could just do a day-fast or two to compensate for it. By now going 22 hours without food takes virtuall no will power, and involves no discomfort. I’m saving money and hassle since I now seldom buy or pack a lunch for work – going from breakfast till dinner without eating is peanuts for me.

After carrying ~87kg for a couple of months, it’s now normal for me. When I look in the mirror I see the paunch and the flab, not the reduction. I still don’t fit in those size 34 jeans that have been sitting in my closet for 10 years, and I now that all I have to do is stop eating for a few days to level it down. Christmas is coming, and I’d like to impress my family with my newly slim figure.

So Saturday I told Bettina I’d skip dinner. Suday I told her I’d continue my fast. Monday I rode my bike through the snow with Scotty in the trailer to take him to swimming lessons and I was surprised how energetic and fit I felt. The last time I’d done a longer fast I’d felt a bit schlap, and found myself quickly out of breath. This time I didn’t bike noticeably slower than normal. So when Bettina came home I told her I would just keep on fasting until I got fed up.

I’m being a little less strict about the fast this time around – I’m putting a little almond milk in my tea. I’m taking a multivitamin and mineral supplement every day. Therefore I’m doing a lot more sports. Today I rode in to work – 22 km and 200m climbing, and I feel pretty good so far. Let’s see how I feel coming home. In fact I feel more energetic than normal.

So now I feel comfortable making some observations about fasting:

  • It’s convenient and easy to integrate into my life. The short fasts make life easier – no food preparation, no lunch breaks, no sluggish feeling after work. The longer fasts mean missing family meal time, but with a little planning that can be compensated for. I take advantage of meal time to get chores done that have been lingering.
  • It feels healthy. When I mention the fasting to people I encounter a lot of people (most of them overweight) who think it must be unhealthy or dangerous. I reviewed what’s known on the subject and there doesn’t seem to be any evidence that it’s dangerous or unhealthy for well-nourished individual. What evidence is there does seem to indicat that it’s extremely healthy; not just because being overweight is unhealthy, but because going into a fasting state for lengthier periods of time has serious health benefits like reduced risk of cancer, and reduced risk of alzheimers and dementia. Wow. It also passes the ‘listen to your body test’. While it sometimes is uncomfortable – especially at the beginning of the fast, or when you aren’t used to it – when you later eat you feel great. In my case my skin has improved significantly. I’m now at the point when I feel sluggish or down, my instinct is to try having a fast, as it often seems to help.
  • It’s a form of physical training. Fasting is like doing sports, if you train at it, you get better at it. If you’re like me and not used to going more than 8 hours (at night, sleeping) without eating, it will probably seem really uncomfortable. With repetition it gets easier. My first 24 hour fasts were more difficult than my current fast, which is on its fourth day now.
  • It’s a form of mental training. When you resist your urges to eat for a longer period of time you come to a better understanding of your bodies signals, and change your relationship with your appetitites. You practice controlling your appetite rather than letting your appetites control you, which is an incredibly useful skill in our overmarketed existances as consumers where we are constantly bombarded with messages telling us we need more and more – when in reality what we really need is less.

Well, that’s all I have to say for now. I dont’ really have a goal with my current fast. I’d like to get down to 82 kg at some point in the next 6 months, which would hypothetically be possible if I don’t eat until Christmas vacation, but I’m not going to force the issue. My current plan is to eat again when I get fed up with fasting. Let’s see how it goes.

gnu toolchain update

Nick Clifton sent out a release note a month ago that completely passed me by.  Here’s the bits I found interesting:


GCC 6.2:

  • linux/x86 targes now default to enabling the compressiong of debug sections.  This can be reverted by using the –enable-compressed-debug-sections=no configure option.
  • There’s a –no-pad-sections command, which prevents padding sections, no-doubt helpful for the tiny embedded platform world.


  • GDB and GDBServer are now build witha  c C++ compiler by default.  Don’t know if that impacts end users much, but as a C++ developer I find it interesting.
  • You can now pass a negative repeat count in the ‘x’ command, to examine memory some count backwards from the current address.
  • Apparently there are improvements to the mechanisms provided to front ends.

G++ :

  • new option -fconstexpr-loop-limit=<n>, which sets the maximum number of iterations in a constexpr loop.
  • -fstrong-eval-order forces the evaluation of member acess, array subscripting, and shipt expressions in left-to-right order, and assigments as right-to-left, as adopted for C++17.  Enabled by default when using -std=c++1z.
  • support for _Float<N>

Anti Bernie Sanders Bias in the NYT

One doesn’t have to look far to find anti-Bernie bias in the media, generally in the form of ignoring the fact that he exists. Here’s one I noticed yesterday in the NYT, in an article talking about what a clown Trump is.  At one point they mention “Polling shows that he would enter the general election trailing badly against Hillary Clinton”

That plays well into the establishment message that we have to settle for Clinton because Bernie Sanders would be unelectable, and we need Clinton to make sure that (pick a Republican) doesn’t win.   Never mind that polls show that people prefer Bernie Sanders over Trump by a much wider margin than they prefer Clinton.  Clinton currently leads by 11.2 points, while Sanders leads Trumb by 17.4 point.  In other words the preference of Sanders over Trump exceeds peoples preference of Clinton over Trump by more than 60%.

The NYT doesn’t seem to find that newsworthy.

Powerline, git, Fedora

I recently discovered powerline, thanks to a Fedora news article. Getting powerline running on your Bash terminal is completely trivial and discussed in the article. You just:

Install powerline.

  sudo dnf install powerline

Configure your shell to use the powerline daemon.


Add this to your .bashrc

  if [ -f `which powerline-daemon` ]; then
     powerline-daemon -q
     . /usr/share/powerline/bash/powerline.sh


add this to ~/.config/fish/config.fish:

set fish_function_path $fish_function_path "/usr/share/powerline/fish"

Configure powerline to display git information

If all you want to do is get the git branch displayed on your powerline, that’s pretty easy, see for example this excellent article. But after I discovered powerline-gitstatus, I just had to have it.

Install the powerline-gitstatus segment:

pip install powerline-gitstatus

Setup a configuration

I’ve put my powerline configuration up on github, so if you like, you can start with my configuration, and play with it from there simply by clone my powerline-configuration repository into your local .config directory. I.e.:

cd ~/.config
git clone https://github.com/spacemoose/powerline_cofiguration.git powerline

Otherwise you can copy over the default configuration and follow the directions here.

Try out your new configuration

Since this article is focused on customizing our shell prompt, we are dealing with the powerline daemon, which means we must run

powerline-daemon --replace

when we want to see what effect our changes might have – BUT before you do that, I highly recommend running powerline-lint in case you forgot a comma somewhere.


Aah, good news. There’s a plugin that lets me post to my wordpress blog using Emacs org mode. The github repository is here. The mainpage documentation creates an unecessarily complicated picture of what has to be done to get this puppy running. On emacs 24.5.1 all I had to do was:

  • installed org2blog using emacs package manager.
  • install the following two lines to my .emacs:
(setq org2blog/wp-blog-alist
         :url "http://username.your-blog-address.net/xmlrpc.php"
         :username "your-username"
         :default-title "Hello World"
         :default-categories ("org2blog" "emacs")
         :tags-as-categories nil)
login with
M-x org2blog/wp-login.
post to drafts
M-x org2blog/wp-post-buffer

And hey presto, I’m up and running. I can write my posts in a first class editing evironment, using a first class markup language, and just export it with a keystroke (there are default keybindings, but I’m not using them yet). More’s possible, but for the moment I’m satisfied with that. For example, there are instructions on the github page explaining how to create a post template, and how customize your authentication, but so far I haven’t felt the need.

Now, let’s see if this leads to more posts on my part.

Exporting unicode code-snippets to PDF from Org-mode

Since I started using org-mode some years ago, I’ve wound up using other document and prensenation tools (like LaTeX, Word, PowerPoint…) less and less. I find it the most convenient way of generating virtually any kind of document or presentation.

Now I’m working a great deal in Unicode. Org-mode itself has no difficult with unicode, but exporting to PDF goes through the LaTeX engine, and one has to do a little extra work to make sure that works seamlessly.

The simplest means I have found to getting LaTeX to interact correctly with Unicode is to use Xetex.  One needs to:

  1. Install XeTeX (use your system’s package management).
  2. Tell org-mode to use XeTeX when generating the PDF’s from the latex files — see the elisp snippet below.
  3. Remove inputenc and fontspec from the list of default packages that org includes when exporting LaTeX.

So  I added the following to my .emacs

;; fontify code in code blocks
(setq org-src-fontify-natively t)

;; Delete inputenc and fontenc from the default packages.
(setq org-latex-default-packages-alist (delete '("AUTO" "inputenc" t)
(setq org-latex-default-packages-alist (delete '("T1" "fontenc" t)
;; Add minted to the defaults packages to include when exporting.
;; alternatively you can add these by customizing org-latex-packages-alist.
(add-to-list 'org-latex-packages-alist '("" "minted") ("" "fontspec")

;; Tell the latex export to use the minted package for source
;; code coloration.
(setq org-latex-listings 'minted)

;; Let the exporter use the -shell-escape option to let latex
;; execute external programs.
;; This obviously and can be dangerous to activate!
(setq org-latex-pdf-process
'("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"))


You can find my emacs configuration on github.

Ferguson Missouri

I’ve been unable to avoid reading about what’s been happening in Ferguson, Missouri.  It’s hard to imagine how it feels to have your son shot down callously by law-enforcement, to have nothing happen to the shooter, and to have the follow-up disregard and disrepesct the victims and the concerned citizens affected by the murder.

What’s more dismaying is the fact that whites across America are not in an uproar about how their fellow citizens are being treated, simply because of their skin color.  The sentiment seems to be “c’mon we have a black president, this couldn’t have been racism”.  The degree to which people are selectively processing events in order to maintain this kind of attitude is impressive.

For me it’s absolutely clear that Police are predominantly racist.  I suspect black policement are equally or more racist on average than their white colleagues, although I have to admit that’s only a supposition.  I did have one experience which fixed this opinion in my head though.

Years ago, while studying at Georgia Tech in Atlanta, I caused a traffic accident with my bicycle.  I pulled into North Avenue to see if I could safely make a left-hand turn (traffic blocking my view to the right).  A truck was coming fast so I pulled back.  The driver panicked (after whipping past me),  and slamed on the brakes, causing the aged sedan behind — driven by mid thirties black man with partner and two children as passengers — to collide into the truck.

Now, It was entirely clear that either I, or the white truck driver was to blame, but of course the police (one black, one white) ran the drivers licences of all involved.  The black family man must have an outstanding warrent, because the police cuffed him and took him away in the patrol car.  Okay, so far so good, sucks for the guy but presumably he did something to get himself in that situation.

The man was at all times polite and helpful.  Despite this, the black police officer felt the need to humiliate the guy in front of his children by hoisting him up by the trousers (classic bully wedgie) and shoving him into the polic car — laughing while doing it.

I suspect the white cop wouldn’t have behaved that way.  I’m think, having had my own encounters with the police (and being white) that a white guy in that situation would have been treated a little better.  I am sure that if the guy had been wealthy, drivinbg a mercedes or something, he would certainly have been treated differently.

So maybe it’s not racism.  Maybe it’s classism combined with a callous, bullying, us-vs-them mentality.  Maybe the racism is merely a coincidence — the high correlation between poverty and race caused by our racist history.  I can’t really say.   Either way, the behavior is shameful, and we need to do something about how American police behave.

London today.

In London today for a bit of a holiday.  It’s a stopover on the way to Norwitch, where we’re going to a friend’s wedding.

We took the train through the chunnel.  There are a number of trade-offs involved in traveling by rail over travelling  by air.  The total travel time increases, but that increase is less significant than one might think at first glance.  First, we save the trip to the airport, which saves about a half hour.   Second, the airport wants us to check in 90 min in advance, which is unecessary at the train station.  For a trip to London, the train station is in the middle of the city.  Once the train arrives, we have arrived, whereas arrival at the airport means another hour till we get to our destination — given the need to get luggage, disembark, etc.  Finall, If I take the average of airplane delays (in my life maybe a half hour) and subtract the average of train delays (less than a minute on the average in my life), I arrive at a compensation of 3 hours, door to door.  So for short trips — which from Switzerland means Italy, Germany, France, etc. it’s often more efficient use of time.  Of course, going to London takes 8 hours by train, given that one has to transfer from Gar de Lyon to Gar de Nord, and the ridiculous checkin procedures for the chunnel train.  The flight is approximately 2h, meaning  door-2-door time of 5 hours.  So I would save 3 hours travelling by plane over travelling by plane.   Overall it’s a loss, but not a terrible one.

There are other concerns.  Of those 8 hours, I spend a couple of hours in Paris’s largest rail stations.  I find this enjoyable.  It’s a brief visit to Paris, in which one sees only a little of the city, but rather a lot of the cities’ people.  While it doesn’t really count as a visit to Paris, it counts a great deal more than a stop-over flight would.  It’s rather the same when travelling through a country by train.  When one travels over an area by plane, one sees no more of that area than one would on Google maps.   When you sit on a train as it travels through a land, it makes stops.  People embark and disembark.  Often you get to observer a small slice of their life as you rocket through through their lands at speed which were unheard of even a hundred years ago.    So it’s my belief that one sees and experiences more by rail than by air.

Financially, there’s a real penalty for travelling by train.   This is not because air-flight is more efficient than train travel.  Quite the opposite in fact — the efficiency of train travel, and the implications for that on climate change and resource consumption,  is our primary motivations for choosing it over flight.  This is simply an artefact the enormous subsidies that airlines enjoy.   Should rail travel enjoy such a large level of support from our taxes, the economics of rail travel vs air travel would likely  change.  This can only change if governments begin to show more wisdome with regards to issues like climate change and resource consumption, which in turn is only likely to improve when citizens grow more wise.

Which brings me to the real reason we travel by rail, even when there is a financial and temporal price to be payed.  When we travel by air we rob from future generations and the poor of the planet, as it is future generations and the planet’s poor who suffer most from climate change our modern excesses.  Once, when explaining my reasons to a  colleague who should already have understood them, he replied with some banality about the need to be happy balanced against some uncertain future.  For the vast bulk of human history people have been unable to travel by air, let alone travel cheaply with wanton abandon.  Are we only now able to be happy?  In fact evidence suggests that modern excesses only make us less happy.   While I can’t prove it, I’m comfortable asserting that selfishness and short-sightedness can only diminish our happyness.  Implying that flying is a vital component of happyness is as absurd as asserting that the the suffering of climate change is uncertain, or even in the future.