Cybersofa

Yesterday I wrote about the Ex Machina soundtrack, but linked to an hour long loop of one of its tracks. Whoops. The whole soundtrack is equally great, go find it. Similar stuff on youtube lead to 9980 by CONNECT.OHM .

The Science Fiction podcast magazine I listed to, StarShipSofa has had some great CyberPunk stories recently.

  • Humans are going to become augmented, this is an inevitablity, we won't be able to resist making our selves better by merging computers and machinery into our body. "Must Supply Own Workboots" considers what happens when our jobs rely on expensive augmentations, but the augmentations become out of date.
  • “And You Shall Know Her By The Trail of Dead” is a Gibsonesque Cyber Cowboys fighting with the mob story. Really well timed with the article about the excellent CyberdeckC64

Reading: The Puzzle Palace, 802.11 Wireless Networks 2nd Edition, RFC6347!

Ex Machina

I think I really enjoyed Ex Machine , it has a great mixture of near scifi and technology. There is enough mystery and conspiracy in the film to keep me engaged, I am glad my world doesn't have so much intrigue. If it did I would probably be in some Billionaires dungeon for following the wrong lead.

The Ex Machina Soundtrack is even better than the film. It reminds me of the ambient music that plays in GTAV when you wander around with the radio off. A podcast with similar drones and loops would be an excellent thing to add to my work music mix.


Reading: The Puzzle Palace, 802.11 Wireless Networks 2nd Edition, MOONCOP!

Writing this takes a little too much effort

Writing blog posts and getting them out takes far too much effort. With a streamlined publishing system the author still has to manage to write something down.

I do not have a streamlined publishing system. Instead the tools I use sit in a balance between the ideal thing I want and the hacked together scripts I have. It has been 4 months since my last post, so you can join me on a refresher.

The web side of the software is written in nodejs using express (and python with flask, but that isn't finished). The node program starts up and parses in a configured directory containing the blogposts.

$ cd blogposts

$ git pull
Already up-to-date.

The blog posts live in git and are written in markdown. Images for the posts are kept in the images subdir. The blog posts themselves live in year folders (2014,2014, etc). The year folders are provided as configuration to the node web process as well, which implies there is work to do when the calendar flips around.

$ ls
2013   2014   2015    2016    drafts    images    newid.sh    old

$ ls 2016 
32c3.md                 glitchcards.md          unreasonable0x02.md
acuratefbsdaudio.md     lighttheme.md           unreasonable0x03.md
dso138kit.md            more-unreasonable.md    update.md
fbsdpixorg.md           notifications.md        vimcrypt.md
ffmpeggif.md            pan.md                  xxx.md
freebsdbuildflags.md    ubuntu-touch.md
freebsdrecaudio.md      unreasonable.md

blogposts have an id, which is used to sort and sequence them and is used for the post url. It was needed in earlier pieces of software I wrote and I would like it to go away. Until I move to something else I have a helper script to tell me what the next id is.

$ sh ./newid
last post id: 0089
next post id: 0090

blogposts use an email style header, each line is a key value pair separated by the first colon on the line. The header block is terminated with two newlines '\n\n'. I can type out the header, but normally I copy it from a blogpost. That's the sort of lazy person I am.

$ copy 2016/somepost.md to 2016/newpost.md
$ vim 2016/newpost.md

Title: Some post
Tags: meta
Date: 2016-01-01
Preview: Some post
Permalink: 0001

Hurr durr I am a blogpost

I am totally inciteful and full of useful information, like how nat punch
through works and the secret to everlasting life.

Now we have to edit all of the fields in the header, and content for the body of the blogpost. This is a great time to add the correct post id value we got way up top.

Title: Writing this takes a little too much effort
Tags: blog
Date: 2016-09-26
Preview: Writing this takes a little too much effort 
Permalink: 0090

Writing blogposts takes far too much effort...

Okay, we have now written the blogpost, maybe even spell checked, we can upload it to the web server.

$ git add 2016/newpost.md
$ git commit -m "blogpost"
$ git push

On the remote web server we need to pull from the master blogposts branch to get the new article we wrote.

$ ssh webserver
$ cd sites/blogposts
$ git pull

Now we have the updates we have to restart the node process. There is code to reload dynamically, but I could never get nodejs to behave here. I would like to use kqueue to watch posts dir, but when I last looked this wasn't supported on the platform.

$ cd ../register
$ forever restart server.js

Phew, there we go.

We are serving up the new blogpost from the site. This seems like a lot of work, but I think post of the component stages would be required with a static site generator.

I want to write some tools to help with schduling posts. At the moment I can write a post for future release, but I have to specify the date for release.


Reading: The Puzzle Palace, 802.11 Wireless Networks 2nd Edition.

Personal Area WiFI networks

The first step to getting my devices working for me is to set up a consistent network for them to use. To do this I am going to use a small pocket sized router that can be run from a usb battery to act as a hot spot for my devices, but also as a bridge to an internet connected wifi network.

The network I want to setup looks something like this:

                                                   +
  +---------+                                      |
  |  phone  <<-------+                             |
  +---------+        |                             |
                     |                             |
  +---------+        |  DHCP     PANWIFI           | DHCP    PUBLIC WIFI
  |  laptop <<-------+      +-----------------+    |    +-----------------+
  +---------+        |      |                 |    |    |                 |
                     +---->>>   OpenWRT       <<<----->>>                 +---->  INTERNET
  +---------+        |      |                 |    |    |                 |
  |  camera <<-------+      +-----------------+    |    +-----------------+
  +---------+        |             192.168.x.x/xx  |
                     |10.10.10.0/24                |
  +---------+        |                             |
  |  pda    <<-------+                             |
  +---------+                                      |
                                                   |
        Personal area wifi network                 |  Upstream wifi network
+--------------------------------------------------+---------------------------------------+

I struggled to find a network configuration like this in the OpenWRT wiki. I wondered for a while if it was because the network was an impossible (seemed unlikely) or if it was so obvious to not be worth documenting.

Eventually google turned up a bitbucket page with a config that worked perfectly.

I need to find a method which makes it straight forward to configure a new outgoing network. I think at the moment I am going to have to edit the wifi config files to make any changes. On the road that will be less than ideal.

What do those XXX blocks mean

From Stevens TCP/IP Illustrated Vol 2 :

We will see the comment /* XXX */ throughout Net/3. It is a warning to the
reader that the code is obscure, contains nonobvious side effects, or is
quick solution to a more difficult problem.

The second volume of that series might be one of the best networking books ever written. Not because it is a good tome to learn networking from, it is instead a guide into the heart of a real system. It is close enough today to use as a starting point for finding out where things are and a step to finding out why they are.

It is where I go when I want to find out how my current machines get bytes from an application to packets on the wire.