A Logic Named Joe

“A Logic Named Joe” was published in 1946 in Astounding Science Fiction and in one short story predicts the Internet and some of the dilemmas that it poses society. Murray Leinster (the nom-de plume of William Fitzgerald Jenkins) wrote more than 1500 short stories, but this is probably the best known.

This story is available in a number of ways, the craziest is to listen to the over-the-top1950 dramatisation from NBC’s DimensionX

The dramatisation was broadcast again in a 1955 X-Minus One episode which has been cut into 3 YouTube non-videos (included here mainly for decorative purposes).

Alternately, and probably better, you can read the original story in the Baen Free Library.

When you’ve finished, ask Alexa who the first president of the United State was. Then look up how to make ‘Dart Poison’ on your favourite search engine.

It could be argued that this story predicts the ubiquity of the Internet, Alexa, Skype, Google the jeopardy to personal privacy and the ensuing concerns about the propagation of harmful information about weapons and explosives. I was going to write more about the story but then found that there is a very good write-up in The Register from 2016 accompanied by a lively debate about the prescience of science fiction in the comments.

I’m Missing Maplin – the Courtesy Light

On our T5 Camper van conversion I had to replace the side door step which was quite badly worn during it’s previous life as Kombi van. The original step had a courtesy light in the rear end of the step, the after market replacement does not, and its not a simple task to fit one as they are designed to fit into a slight recess, so it’s not just a case of cutting a hole. I considered making a custom foot light unit with white LEDs that would fit there. On consideration I decided not to though. There is already an LED light fitting above the rear sliding door so it would be nice if that were to come on when the door was opened.

The rear lighting in the camper consists of 5 LED units supplied by the leisure battery and switched through its own circuit. One of the LED fittings is directly above the door opening. I need just this one LED fitting to illuminate as a courtesy light. The courtesy light circuit is supplied from the main vehicle battery and that power source should not be mixed with the power from the leisure battery. The answer to this problem is to connect the over door LED to both circuits via a diode from each circuit. Diodes are the electrical equivalent of a 1 way valve, so using a diode between each circuit and the LED will allow it to be powered by either circuit without the power flowing back to the other circuit, keeping the leisure battery light circuit separate from the courtesy light circuit and sharing the one fitting.

A potential problem with the silicon diodes is that there is a forward voltage drop across them of 0.6 volts or more. This would make the over door LED slightly less bright than the others. The solution is to use a Shottkey Diode which has only 0.2V forward voltage drop.

I few months ago I would have been able to pop down to Maplin and buy a couple of diodes, but now I’m having to wait for them to arrive via Internet Mail order and pay almost £5 post and packing (they weigh about 5 grams or less).

Early Computer Memory

Back in the days when a computer filled a room, or in some cases several rooms, computer memory was very different from modern semiconductor memory. In the 1940’s and 50’s it was a massive engineering challenge to be able to store and recall the information that early computers could operate with. Each solution had their own technical challenges and relative advantages. Here are a few:

  1. The magnetic drum, the principle for which was actually patented back in 1932, consisted of a rotating drum with a series of magnetic strips each of which had a head to write and read the magnetic state of that strip.
  2. Mercury delay line memory. Tubes full of mercury take a time to pass vibrations from one end to the other as sound propagates slowly through the dense liquid. Pulses of binary data were input at one end, and read at the other. The output was amplified and sent back to the input so that the compression waves of data were circulated repeatedly through the mercury, to ‘hold’ the information.
  3. For small amounts of relatively fast to access memory, banks of radio style vacuum tubes were used, this was incredibly expensive to implement and did not scale to large amounts of storage, reliability of the valves was also an issue.
  4. The Williams-Kilburn tube was a type of cathode ray tube, using the same technology as early television tubes to store the binary data as points of light in the phosphor on the tube.

With the invention of magnetic core memory and early transistors, these earlier forms of memory were displaced. The magnetic drum, being both robust and practical, evolved into magnetic disks, which were then miniaturised to become the disk drives we are familiar with today. Magnetic storage is now increasingly displaced by semiconductor memory storage devices, the currently reigning technology being flash drives such as the little ssd cards that fit in phones and media players. It will be interesting to see what will displace them.


Goodby to [ ! Not Secure ]

If visiting this blog in recent days with an up to date Chrome browser, you would have been warned that it is not secure. Thats because there was no security certificate installed and so the encrypted version of the HTTP protocol, HTTPS, was not available.https url image

That’s sorted now with a Let’s-Encrypt certificate installation and a forced HTTPS redirect, making communication with the blog website more secure. I had missed upgrading this blog when I upgraded other services I use.

You might think, “So what it’s only a blog, I’m not putting in any of my passwords, personal details or credit card numbers”.

It does matter though. Websites that have been corrupted by internet bad guys is one way that computer viruses are spread. If communication with the website is not secured by HTTPS, there is a good chance that the admin and in this case blog posting to that website is also in clear text. That leaves open the opportunity for a bad actor to capture the credentials, get into the site admin and plant malware. This is now much less likely for this blog.

All web sites should now be secured with a certificate, if they are not they are vulnerable and potentially make you vulnerable if visiting them. With the free certificates from Let’s Encrypt project and the scripts they provide to keep them automatically updated, there’s really no excuse not to run a site with HTTPS.


Smartphone Plateau

Recent news reports a drop in the number of mobile phones sold in the last quarter. We seem to be in the same kind of cycle as we had for desktop PCs then laptops. The technology has become good enough that the perceived need to upgrade is being eroded. A two year old phone is adequate for most uses.

For PCs and Laptops the real drop in sales volumes has been caused by displacement by alternate more convenient devices. Will this happen with the mobile phone? What will the compelling alternate device/interface that eventually displaces the mobile phone as we now know it? There are a variety of options on the horizon, wearables, augmented reality, neural nets or perhaps something new we are not aware of.

Bitcoin, is it here to stay?

As everyone is having a say on Bitcoin, I thought I’d write up my thoughts here. It looks like December 2017 may have been a notable month in the story of Bitcoin.

Mining for fun and profit: Can it be profitable? The idea is that bitcoins get awarded to miners according to the amount of work done to create a new block in the blockchain (the blocks being the ledger where transactions are recorded). The original premise of was that an increasing amount of work would be required to earn a bitcoin as more coins were minted. So while in the early days one could luck in on a few bitcoins by just downloading and running some software on your PC, this is no longer the case; now specialist hardware is required in order to have any chance of earning Bitcoin from mining.  According to this video  by TechCashHouse https://www.youtube.com/watch?v=UHQqWCreCBw (dated Nov 30 2017) there is only marginal profit to be made from readily available mining hardware. Money can only be made where there is a low electricity cost. Also mining machines noisy and hot, so not something that will be welcome in the lounge or bedroom alongside the games console.

Using it as a currency: Once the technicalities of holding Bitcoins (on exchanges, in wallets or safely on paper) and using them to make transactions is understood, it is possible to buy stuff with bitcoin. At one point it was apparently possible to buy a cup of coffee with Bitcoin. Recently however Bitcoin transactions appear to have become more of a practical challenge, for instance its no longer possible to use Bitcoin for Steam games https://www.theverge.com/2017/12/6/16743220/valve-steam-bitcoin-game-store-payment-method-crypto-volatility. There are a number of factors contributing to this: primarily volatility and transaction costs. Volatility making pricing a product difficult and transaction costs ballooning to $20 a go. Additionally the Bitcoin system is starting to struggle with transaction times during Nov-Dec 2017 it was very rarely less than 100 minutes but has regularly peaked at over 1000 minutes https://blockchain.info/charts/avg-confirmation-time.

Avoiding the man: As a distributed system the Bitcoin network is not in the control of any government or major business entity. Due to the cryptographic nature of the blockchain implementation at its heart, Bitcoin is considered by many to be able to anonymise any transaction. This had made it the currency of the dark web, but with the higher transaction costs this apparent secrecy now has a higher price premium. One use of Bitcoin has been to provide a means of currency exchange avoiding high exchange costs when moving funds between countries. Current volatility may make timing such a transaction more challenging than before, but the increased transaction charge would still compare well to bank charges for all but the smallest amounts. Monies filtered through bitcoin transactions however are increasingly being considered by governments, and there are questions about the degree of anonymity of transactions via the coin exchanges.

Ah but its a commodity: Bitcoin has been in the news this year as the finance industry and popular finance press have started to become energised about Bitcoin as a speculative commodity. Some brave souls have even spoken of it as an alternative store of value to gold. On the other hand there is also much comparison of the likely Bitcoin bubble to the Tulip bubble of the 17th century. On the downside Bitcoin has been bedevilled by scams and massive breaches of security at coin exchanges. Aside from the speculation in the day to day value and the potential bubble there are other ways to lose a good quantity of money/value in some of the side schemes that have arisen, such as Coinbase which appears to be a pyramid selling scheme for Bitcoin investments. On the less shady side there are now two institutions trading bitcoin futures as of this month (Dec 2017), these are:  Cboe Futures Exchange ( as XBT) and CME Group (as BTC). There has been some talk that a futures market will reduce the volatility in the Bitcoin price; that is yet to be seen.


My conclusion from my investigations into bitcoin is that this cryptocurrency is not going to become ‘the’ universal digital currency, but will be sustained as a store of value and probably remain traded as a commodity.  The blockchain technology that underlies the Bitcoin network is perhaps more important than Bitcoin itself, it may yet become a major influence on the future of both contractual and financial transactions. The serious finance community are more interested in other blockchain currencies. One that particularly caught my attention is Ripple, which can be used as a means of settlement between the major financial institutions.

It is likely that we are experiencing a bit of a bitcoin bubble, I think there will be a downside but have (like anyone else) no idea how big a drop or when. Ultimately I think on the other side of the bubble there will be a stable value (well as stable as any other commodity) since if treated right Bitcoin can remain a useful store of value albeit not at the current overblown price.

For a really clear explanation about the basics of blockchain I highly recommend a quick look at https://anders.com/blockchain/ where there is a demo video and a web application that lets you play with the blockchain implementation featured in the video.

Markdown Cheatsheet

As a new user to Markdown I was looking for a cheatseet. For some reason the meaning of cheatsheet has become diluted to mean a bunch of scrolling text that would print out to multiple pages with inconvenient breaks; the first 5 suggestions from Google were such. Fortunately Jeremy Stretch has produced a sane pdf cheatsheet that can be viewed or printed out as a convenient single page desktop reference.

Image of Jeremy Stretch's Markdown Cheatsheet

Jeremy’s blog PacketLife.net has a whole stack of well formatted IT cheat sheets, mostly networking related, but worth a browse including a single page Mediawiki cheatsheet.

Maryspeak a command line wrapper for MaryTTS

This project and the documentation from my blog is now hosted on GitHub the links in the post have been changed accordingly.

What is Maryspeak

I’ve been inspired by Ken Fallon via Hacker Public Radio to write maryspeak; a small java program  to make the core features of Mary Text To Speech  readily accessible as a shell command. The aim of maryspeak is to reduce the friction for Linux shell users to use MaryTTS. It accepts text input via the command line, via a file or via stdin, processes it using MaryTTS, then outputs speech via sound, to a file, or to stdout. It also allows for the selection of a voice and/or a MaryTTS server.

MaryTTS is written in Java and the UI is not transparently accessible to the Linux command line. maryspeak is a wrapper around the MaryInterface classes used by the MaryTTS Java and http clients. Because its written in Java there is no reason this cannot also be on a Windows system, but the command switches are closer to the GNU conventions.

Installing Maryspeak

This installation assumes Debian but the same principles will apply to other distros.

  • Install MaryTTS (see my previous post Marytts Voice Synthesizer How-To for Debian)
  • Download the maryspeak.jar from here or download the source to build it for yourself here
  • Copy the maryspeak.jar file to the MaryTTS library
    $ sudo cp maryspeak.jar /opt/marytts-5.1/lib
  • Create an alias to provide a nice clean usable command. In Debian add the following line to the .bash_aliases file, create the file if it does not already exist.
    alias maryspeak='java -cp "/opt/marytts-5.1/lib/*" -Dmary.base=/opt/marytts-5.1 maryspeak.Maryspeak'
  • Log out of your session and log back in to pick up the new alias, alternately you can source the .bashrc to refresh the session
    $ source ~/.bashrc

Using Maryspeak

You can use maryspeak standalone or against a MaryTTS server.

  • For the simplest demonstration of maryspeak working, it can speak an internal default phrase by using the –default parameter
  • $ maryspeak --default
  • Say what you want by just appending your text to the command. The full stop at the end is required, else for some reason the speech is too slow.
    $ maryspeak This is a short statement from your computer.
  • If you wish to process the speech on a MaryTTS server use the –host=servername parameter. If your server is on the local machine you can just use –host. It is even possible use the MaryTTS demo server with –host=mary.dfki.de
    $ maryspeak --host You will need to run the MaryTTS Server locally to hear this spoken.
  • Show the full Maryspeak usage instructions with -h or –help
    $ maryspeak --help

Further Exploration/Exploitation of MaryTTS

Maryspeak only offers a subset of the functionality of MaryTTS. Maryspeak is also not using the streaming capabilities of the MaryTTS library, so processes things in series: gather input, process the input, then output audio.

MaryTTS has a rich depth of functionality beyond that used by Maryspeak. For serious use I would recommend investigating this.

MaryTTS can be used directly from command line if required via:

$ java -cp "classpath" [properties] marytts.client.http.MaryHttpClient [inputfile]

Assuming MaryTTS is installed as per my previous post, the instructions for usage of this class can be obtained by compiling and running the following java class:

public class ShowUsage {
    public static void main(String[] args) {

For your convenience I have done this, for MaryTTS version 5.1, this is the output:

 java [properties] marytts.client.http.MaryHttpClient [inputfile]
Properties are: -Dinput.type=INPUTTYPE
 LOCALE is the language and/or the country (e.g., de, en_US);
 and AUDIOTYPE is one of AIFF, AU, WAVE, MP3, and Vorbis.
 The default values for input.type and output.type are TEXT and AUDIO,
 respectively; default locale is en_US; the default audio.type is WAVE.
inputfile must be of type input.type.
 If no inputfile is given, the program will read from standard input.
The output is written to standard output, so redirect or pipe as appropriate.

So for a quick demo try putting some text into a file test.txt (use a full stop at the end of your text or Mary speaks slowly for some reason) then run:

$ java -cp "/opt/marytts-5.1/lib/*" marytts.client.http.MaryHttpClient test.txt | aplay

Note: that the output is piped into aplay which can play back a .wav stream. If you don’t have aplay installed you can > output to a file.wav to play later.

Much more can be done using the full MaryTTS libraries within a Java program.

MaryTTS voice synthesizer How to for Debian

Mary Text To Speech logoMaryTTS is an open-source, multilingual Text-to-Speech Synthesis platform written in Java (homepage http://mary.dfki.de/). I’ve taken an interest in it after it was featured on Hacker Public Radio Episode 1599. As a Java program it should run anywhere, however here is how to get it to work on a Debian Linux machine.

Download the MaryTTS runtime package from the link on the download page:

$ cd Downloads
$ wget https://github.com/marytts/marytts/releases/download/v5.1/marytts-5.1.zip

Unzip the application to the /usr/bin directory

$ sudo unzip marytts-5.1.zip -d /opt

At this point it will not run unless the you have already installed Java 1.7 you can determine the current version of Java by executing:

$ java -version

Install the required version of Java (also add openjdk-7-jdk if you intend to do any java development):

$ sudo apt-get install openjdk-7-jre

After installing the new java runtime (jre) it will still not be the default. To set the new jre to your default use:

$ sudo update-alternatives --config java

Selection Path Priority Status
* 0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 manual mode

Press enter to keep the current choice[*], or type selection number: 2

Having selected option 2 the java version should return something similar to:

$ java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.1) (7u65-2.5.1-5~deb7u1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

The runtime package delivers the scripts necessary to run the MaryTTS Server, which can be used via a browser of the client to synthesize speech. The server can be launched with:

$ /opt/marytts-5.1/bin/marytts-server.sh

This can then be used either through a browser or via the MaryTTS Client. The browser address will be:


The MaryTTS Client, which is a Java GUI can be launched with:

$ /opt/marytts-5.1/bin/marytts-client.sh

In addition to the server and client components there is the MaryTTS Component Installer, which can be used to install additional voices and apply any available updates to the voices (the server comes with a single us female voice as a default). To launch the installer:

$ /opt/marytts-5.1/bin/marytts-component-installer.sh

Once the installer is running click [Update] to fetch the latests selection of voices. Buttons are then available to install or remove voices.

Introduction to Linux course now free online

Tux with a mortar boardThe Linux Foundation ‘Introduction to Linux’ course is now available via the edX online training system.

This course is a version of the classroom based course that has been converted to run on the edX system. This is currently the only Linux foundation course on edX, however they do have other IT courses available supplied by other partner institutions.

Introduction to Linux can be found at https://www.edx.org/course/linuxfoundationx/linuxfoundationx-lfs101x-introduction-1621.

This course is ideal for newcomers to Linux and will help fill a few gaps for those who have dabbled a bit but have not been formally trained. It is truly a beginners course though and those with any experience of linux will find themselves skipping through the earlier parts wondering if its worthwhile. However once past the adverts for Linux in the early part it proves to be useful and covers a breadth of topics giving the learner enough for them to take things further.

The course uses example distros from SUSE Centos and Ubuntu. To get the most value from the course I would recommend creating 3 virtual machines to play with as you proceed, since its useful to appreciate the differences between the distros.

You can take the course for free or you can pay for a validated certificate at the end. You also have the option of signing up for a free ‘honour’ certificate where your identity has not been validated by edX but a certificate is issued anyway.