Day 0

It starts!

Flight worked out well, the delay I had setting off from Aberdeen shortened my transfer, but it didn't hold anything up. I made it into the congress center around half three and was too early to get a ticket.

Rest of the day went into setting up blinkenlights and other important projects. Tomorrow I will explore the place and see what is going on.

Outbound

I think the guy that brought my breakfast told me off for the table I was using. He said something, thankfully my amazing Shure SE215 isolating earphones blocked all of the sound out. I have a reason to be ignorant. I am sitting in a bar place, but I bought food so I could sit at a sensible height and type.

I figure the main purpose of airport seating is to stop you complaining and to keep you awake. The lack of somewhere to sit your laptop and type like a normal human is infuriating.

This coffee isn't even good.

ABZ->LHR->HAM


Reading: Nemesis Games, Or Nothing

And by nothing I mean I don't think I will get any more reading done this year.

Bags packed, Leaving

Weather is getting cold, the storms have been beating the house.

Time to leave for somewhere, well somewhere not warmer, just different. Packing for congress was made much harder by ridiculous shipping regulations, an extra couple of bottles in my bag are worth it for the fun of a buckfast party night.

The pico projector was one of the first victims in the packing war, having spent more time with this projector I don't think it is going to be a big loss. I still have the udp panel and the slowtv project, with the lightning talk I probably have enough details to worry about at congress..


Reading: Nemesis Games

Feed Testing

For development of the RSS IRC bot I need an RSS feed that updates frequently, I could subscribe to a HN feed or something from reddit. I did a quick search for something high speed and found a SO thread][1] with exactly what I need.

The linked heroku app can provide a feed updating at any interval you want. Turns out this is great for soak testing code over night.


Reading: Nemesis Games

RSS Feed Reader

For a long while I have wanted a bot to sit in irc channels spitting out updates on rss feeds. I Think I have finally found all the pieces I need to write a bot in the way I like.

I have written up a really simple IRC client on top of asyncio, but it needs much more testing than a day of dev. I want to have ssl running before I try and run the bot against anything.

The RSS code is much simplier:

import aiohttp
import asyncio
import async_timeout
import feedparser

import pprint

INTERVAL = 60

async def fetch(session, url):
    with async_timeout.timeout(10):
        async with session.get(url) as response:
            return await response.text()

async def fetchfeeds(loop, feedurls, ircsock):
    last_entry = None

    feeds = []

    for url in feedurls:
        feeds.append({'url':url, 'last':""})

    while True:
        for feed in feeds:
            async with aiohttp.ClientSession(loop=loop) as session:
                html = await fetch(session, feed['url'])
                rss = feedparser.parse(html)
                if feed['last']:
                    if feed['last']['title'] != rss['entries'][0]['title'] and feed['last']['link'] != rss['entries'][0]['link']:
                        print("new entry")
                        feed['last'] = rss['entries'][0]

                        print("MSG {}".format(feed['last']['title']))
                        print("MSG {}".format(feed['last']['link']))
                else:
                    feed['last'] = rss['entries'][0]

        await asyncio.sleep(INTERVAL)

loop = asyncio.get_event_loop()
loop.run_until_complete(fetchfeeds(loop, ['https://n-o-d-e.net/rss/rss.xml',
    "http://localhost:8000/rss.xml"], None))

This is really only a proof of concept, there needs to be much more error handling before I would expect this to run for long.


Reading: Nemesis Games