# C[omp]ute

Welcome to my blog, which was once a mailing list of the same name and is still generated by mail. Please reply via the "comment" links.

Always interested in offers/projects/new ideas. Eclectic experience in fields like: numerical computing; Python web; Java enterprise; functional languages; GPGPU; SQL databases; etc. Based in Santiago, Chile; telecommute worldwide. CV; email.

© 2006-2015 Andrew Cooke (site) / post authors (content).

## TP-Link TL-WR841N as Wireless Bridge

From: andrew cooke <andrew@...>

Date: Tue, 9 Feb 2016 20:15:57 -0300

This is some random wifi router I bought locally.  It's not obvious
how you can configure it as a simple pass-through wifi bridge (as
opposed to a router), but in fact it's quite easy:

* Disable DHCP

* Set the main network address as anything consistent.  For example a
static IP of 1.1.1.1 with a mask of 255.255.255.0 and DNS at 8.8.8.8

* Set the LAN to be the address you want for the router

At this point things hung, so I pulled out the plug to reboot.  On
restarting it works as a simple bridge as long as no cable is
connected to the blue (WAN) ethernet port.

You may be able to skip the arbitrary WAN address, but I needed it
because it had originally auto-detected my local network and then
objected when the LAN was configured on the same subnet.

Andrew

### TP-Link TL-WR841N DNS TCP Bug

From: andrew cooke <andrew@...>

Date: Tue, 9 Feb 2016 20:18:00 -0300

Incidentally, the above fixes the issue that this router has with TCP
DNS requests (when a DNS request is too large for UDP the protocol
switches to TCP, which this router does not handle).

And I probably also disabled the firewall in the instructions above.

Andrew

## Previous Entries

### Sending Email On Time

From: andrew cooke <andrew@...>

Date: Mon, 8 Feb 2016 20:19:00 -0300

Every evening I write an email summarizing my work that should be sent
9am next (work) day.  It struck me that it would make more sense to
automate this (I forget to send it), and the following approach works
quite well.

First, I write the email in mutt, which saves things in maildir
format.  So I created a new folder for this email (0-today for reasons

Then I wrote the following script:

#!/bin/bash

n=ls -1 ${HOME}/mail/.0-today/cur/* | wc -l if [ "$n" -eq "1" ]
then
sudo sendmail -t < ${HOME}/mail/.0-today/cur/* rm${HOME}/mail/.0-today/cur/*
fi

which simply checks that folder and sends the email.  The "sendmail
-t" takes the "to" from the headers, which is what I want (since it's

Finally a cron job ties everything together.  Lets hope I don't spam
all my coworkers tomorrow morning...

Andrew

### Maybe run a command

From: andrew cooke <andrew@...>

Date: Sun, 7 Feb 2016 09:10:47 -0300

https://github.com/p-e-w/maybe

Very cute (but it's really not that useful if you read the description
- all it does is block a few system calls)

Andrew

### Sterile Neutrinos

From: andrew cooke <andrew@...>

Date: Sun, 7 Feb 2016 09:01:59 -0300

This is all new to me:
https://en.wikipedia.org/wiki/Sterile_neutrino
https://en.wikipedia.org/wiki/Neutrino#Chirality

From summary at

Andrew

### Strawberry and Banana Jam

From: andrew cooke <andrew@...>

Date: Sat, 6 Feb 2016 19:34:12 -0300

Last jam for a while - out of jars and the freezer (because I am not
sure they're really sterile) is full.

680g of bananas (just over 1kg bought - didn't realise the skins
weighed so much) and 740g of strawberrys roughly mashed with a
"stabby" liquidiser thing.  Plus 1.180kg more of whole strawberries
(total strawberry 1.920kg; total fruit 2.600kg, originally planned
3kg), juice of 3 lemons, 2kg of white sugar.

Slowly heated to boiling.  Realised I am boiling less than "rolling
boil".  Not sure if it matters, but staying with it as it is what I am
used to.  Around 1h30m after boiling starts, starts to transition to
gloopier mix (first spatter out of pan).  Continued to about 1h45m -
mouth feel on cold spoon fine (but then so was peach - this was
bubbling in a more gloopy manner).

Some fruit chunks were left as blobs.  Consistency when cold appears
to be pretty much perfect.  Can definitely taste the bananas.
Produces 3 big jars and one small (about 3.3kg I guess).

Taste is strawberry with an extra something.  Pualina says there's a
banana after-taste.  I think if you didn't know, you might think it
was lemon.

Andrew

### Kenzaburo Oe: The Changeling

From: andrew cooke <andrew@...>

Date: Thu, 4 Feb 2016 18:18:10 -0300

Just finished this.  It's been a slow read - need to stop and think
regularly - but it's very, very good.

This review is good on the technicalities -
http://articles.latimes.com/2010/mar/07/entertainment/la-ca-kenzaburo-oe7-2010mar07

These two give away more of the plot points:
http://happyantipodean.blogspot.com.au/2010/10/review-changeling-kenzaburo-oe-2010.html
http://happyantipodean.blogspot.cl/2013/01/book-review-changeling-kenzaburo-oe-2010.html

A long interview (not particularly on this novel):
http://www.theparisreview.org/interviews/5816/the-art-of-fiction-no-195-kenzaburo-oe

None seem to describe the emotional depth I felt.

Andrew

### Peach Jam

From: andrew cooke <andrew@...>

Date: Mon, 1 Feb 2016 17:55:48 -0300

Starting with 2kg of large peaches, I ended up with 1.6kg of flesh.  I
divided this into about a third with skin, pureed with a liquidiser,
and two thirds without, diced.  I did try peeling the peaches using
hot water, but it didn't work.

I used 375g of "rubia" light brown sugar and 825g (total 1.2kg) white.
And the juice of two lemons.

Cooked as before http://acooke.org/cute/Strawberry0.html but for much
less time (1.5hr).  I stopped when the texture ws thicker in the mouth
(from a cold spoon), but the boiling was still many small bubbles
(boiling off water, I think).

I added 2 tsp of vanilla essence 10m before the end.

The result was just over 4 jars (around 2.2kg I guess), and it appears
to be a little too runny (it's not watery, but frustrating to take
from the jar with a knife).  The fruit does appear to be suspended
nicely in the jam (not floating to the top).  Colour is quite dark.

Andrew

### Strawberry and Raspberry Jam

From: andrew cooke <andrew@...>

Date: Sun, 31 Jan 2016 20:17:54 -0300

I just made some jam.  It seems to have worked out fine, although I
haven't tried any "cold", yet.

Before I started I looked around on the internet - there are LOADS of
jam recipes, and no two are alike.  So I thought I'd add my own recipe
and experience to those alrady out there...

Yesterday I bought 1kg of strawberries and 1kg of raspberries at the
market (good quality, fresh fruit), along with two lemons.

Today I bought a stainless pan, 24cm in diameter and fairly deep (this
turned out to be a perfect size).  It was the cheapest stainless pan I
could find - very thin walled and boasting a "1mm" thick base for heat
dissipation (turned out to be just fine).

Before making the jam I washed some old jars and lids I had saved, and
then placed them to dry in the oven at 150C.

I washed the fruit, tossed out a few ugly examples, and removed the
leafy bits from the strawberries, and put them in the pan.

Then I added 1.4kg of sugar - 600g white, 100g darkish brown (dorada)
and the rest, 700g, light brown (rubia).  The mix was just what
happened to be already open in the kitchen.  This is lower than many
recipes - I was hoping to get a less sweet result.

Finally, I squeezed both lemons and added the juice (this was partly
for taste, but also because I was not using additional pectin).

Stirring everything together, the raspberries broke down and I was
left with a red mush.

I place the pan on a pretty low heat because I was afraid that the
sugar would burn through the thin base.  Every 5m (using a clockwork
timer) I stirred things.  Slowly I raised the heat to a medium flame.

After about 30min the mix started to boil.  I let it boil with the lid
off, still stirring every 5m.

To test for when the jam is thick enough I used a teaspoon that was
kept in iced water.  Lifting a little of the mix out with the spooon
it was quickly cooled and the texture could be felt in the mouth.

For a long, long time the texture remained watery.  After about 1h30m
I switched to stirring every 10min.  At around 1:45 I noticed that the
cosnistency was slightly thicker.  At around 2h I suddenly found that
the jam had stuck to the bottom of the pan!  This must have happened
in the previous 10min (since last stir).  With a metal spoon I managed
to scrape this clean (it was sticky, but not burnt).  Bringing the jam
back to the boil, it now seemed fairly thick, and 20m later I decided
to stop cooking.

Getting the jam into the jars was trickier than expected.  I ended up
using a serving spoon (not a ladle).  It took some time, but was more
accurate - less was spilled / wasted.

In total, the recipe gave just slightly over 2kg of jam.  So the fruit
must have cooked down from 2kg to around 600g.

The consistency is thick, and there are very few lumps.  To get a
lumpier jam I think you would need to either use pectin (presumably it
would thicken earlier) or add some strawberries later in cooking.

I was worried that the jam wasn't going to set - particularly since I
hadn't used pectin (or "jam sugar").  But in the end, it worked out
fine.  Tomorrow, when I have some on toast for breakfast, I'll report
back on the flavour.

Exhausted and happy (although a little dissapointed at the low volume
produced - I eat that much in a month of breakfasts).

Andrew

### flac to mp3 on OpenSuse 42.1

From: andrew cooke <andrew@...>

Date: Sat, 30 Jan 2016 11:12:08 -0300

no matter what packages i loaded, i could not get ffmpeg to encode /
decode mp3:

> ffmpeg -codecs | egrep '(mp3|flac)'
DEA..S flac            FLAC (Free Lossless Audio Codec)
..A.L. mp3             MP3 (MPEG audio layer 3)
..A.L. mp3on4          MP3onMP4

so in the end i used:

> for file in *.flac; do flac -cd "$file" | lame - -V0 "${file%.flac}.mp3"; done

andrew

### Kenzaburo Oe Interview

From: andrew cooke <andrew@...>

Date: Fri, 29 Jan 2016 21:57:02 -0300

Good.  Also, some book recommendations.  Curretly reading "The
Changeling".

http://www.theparisreview.org/interviews/5816/the-art-of-fiction-no-195-kenzaburo-oe

Andrew

### Otake (Kitani Minoru) move Black 121

From: andrew cooke <andrew@...>

Date: Sun, 24 Jan 2016 16:21:36 -0300

It took me some time to work out what was "wrong" (unsportsmanlike)
with Black 121, as described in Kawabata's "The Master of Go".  Since
I think I now understand, I'll set it out here:

The way that the game was arranged meant that there were long periods
(several days) between sections of play.  During these periods the
players can analyse the current position and study future moves.

Within this schema, whoever plays last, before a break, is at a
disadvantage, because the followng player knows the exact state of the
board, and so can plan ahead.  To ameliorate this, the final play is
kept private (written down and sealed), revelaed only when play
restarts.

However, this is not the direct source of the unsportsmanlike
behaviour associated with Black 121.  The actual problem is more
subtle.

Consider being required to make a critical play near the end of a
session.  If you could somehow postpone that play until after the
break, you would have much more time to consider your options.  One
way to do this is to instead play a simpler, more conservative move,
that has a simple, single response.

This is what Black 121 involved.  It was the final, sealed play of the
day.  And it was (allegedly) a "time wasting" move as suggested above.
So it was intended to buy Otake time - he had the recess to think
Andrew
http://www.theguardian.com/world/2016/jan/24/safe-spaces-universities-no-platform-free-speech-rhodes
Andrew