Susan updated to version 1.1.0.38

There's a new update to Susan - the ASCII-based personal assistant for Windows.

She now has a timer feature.  Simply start the timer with the 'start' command.  The timer will count up in seconds, minutes and hours.



Older versions of Susan will prompt you to download the new version.  If you are new to Susan, and you want an ASCII-based personal assistant app then follow the links below.

Go to the main Susan page now.
Find other Susan-related posts.

Noteworthy note apps for #Windows

When it comes to taking notes on Windows, OneNote is the king, however I have come across a couple of apps recently that are well worth looking at if you find yourself regularly using your devices to jot down memos or ideas.

The first is Microsoft's own OneNote competitor - Plumbago, and the second is Action Note.

Plumbago

With Plumbago (let's ignore the stupid name for now) Microsoft declare that it 'is time to retire pen and paper'.  I wholly agree with the sentiment, however OneNote is still the winner.


Making notes on my Surface Book

Plumbago features hand-writing smoothing which admittedly does little for my horrendous scrawl.  You can create limitless notebooks and each features 25 sheets of paper.  I am not as yet sure how you create more sheets of paper should you need them.  It does however allow your notes and drawings to span several pages.

A little ditty I wrote.

There are several different types of paper, unfortunately, only one type may be applied to one notebook at a time.  You get several different types of lined paper, squared paper, musical notation and even some for fashion designers.  I probably wont need this.  There is at present no isometric paper - hexagonal paper would be a real bonus.  You also can not rotate the paper as you write as you can with real paper and some good drawing apps such as Autodesk Sketchbook.

Syncing across devices is rather strange.  My notebooks sync happily between my surface and my desktop, however my Samgsung slate tablet seems to have its own local notebooks and wont sync with the others.  There seems to be no settings to decide where your saved notebooks are stored.

Furthermore, there is no support for Windows phone.

At present, despite some nice features, Plumbago is not as good OneNote when it comes to being a reliable note-taking app, nor does it beat a huge number of drawing apps available for Windows.

Action Note

For taking quick notes, there seems to be no better app than Action Note.  Action Note integrates with your action center allowing for fast access to your notes.  In this respect it simply does beat OneNote, which can take some time to load up and then you need to navigate through your tree of OneNote folders.

Action Note on my awesome Lumia 950 running in my action center allowing for very fast note taking.

Action Note on my Surface Book.

Action Note (Pro version) does everything you would expect or a modern Windows app.  It syncs between your Windows devices.  There is the option to add files or screenshots from other apps.  You can pin notes to your desktop as live tiles.  The interface has three themes - the 'dark theme' shown in these images.  One my Lumia 950 there is support for voice-to-text and read aloud your notes. You can also scan QR codes and keep their contents or links for later.

Overall this is a really good app that I will use regularly. Plus one geek experience point for Benjamin Sautermeister.

Still awake? 
 Check out some other cool apps from other developers
or jump to a random article.

Some improvements to my chatbot

Today I made some improvements to 'Mac' my chatbot engine. It is still too early to release yet, but here are the new features:

The chat history is in reverse order. The latest response is at the top.

1. Mac can now remember the values of variables stored within the user's input. In the above example, it can match the variable <<name>> from the user's input "Some call me Tim" and "My name is Bob".

2. Mac has can have two different responses to user input depending on whether a condition evaluates as true.  Conditions are expressed in the format ( [conditon] AND [condtion] ... ) OR ([condition] AND [condition ] ... ) .... So, for example if you tell him your name is something different to what he thinks, you get a different response.

Well, that's it for now, but stay tuned for more chatbot developments - and a live version plus code for you to play with - coming soon!

Sharing a usb drive to chromebook, raspberry pi, Android and Windows 10

I noticed that my new home router comes with a USB port. I figured that it was possible to connect an external hard-drive and use my router as a home file server. This means that I will be able to share files between my Chromebook, Raspberry Pi, Android tablet and Windows machines.


Here are the steps I used by device.

First steps
Plug in your usb drive and check the admin settings on your home hub.  I get there through the default address of my router which is 192.168.1.254 and yours is likely to be similar.  It is a good opportunity to change the admin password at this stage.

In Windows 10
Access to the shared network drive is as easy as opening the file explorer and typing the address into the address bar eg //192.168.1.254

Your files are now ready to be accessed on all your devices.


On a Chromebook.
It would be useful to access my PC files on my Chromebook as well.  I used File System for Windows.


Your shared files are now available in the ChromeOS File app.

On Raspberry Pi under Raspbian

1. You need to mount the network drive into the Raspbian file system.  To do this you need to have cifs-utils installed.  My Raspberry Pi 2 came with this pre-installed.  You can check whether it exists or not by running the following command: dpkg -s cifs-utils

2. Should you need it, you can install cifs using the command sudo apt-get install cifs-utils 

3. Next create a directory on your pi for where you want to mount the network drive: sudo mkdir -p /media/network/public

4. You need to edit the etc/fstab file in order to mount the network drive. You may need to give yourself permission to do this, so navigate to your /etc folder and type chown pi: fstab (where pi is your username).

5. Now open the etc/fstab file in your text editor and add the following single line:
   //192.168.1.254/usb1 /media/network/public cifs defaults,rw,username=pi,password=yourpassword,domain=domain 0 0

  Note that the first part is //IP ADDRESS OF ROUTER/directory name of network folder
 If your network folder has any spaces in the name, eg "My Documents", then replace the spaces with \040, eg My\040Documents.
 The second part is the path to the folder you created in part 3.
 You will need to put in your own username and password .

6. Now mount the drive using sudo mount -a


Android

There is no single file explorer app for Android, but many of them allow you to access network drives. I use ES file explorer which has a nice 'search' feature which will find your network drive in a few seconds. You can also pin your network drive to your desktop for easy access.

Accessing your network drive in Android

Windows Phone

I have downloaded Metro File Explorer to access my home network files on my Lumia 950.


That's all for now (I've run out of devices to try). It's time to backup to my file server and tidy up a bit.

It's alive!

I have been working on Mac, my JavaScript chatbot for a couple of days.  I won't post it online just yet as it is still in development.

The interface with no CSS.  The previous conversation is stacked up in reverse order.

The JSON file for one input pattern.
The bot works as follows:

The user types some text into the edit box and the system tries to match this with a script object stored in the JSON file.  For each script, if the current conversation subject matches one for the script, it will check whether the user's input matches one of the regular expressions in the 'pattern' array.  If there is a match it will check whether the condition has been met.  If the condition is true it will respond with the data in "whenTrue", otherwise if the condition is false, or if there is no condition, the "whenFalse" block will execute.  In both cases, a random response from the "match" field will be returned.  The system will silently set variables in the 'think' list and set the special conversation variable to the new conversation topic in "setSubject".

The result of the script above is that Mac will respond to some standard greetings "Hi", "Hello", "Hullo", etc.  Should the user type "Hi" again, Mac will have a different response "Hello again".

That's all for now because I have to go, but I'll keep on working and publish the code shortly.

I'm through with Pandorabots

After a brief fling with Pandorabots and AIML I have decided that the affair is over.

My reasons are that the AIML language is a little primitive and I can do better by coding a chat bot myself. Coding the engine and the chat bot itself seems much more exciting as a project to me.

Secondly, I can host as many chat bots as I want on my own domain (www.superdecadegames.com) for free.

One aspect of AIML that I can do better with is the <vrai> substitutions which require an awful lot of copying and pasting of pre-existing code and can cause problems when the thing you are substituting changes or does not exist.  The <that> construction makes code look a little messy overall and, as I am not afraid to get my hands dirty with some regular expressions, I should be able to produce something a little more impressive.

Well, work begins tonight.

Some of these should help.

Goodbye, Mac.  We hardly knew you!

I am slowly getting somewhere with my chatbot

So today I reworked most of my chatbot code so that he would accept multiple greetings ("Hi", "Hullo", "Hello" etc).  Also, I wanted Mac to respond with a friendly "what is your name?" and have the chatbot remember what to call you in the future.


This is achieved through the use of AIML <srai> recursion and setting context with <that>.

  • This code deals with matching multiple ways of saying 'Hi'.  What did I miss out?


<category><pattern>HI</pattern><template>Hullo. What is your name?</template></category>
<category><pattern>HI ^</pattern><template><srai>HI</srai></template></category>
<category><pattern>HELLO ^</pattern><template><srai>HI</srai></template></category>
<category><pattern>HULLO ^</pattern><template><srai>HI</srai></template></category>
<category><pattern>HEY ^</pattern><template><srai>HI</srai></template></category>
<category><pattern>HOWDY ^</pattern><template><srai>HI</srai></template></category>
<category><pattern>SUP ^</pattern><template><srai>HI</srai></template></category>

  • This code deals with the user replying to Mac's question "What is your name?"  Whatever is typed is stored in a variable called 'name' for later.

<category><pattern>*</pattern><that>^ WHAT IS YOUR NAME</that>
<template>It is nice to meet you <set name="name"><star/></set>.</template></category>
<category><pattern>MY NAME IS *</pattern><that>^ WHAT IS YOUR NAME</that>
<template>It is nice to meet you <set name="name"><star/></set>.</template></category>

  • This code deals with the user checking whether Mac has indeed remembered their name.
<category><pattern>WHAT IS MY NAME</pattern><template>You are <get name="name"/>.</template></category>
<category><pattern>WHO AM I</pattern><template><srai>WHAT IS MY NAME</srai></template></category>

Play chess in Facebook chat/messenger

I am loving this feature at the moment.  You can play chess with your Facebook buddies in a chat dialogue.

The chess feature is a hidden game that seemingly Facebook didn't announce but was instead discovered on a chess subreddit r/chess last December.



There is of course a chess app for Facebook by the excellent chess.com, which is acclaimed for being an excellent chess site, but this one might just get your buddies playing with you.

There is no point-and-click interface that you might be used to, instead you interact using commands.

Start a new game using @fbchess play.

Get help using @fbchess help.

Use chess notation to make a move. For example: @fbchess Pe4 moves your pawn to e4.

+1 Geek experience point to anyone who finishes a game.

I'm building a chat bot

Following my work on Susan, the ASCII personal assistant, I have become interested in chatbots. Today I set up an account with pandorabots and began to create my first bot - Mac, a ten year old cat from England.

It is early days yet.

It is still early days for Mac. Pandorabots use AIML (Artificial Intelligence Markup Language) for defining the responses to the human's input. I am still reading through the tutorial. There are libraries of responses you can import, however I want Mac to be unique, so I am coding him from scratch. As such, he can only respond to a few questions, but hopefully I will stay interested in the project and keep building him.

If you want to talk to Mac, then you will need a pandorabots account. There is an API through which I will eventually publish Mac, but for now I'll keep you posted on developments in this blog.

Mac, helping me code

I really like this Windows 10 feature

Recently some relatives made a long flight.  Naturally I wanted to track the progress of this flight (should be called 'mission').

At first I used flight radar. I found this very difficult to track an individual flight because although I knew the flight code (used by the airline operators), I didn't know the callsign code (used by air traffic control). I am not even sure whether I have got this distinction correct.

In some desperation I then typed the flight number into Cortana and was delighted to discover that she had it all covered.


Switching to my Lumia 950, the details were there in a nice Cortana card too.  Go Microsoft!

Next steps - Implement this feature in gorgeous ASCII for Susan.

Susan updated to 1.1.0.34

If you feel the need to be amused by an ASCII version of Cortana, then do click below to get Susan for your Windows PC.

I've updated Susan - the command line personal assistant app to the current version (1.1.0.34).

Susan - now with awesome ASCII loading screen.

What's new:
  • 'Susan' banner ascii art added on load screen.
  • Backwards compatibility added.
  • User defined variables now appear in the auto-suggestions.
  • Fixed bug where date appears as '01st of...'
  • Assignments can be made using variables.
  • Fixed bug where variables could not be the first term of an expression.
  • 'exec' function can take variables as a parameter eg exec <$myvar>
  • Fixed bug when displaying the '2nd' day of the month.
  • Goodbye message on closing.
  • 'tell me a joke' command added.
I've updated Susan - the command line personal assistant app to the current version (1.1.0.34).


Changing where Susan looks for the news

Unless you live in the UK, you will probably want to change where Susan looks for your news and weather information.  Susan uses RSS feeds to get news and weather.  By default these point to the BBC news feeds.  To change things, first find the RSS for the news or weather service you want.

Here is the RSS feed for BBC business news:

http://feeds.bbci.co.uk/news/business/rss.xml


To set the business news as your main news feed, type:

setNewsfeed http://feeds.bbci.co.uk/news/business/rss.xml


Type 'rerun' to check everything went as planned. You should now be getting the news from your chosen feed.

Changing the Weather Feed.

First find the RSS weather feed for your area.

Second use the setWeatherfeed command as described above for the news feed.  Type 'rerun' or 'weather' to check that everything is as expected.

Changing the primary feed.

The primary feed is an additional news feed that you can set to any RSS feed you like. Susan will pull items from this feed onto here display at random intervals whenever she is bored.

Set the primary feed using the setPrimaryfeed command, followed by the RSS feed, as described above for the news feeds.


Still reading?  
See all Susan related posts.  
You might also like - the Reverse Polish Notation Calculator.

Doing maths with Susan

Susan, the command line personal assistant, can perform calculations for you.  Simply type your expression followed by the all important equals sign (=).

For example:

3 + 4 =

Will output the answer '7'.


You can set variables using the equals sign as an assignment.

For example:

mass = 45.3

Then try:

force = 0.039

We can now use our variables in expressions:

force / mass =


Susan will keep your variables in memory so they will be available the next time you load her.

You might want to make expressions that are dependent on other variables.  For example, the acceleration is a function of mass and force.  Changing one of these will affect the acceleration.  To do this, use the 'relative assignment' operator (:=).

For example:


accel := force / mass


We can now make changes to both 'force' and 'mass' and use the updated 'accel' in other expressions:


3 * accel =

For a full list of built-in mathematical expressions, see the online help - simply type 'help' into Susan to load this up (or press F1).

Still with us?  
See all Susan related posts.  
You might also like - the Reverse Polish Notation Calculator.

Label