HTTP/1.1 200 OK Server: Apache Date: Wed, 09 Dec 2015 03:29:14 GMT Content-Type: text/html; charset=utf-8 Connection: keep-alive View from Ascraeus

Desperately Seeking Swift Pointers

Foggy  7°C •   •  ~1 min read

There’s a small personal project I want to do, nothing too complex, just a mac app that consumes a JSON data structure and represents the information as a simple table view. I’d done something similar before in iOS, and there was a surfeit of decent tutorials &c available for that, so I thought it would be a similar situation. Problem is, there really isn’t anything like that amount of information easily available for Mac OS, or OS X as was.

Anything I have been able to find presumes that the JSON data is uniform, with the same fields available in each data item, that’s not the case in the data that I need to parse. More than that, there just seems to be a dearth of “here’s how to make a data table” entry level information.

This isn’t my area, although I have some limited coding skills, and I do understand swift on a general basis. I guess I’m wondering if anyone reading this can point me in the direction of a beginners level dataset for what (should) be a relatively non-complex task. I hope someone can give me some pointers here. Help me, Obi-wan Kenobi 🤓


I know its not the greatest movie ever but how was Christian Bale not even nominated for an Oscar for Empire of the Sun? Jack Nicholson was nominated for “Ironweed”, William Hurt for “Broadcast News, but Bale wasn’t? huh? How does that work?

  •  Light Rain  4.8°C •   • 

replying to a post on micro.blog

@belle A handy way to do it with Basil is to buy live ones from a store, then separate out the stems into new pots. We did that a few years ago, and were inundated with the stuff.

  •  Drizzle  8.3°C •   • 

I guess I was wrong when I wrote that LeGuin was my introduction to SF at a young age. I forgot about Terry Nation’s wonderful “Rebecca’s World.” I managed to track down a copy for my children, and they love it as much as I once did. Its messages are still relevant today.

  •  Drizzle  4.6°C •   • 


It’s difficult to describe all the ways this is stupid

stupid •  hateful •  evil •   •   • 

Corrupt kleptomaniac, star of Pee-Tape компромат, alleged President of the United States, Donnie Drumpf, is, by some distance, the stupidest person ever to have held that (or any other) elected position in world history. Even by his standards, however, this is the stupidest thing ever. In order to blind NASA’s ability to observe the earth’s Carbon Budget, he demands they defund a satellite that’s already up there.


I wanted to put my feeds on their own page, and I wanted to write a little about what these feeds represent. I ended up writing more than I expected.

  •  Windy and Mostly Cloudy  6°C •   •   • 

Sleep Over

Drizzle  4°C •  books •  review •  amreading •   •  ~3 min read

After finishing another giant doorstopping fantasy novel, I was looking for a palate cleanser. Something not too interruptive but still with a bit of science-fictional meaty content.

I chanced on H. G. Bell’s Sleep Over in some listicle or other, and thought I’d give it a shot. The premise – humanity loses the ability to sleep – was intriguing. I’ve writetn a short story based on people needing to not sleep, so I found myself in the bizarre situation of knowing some of the science behind an sf book before I read it!

What I found was… fine, I guess? The science is certainly well-executed; the societal collapse which would occur if everyone were suddenly incapable of sleep would be both sudden and inevitable. Unlike the Zombie genre where some virus slowly infects more and more people, in this book everyone is immediately effected and the crash is immediate and devastating. The book is very like Albert Brook’s World War Z, being a collection of narratives from different people relating how their immediate surroundings were impacted.

At least, that’s what H. G. Bells was trying to do, the problem is that I don’t think she ever manages to stick the landing. Put bluntly, the real charm1 of World War Z is the distinctiveness of the individual voices in the narrative (many years later, I can still ‘see’ the Russian woman, the Arab teen, the teenage girl in Alaska) but that’s almost entirely absent from Sleep Over. Other than a stray geographic reference, there’s nothing to suggest that these aren’t all happening in one small town or nation. This sameness ruins the effect of the book, I found myself skimming pages rather than reading the same repetetive plaints.

I did say almost entirely absent. There are two sections which are quite different, and these give some insight into what I think Bells was attempting in this book and mark her as a writer who could be worth watching in the future. The first is a letter written by an man who lives in England and has been attempting to get home from Frankfurt Airport, it is as well executed as anything in Brook’s book. The other is the very last section, which I won’t go into detail about, but it manages to be both intimate and mysterious, a mood which is quite different from everything else in the book. I wouldn’t be at all surprised to learn that this was the very first part of the book Bells wrote, its voice is so utterly different.

Sleep Over by H.G. Bells was published by Skyhorse Publishing just last month, and is available from many online and old-style vendors of books. I really want to say that I loved this book, as I thought there was so much potential here, but the reality is that it just doesn’t hold together. Two and a half stars is all I can reasonably assign to this, but I’ll certainly give Bells another chance in the future.


  1. and chilling effectiveness [return]

WebSub Part II: Aperture

Clear  1.9°C •   •  ~3 min read

Following on from yesterday’s Part I, today I’m talking about the process of installing Aaron Parecki’s Aperture Microsub Server. As before, this is the result of several different attempts at installation, and leaves out a lot of the handwringing. I recommended that before starting the process, the user should have created two (sub)domains and created standalone letsencrypt certificates for both. I refer to them here as watchtower. and aperture.example.com, I may end up writing up my thoughts on this process in another article.

Aperture1

Aperture is a Microsub Server. The concept of Microsub is to decouple managing subscriptions and delivering content from the presentation of that content. The Microsub server handles the actual subscription to feeds, while providing a consistent API to clients for presentation in a reader interface. As such, there is no content on a Microsub server, just a list of feeds in channels created by the user.

System Requirements

  • Web Server (I still recommend nginx
  • PHP 7.2+ with Composer
  • Redis
  • Beanstalkd
  • MariaDB10.2+ / Mysql 5.7+

Other Requirements

  • SMTP account details
  • Watchtower URL & Token

Installation

Clone the repository to a serving-location on your server. Then prepare a mysql database with a suitable user.

  • $ mysql -u root -p
  • mariaDB> CREATE DATABASE aperture;
  • mariaDB> CREATE USER ‘apertureuser’@‘localhost’ IDENTIFIED BY ‘aperturepass’;
  • mariaDB> GRANT ALL PRIVILEGES ON aperture.* to ‘apertureuser’@‘localhost’;
  • mariaDB> FLUSH PRIVILEGES;
  • mariaDB> exit;

Configuration

Copy the .env.example file to .env and then start filling in the blanks. All of these should be self explanatory; the Watchtower configurations are those which were set up when installing that service. The one change I made other than providing account details was to change the APP_ENV from local to production, this was per the laravel documentation. Ignore APP_KEY and anything to do with pusher for now.

Preparation

First install all the dependencies with composer install. Aperture is doing a lot of parsing, something I have a little recent experience of, so it isn’t surprising that the dependency list is fairly large.

Once that is done, there are two artisan commands required

  • $ php artisan migrate
  • $ php artisan generate:key

The fist one populates the tables in the aperture database, the second generates an API Key. Quickly open up .env and check that there is now a value given for APP_KEY.

Create a user account

Finally, just as with Watchtower, it is necessary to directly create a user account in sql. There are two items necessary: Your ‘identity url’ (usually your own personal domain) and your Token Provider, which you may already know as part of the process of using micropub on your website, or for logging in to the indieweb wiki.

Once that’s all finished, visit your new site and sign in.


  1. Aperture relies on a WebSub-style API to watch the Subscriptions for changes. This is currently provided by Aaron’s Watchtower which I walked through yesterday. [return]

Absolute pleasure to watch Laidlaw kicking. No bullshit, no tracking nods. He just looks where he’s going, looks at the ball and wallop. 🏴󠁧󠁢󠁳󠁣󠁴󠁿 🏉

  •  Partly Cloudy  2.8°C •   • 

Quite enjoyable sitting here watching the Winter Olympics while it pours down snow outside. ☃️

  •   • 

Omgz. Just realised that Indigenous, iOS Micropub (via share sheet) and Microsub client, also does new posts and syndication and tags!

  •  Windy and Partly Cloudy  4.9°C •   •   •   • 


WebSub Part I: Watchtower

Windy and Partly Cloudy  9.4°C •   •  ~3 min read

Excited by the possibilities offered with the new MicroSub Draft Standard, I thought I’d install Aaron Parecki’s Aperture Microsub Server and see what the present status of the protocol was like. I hope to write a reader for my own use, and to do that, I need to have a reference point. The installation process was enjoyable, if a little bewildering, but, as Aaron makes explicitly clear, This is alpha level software. Do not use.

This journal is written partly as a description of that process, and partly as a first brush at documentation. I’m sorry, therefore, if it seems a little muddled at times. It is the result of several different attempts at installation, and leaves out a lot of the handwringing.

I recommend that before starting the process, the user should have created two (sub)domains and created standalone letsencrypt certificates for both. I refer to them here as watchtower. and aperture.example.com

Watchtower

Aperture relies on a WebSub-style API to watch the Subscriptions for changes. This is currently provided by Aaron’s Watchtower which will need to be installed first.

System Requirements

  • Web Server (I recommend nginx1))
  • MariaDB10.2+ / Mysql 5.7+
  • PHP 7.2+ with Composer

Installation

Clone the repository to a serving-location on your server. The composer requirements are installed with the standard composer install command. Then prepare a mysql database with a suitable user.

  • $ mysql -u root -p
  • mariaDB> CREATE DATABASE watchtower;
  • mariaDB> CREATE USER ‘watchtoweruser’@‘localhost’ IDENTIFIED BY ‘watchtowerpass’;
  • mariaDB> GRANT ALL PRIVILEGES ON watchtower.* to ‘watchtoweruser’@‘localhost’;
  • mariaDB> FLUSH PRIVILEGES;
  • mariaDB> exit;

Configuration

In the repo under scripts is schema.sql. This needs to be imported into the watchtower database to initialise the tables.

$ mysql --user="watchtoweruser" --database="watchtower" --password="watchtowerpass" < ./schema.sql

It is also necessary to create the primary user at this time, using the address of your soon-to-be Aperture server and an api token of your own devising.

  • $ mysql -u watchtower -p
  • mariaDB> use watchtower;
  • mariaDB> INSERT INTO users (url, token, created_at) values (‘https://aperture.example.org', ‘myapitoken’, ‘2018-02-09 09:00:00’);
  • mariaBD> exit;

Watchtower as a Service

One the database is populated, Watchtower needs to be run as a persistent service, on linux boxes you can use a systemd service (from a helpful tip by Eddie Hinckle)

[Unit]
Description=watchtower worker

[Service]
WorkingDirectory=/path/to/watchtower/scripts
User=www-data
ExecStart=/path/to/php watchtower.php
Restart=always

[Install]
WantedBy=multi-user.target

Lastly, a cronjob needs to be added to execute the file scripts/cron.php on a regular basis. This is the main element of watchtower’s functionality.

*/5 * * * * /usr/bin/php /path/to/watchtower/scripts/cron.php

That’s all, folks! Thing is, this was the easy part of the process. My next post will detail getting Aperture itself up and running.


  1. I just have more succesful outcomes with nginx than the alternatives. Your mileage may vary. [return]

Match ends ☘️56 - 19🇮🇹. Some dreadfully poor defensive work by Ireland towards the end, but hard to quibble with 8 tries. 🏉

  •  Mostly Cloudy  10.4°C •   •   •   • 

☘️ 28-0 🇮🇹 at the break. Comfortable margin, bonus point secured before the break. Onwards and upwards 🏉

  •  Mostly Cloudy  10.5°C •   • 

Another Six Nations weekend! Ireland against Italy to start. Great fast start from Ireland so far, long way to go. 🏉

  •  Mostly Cloudy  10.6°C •   • 

Just read ars technica review of the new Civ VI expansion pack. There’s nothing there to make me re-evaluate this sorry excuse for a Civ Game, if anything, they’ve made it even more gamified and Clash-of-Clans. Sad chapter in a great game.

  •  Clear  4.5°C •   • 

Started Reading The Will to Battle, by Ada Palmer 📚

  •  Clear  6°C •   •   •   • 

Started Reading Sleep Over, by H. G. Bells 📚

  •  Drizzle  6.6°C •   •   •   •