Archive for February, 2020

More learning + hack month

February 29, 2020

Over the last fortnight I’ve watched lecture 5 (typeclasses! huzzah!), and part of lecture 6 of the Topos institute’s course on programming with categories. It is interesting to see how the terminal object in Haskell is the same as Unit in Scala, and how it is notated. Interesting that it seems to be a form of ‘null’ or ‘none’.

I’ve been also planning my next month long sprint.

The current plan is to do a few things:

  1. Tie off the networking foundations / basic plumbing as much as I can,
  2. Make a good start on procedurally generating a map,
  3. Figure out how to create a sensible data representation of the map to be transmitted over the wire to other clients / synchronised

I will be using for OpenSimplex noise for the Godot engine, and building a custom variant on the 3.2 branch. I will also be building in the module for Voronoi triangulations further down the track.

In a bit more detail:


To start with, I’d like for clients to be able to definitely join a running session mediated by the book-keeping server.

The other key thing I’d like to do is to roundrobin select a new host if one disconnects.

Then there is a bug I’d like to fix that impacts playability.

Procedural Generation

In this, I’d like to randomly generate a level when the host creates a game, and do so from the host. Other clients should see the same level eventually, evidently – which means I need a way to represent this data and store it in the database.

Let’s descope for a MVP!

After doing networking and generation per the rough sketch above (which could likely be tied off by the close of May) I should probably largely be done with a heavily descoped proof of concept, and have something that I can demonstrate to potential users.

Next steps?

Next steps obviously involve things like selectable avatars vs world view (avataring in to a given token, or moving around the map from a world view — different cameras. I might also want to have different ViewPort in different modes for different things) and Runtime Level Editing (the ability to drag and drop tokens in the world, or other assets).

More ambitious still would be the ability for the host to select areas and action a particular procedural generation algorithm there, eg “generate a town in this area” – while still respecting / smoothing via Perlin noise gluing to the remainder of the terrain. I know that this is possible, see eg the work by Oleg Dolya on his medieval city generator, which can also be exported to a 3d model, and there is this POC in unity, and one can also do cleverer things with Voronoi tiling.

And really really ambitious would be meta-procedural generation, i.e. “given these N towns on M islands, generate a network of roads with halfway houses and ports connecting them”. Bonus points for using the new NavigationServer to allow NPC tokens such as carts and boats to travel between these locations.

Current learning progress

February 15, 2020

This week, I audited the last part of lecture 2, as well as lectures 3 and 4 of the Topos institute’s lecture series on programming with categories . I have also started lecture 5.

I’ve also purchased a couple of Udemy courses on Scala (another functional programming language which happens to be more applicable to my current working situation). I will aim to start those courses at some point … maybe not this month, but soon.

I’ve also found out (from lecture 3) that there are these things called small proof languages. Coq is an example of a thing of this type. Very heavily paraphrasing from the lecture:

[Coq is useful in its way for providing proofs of termination of a partial function, but not really practical for most purposes in programming]


[Proofs are not a first class object in Haskell (but are in Coq)]

In particular:

Coq is not unique. For instance, the redprl project (a successor to nuprl, another proof system), can be found here

Small proof languages can be thought of as a subset (subcategory?) of functional programming languages, and you can write things like web servers in them, eg

Learning month!

February 10, 2020

This month I’d like to focus on learning a few things. My target will be 2 lectures per week from the Topos institute’s programming with categories lecture series, and I will aim to work through two problem sets from this course prior to March.

Concurrently with this I intend to do some pre-work on procedural generation with Voronoi tilings / diagrams within Godot, and also continue to follow the Godot Getaway series of course videos.

As a stretch goal I’d like to try to familiarise myself with some of the Topos theory blog posts on the Azimuth blog, and also concurrently read Sheaves in Geometry and Logic, but I have a feeling that I won’t really get around to that.

Opportunities, challenges, solutions

February 1, 2020

One of the most important challenges at the moment for global civilisation is the problem of ensuring that our life support systems don’t inflict any great setbacks on us in the next 20, 50, and 100 years (2040, 2070, and 2120). I believe it is meaningful to look into these windows of time as they represent the near, far, and very far future. Therefore it makes sense that the landscape of risks and opportunities will largely be different, driven largely by changes in technology, but also in the way that technology has altered the balance of economic clout in the world.

The short is that I am optimistic that global civilisation will be able to persevere through the years ahead. We have a good story to date, and the pages being currently written auger well, I believe, for the years ahead. Let me now proceed to convince you.

Before I look ahead though, it is perhaps instructive to first look to the past.

1920 – 1970: Business as usual

Although 1930-1945 could be viewed as a series of setbacks, viewed holistically over this period the global economy grew tremendously. There were multiple developments in science and technology. Flight moved from being a curiosity to the point where humans landed on the moon and planted a flag there. A real computing machine following the schematics of Charles Babbage and Ada Lovelace was created. Motor cars became commonplace. Whitegoods such as fridges and microwaves became available. The TV was created. Radio became a commonly accepted commodity. Tremendous strides were made.

The world population also grew tremendously in this period. Times were good.

It is perhaps worth noting that the church was in decline in this period in the West, and had been for some time. This was marked by the protracted period of uncertainty that was to come. Largely speaking, at this point ‘the West’ was largely carried by the inertia of what had come before it, but there would come a time when people would recognise the value of investing once again in social capital.

1970 – 2000: A wake up call

By the 1970s, largely due to the work of Charles Keeling, it became accepted that ppm of CO2 in the atmosphere was increasing at an alarming rate. This precipitated a call to action around the world to solve the looming climate crisis.

The engine of the economy continued well in this period. Advances continued to be made. Computers were miniaturised and became consumer commodities. The world wide web, from its origins in arpanet became generalised to civilian usecases and available to all. Even in the early days of the web an explosion of activity and development presaged how useful it would be in the coming decades as an engine of economic growth and generator of social and technological capital. Mobile phones were developed. No more landlines necessary!

By the end of the 1980s the world had entered a period of peace and overall prosperity, but there was a lingering sense of foreboding regarding the Keeling Curve. Many people laid the groundwork in this period for work on sustainable technologies, like solar cells, wind, geothermal, and other similar technologies, in anticipation that R&D into these areas would be necessary to mitigate a looming climate crisis.

A large amount of progress was made, and large numbers of prototypes were created, but the technology was not yet economically viable for mass scale deployment – despite the evident need for immediate deployment.

2000 – 2020: consolidation and galvanisation

Throughout this period, there was continued rapid development across all areas of science and technology. Staggering advances in medicine (from the human genome project to sequencing for $1000 a pop) to electronics, to the nascent precursor to full nanotechnology known as reticular chemistry, to artificial intelligence, and also massive development of cultural artifacts and democratisation of the means for production through 3D prototyping software, circuit design and global supply chains available at the touch of a button, this period was tremendously transformative, and also tremendously disruptive. Book stores and video stores went out of business, driven by new models spearheaded by Amazon and Netflix. Newsagencies also closed down, driven by the pervasive spread of news media.

In terms of technologies to mitigate against system shocks, there was tremendous progress here, too. Markedly, there was so much progress, that the cost of deploying renewables became cheaper than all fossil fuel sources at some point in 2017 – an inflexion point was reached.

Many countries had not waited for things to become a no-brainer economically though, and had aggressively subsidised for the adoption of new technologies, taking into account / discounting for the potential risk of not taking action in the present. Insurance companies and key financial players also altered their posture in this period, as the cold hard reason of expected return on investment and discounted value trumped any form of political finangling. In this period, one by one, the key brokers of the global economy adjusted their portfolio positions and aligned themselves with the most profitable option going forward.

It is hard to say exactly when renewable technologies became a sure-fire way to rationally invest into, notwithstanding the fact that air to breathe is normally considered advantageous, but it was at some point during this period.

Also, within these years the church saw a marked resurgence in popularity – and surprisingly not mainly in the West, but rather in the East. This increase in social capital in the world – or at least, the recognition of its value and centrality in many ways to mitigating certain forms of civilisation setback risk – is a good and encouraging thing to see.

Even in the West though, the church has been becoming stronger, driven by increases in global poverty and fractures in the fabric of society between the haves and the have nots. Paradoxically, this evil manifestation of the contemporary economic machine – a machine that seems to have forgotten people in the drive for greater efficiencies and greater automation – has caused many to be left by the wayside in a growing gig economy and/or mid to long term unemployed, and hence has caused people to start to return to the church as a source of moral and spiritual guidance. I can see this trend continuing in the decades ahead.

2020 – 2040: mass scale deployment and mitigation

It seems reasonable to expect that this period should see continued advances in various areas. One might expect exploitation of space to start to become economical. This will create new opportunities. General artificial intelligence, or some precursor to it, should likely be created during this period. Reticular chemistry will mature and products of it will start to become industrialised. Quantum computers – powerful quantum computers – will become available. Room temperature superconductivity may become available. Self driving cars running on fuel cells or electricity will dominate the roads. The remaining carbon dioxide emitters in industry, power, and transport will be addressed (such as in the production of concrete and steel).

Massive deployment of renewable technologies will continue. Costs will continue to go down, and efficiencies will continue to increase. By 2040, moreover, new technologies such as nuclear fusion should be available too. However I would anticipate that by 2040 wind, solar, geothermal, biomass, tidal and hydroelectric will be generating a large chunk of the world’s power needs. I also anticipate that there will be a lot more microgeneration of electricity.

Advances in food fabrication, such as protein scaffolding techniques, will continue in this period too – potentially reducing the need to set aside large amounts of land to grow cattle, and thereby providing another avenue to offsetting emissions.

I would also hope that the church would continue to grow and people would once again embrace it as a civilisation enabling – and protecting – cultural artifact.

2040 – 2070: crisis averted

By this period, products of reticular chemistry and other forms of nanotechnology should become available to start to do things like mop up CO2 and clean up other contaminants left around from earlier periods. General artificial intelligence will be solved. The transhumanists will have the cyborg option if they want to take it. Fusion power will be solved and people will be able to start mass deploying fusion power plants.

The world will have warmed by 1.5 degrees, faster than people thought. This will have caused hundreds of billions of dollars – if not trillions (in 2020 terms) worth of damage to the world economy. There will have been tremendous loss of biodiversity globally. But people will slog through and do the work that needs to be done. The church will help and be there for those who have suffered, as will other multinational aid organisations.

Space, at least in our solar system, will be fully opened up to economic exploitation and expansion. A base will be established on Mars. Multiple bases will be established on the moon. The asteroid belt will be exploited for rare earth metals. Outposts will be created on the moons of Jupiter and Saturn. People will be starting to look more seriously towards the stars, and pondering technological ways of getting there.

By and large, by the end of this period, mopping up the damage caused since the industrial revolution – but a necessary damage, for the development of a space-faring civilisation – will be well underway. CO2 levels will plateau, and then begin to drop – slowly at first, and then more markedly, as the scrubbers do their work of reversing our 20th and 21st century impromptu terraforming experiment. We will have solved the grand challenge of the 21st century – ensuring that our life support systems remain nominal.

2070 – 2120: maturity

In this period of time, it is possible that although we may not yet become an interstellar civilisation, we may lay the groundwork in order to do so, in the very very far future (2120 – 2200). In particular, we may learn how to develop systems capable of travelling between stellar systems at extreme rapidity – even if we don’t build and deploy them during this period.

We may make overt contact – or have overt contact overtures made from, and accepted – with alien civilisations.

In terms of custodianship of the earth, in many nations, it is likely that people will rewild the land, as the civilisation starts to become a machine civilisation. This will not likely happen in this period, because it still seems a bit too early. However, there will likely be early adopters in this period, with many people decided to “go full cyborg” and “may not even choose to avatar”. In particular, by the end of this period, many citizens – though maybe only a sizeable minority – may only have an existence in some futuristic form of server farm.

2120 – 2200: far future

Okay, maybe one more future-spective.

As this period progresses, I see that these server farms (or whatever term people choose to call them) may become the new cities. The old cities will be gradually abandoned, and maybe digital copies may be created, with the wild allowed to reclaim what was once the massive sprawl of the 20th and 21st century civilisations. Major cultural artifacts will be preserved in their physical locations, of course, and it may amuse citizens to avatar and liaise in the great cities of the world. However the true civilisation will live, work and play within the machine civilisation, which will exist within “city memory” type computing structures. As such, the demands for land for agriculture and urban sprawl will not be present. People will allow the wild to reclaim much of what was taken – but not all, for, as mentioned, it will be of value to people to be able to experience an idealised form of bucolic life on “the old earth”, or LARP in an arbitrary and contrived way in various places.

By 2200 I would be disappointed if people had not developed and deployed the means to reach the nearest stars, and with rapidity. I would also anticipate people to have developed weirder technologies still (pocket universes, etc). This is why thinking about the far future is probably largely not meaningful. But by 2200 I think people will largely still be doing people-ish things. The challenges of the late 20th and the 21st century will have been forgotten though – civilisation will have moved forward, and will be preoccupied with other concerns.