SupportBot is a Telegram bot for connecting a pool of Support Providers with users needing support and anonymously routing messages between them. It’s written in .NET Core 3.1 and uses the great Telegram.Bot library.

You can find the GitHub here.


TinySM – a small Finite State Machine library

As anyone who has attempted to implement an FSM in code can testify, doing so quickly results in an absolute nightmare of spaghetti if statements.

TinyFSM is a personal project which seeks to create a small and flexible FSM implementation in the .Net Standard framework.



Rent Based Transitory Ownership — A Blueprint For Just Rent

Originally published on Medium.

As income inequality increases, one mechanism for the movement of wealth from the general population to an increasingly insular property-owning class is through rent of residential property. While it cannot be said that landlords do not have some responsibilities to their tenants in most countries, the power relationship between landlord and tenant remains unbalanced. It is solely the landlord who decides if a lease should remain or expire, regardless of how many years the tenant has spent in the home. The tenants labor in maintaining and protecting the home is unrewarded, and we must rely on punitive incentives such as bonds to encourage responsible tenancy.

Many Marxists espouse the necessity of eliminating this form of rent-seeking private property, but few propose tangible ideas that could replace them beyond vague statements about government-run allocation programs. We reject this as being excessively rooted in bureaucracy, inefficient in allocation and overly centralised. Land allocation is fundamentally unsuitable to central control, due to its heterogeneous properties. Simply put, every piece of land is distinct from every other, and so determining the real value requires an enormous amount of information. A centralized system simply cannot compete with an emergent market in terms of this ability to gather large amounts of contextual information.

The goals of any theoretical system should be to reduce the appeal of personal residential property as a speculative investment asset, efficiently allocate housing, remove rent-seeking power-relationships where tenants are unrewarded for their contributions, and create systems in which ownership can smoothly transition without needing large amounts of liquidity. Fundamentally, a social mechanism of ownership must result in those who use the property being the owners, proportional to their use. We also want to peacefully redistribute residential private property from landlords to social ownership through a market mechanism, instead of state coercion.

We propose a mechanism that spreads property wealth back into the rent-paying population in a fair and just way, called Rent Based Transitory Ownership (RBTO). This system can be summarised in the statement “all rent is equity”. Every time a tenant pays rent to the owners, they purchase an amount of newly-created equity in all future payments, calculated as a percentage of all existing equity. Rent payments are refunded to the current tenant based on their equity in proportion to all existing equity, times the price of that equity.

By calculating new equity in this way, we create an inflation effect that means that equity will depreciate in value. This gives more power to current and recent tenants. This equity is not tradeable, in a similar way to pension schemes today, which is intended to limit capital accumulation. After some amount of time this equity will be destroyed to place an upper hard limit on the influence that previous tenants can hold. Simply put, this means that a tenant’s rent will decrease over time. It also means that renting a property out for long enough will mean that the majority share of equity will transition to the current tenant. The house is then managed democratically, with equity forming a voting currency.

As there is a direct relationship between property value and rent, rent must therefore be derived from that value. But how do we fairly and accurately determine the value of property? The idea of a Common Ownership Self-Assessed Tax (COST) is appealing[1], in that it combines positive and negative incentives to encourage equity holders to accurately value their property. Each year, equity holders self-evaluate the total value of the property. Crucially, a significant land tax is also charged on this total value that is paid proportionally by the equity pool. The equity pool is incentivised to price upwards to receive the maximum amount of rent, but price downwards to reduce the upfront costs of this land tax. This land tax could replace most property taxes otherwise paid. Current monthly rent is then calculated as a percentage of this total value. We also propose that these valuations and rents be made public to decrease the information asymmetry between tenant and equity holders.

What does this change about our relation to rent? Firstly, it means that all rent is an investment. This would provide a solid income base for much of the population. It also provides a strong positive incentive to take good care of the property, for medium and long term renters, as keeping it in good condition means more income later on. In a transitory implementation period, this would reduce the need for high bond amounts and free up billions of dollars for spending. This system would also reduce the need for a bank to act as a middleman. Banks currently provide liquidity for changing between atomic owners, but with a system of transitory ownership there’s no need for large amounts of capital and debt to get involved. It also allows for a smooth transition between short and medium term renting and long term habitation, and vice versa. And finally, most importantly, it lessens the capital accumulation properties of our current system of property rental.

What would this managing democratic structure look like? Fundamentally the organisation only needs to perform a few tasks, such as keeping the house in good condition, evicting bad tenants, finding new ones, and deciding to sell the property on. How is money democratically allocated to these tasks? Some, like paying a property manager, would be predictable monthly expenses that could come from the monthly rent contribution as they do indirectly today. However, some of these costs cannot be directly funded from equity, as the distribution timeline would be too slow to react to urgent necessary expenses (e.g. a pipe bursting). We propose that rent can be stored for a full rental period before being released to the equity owners, and this rental pool can act as funding for any urgent repairs. Not only must this organisation be able to perform these tasks, but it must also be limited from performing actions outside its jurisdiction that impinge on the tenant’s rights. Current laws around property-management, for instance the requirement to provide notice before inspection, provide a good foundation for the constitutional restrictions of these organisations.

Proposals for non-necessary repairs, or repairs that exceed the rental pool, can be put forward by any equity-holder by locking up a certain amount of equity proportional to the cost of the proposal. The proposal is then then voted on by everyone, with successful proposals put into action. But how do we incentivise equity holders to remain invested and interested in a property, and put forward necessary capital for maintenance? Some may be content to simply let the tenant stew and rely on land speculation to make up the costs of not providing necessary repairs. To counter this, each proposal is budgeted to a certain value, and each equity owner given the chance to provide a proportional contribution. If the proposal is not sufficiently funded by all equity holders, then the proposal is opened for further funding by all. If the proposal is then funded and completed, with one or more equity holders disproportionately providing value, then in the next equity round those who did not back the proposal lose an amount of equity proportional to the amount they did not contribute. This equity is destroyed and not redistributed. The effect of this is encouraging all equity holders to wield their power within the organisation, or see their revenue stream degrade.

At some point, a buyer might come along with a buyout proposal that would change the use of the land, for instance turning it into a commercial property or redevelopment. COST supposes an involuntary sale at the aforementioned self-assessed price, and such a system might be beneficial for public acquisition for government projects such as high-speed rail. However, for private transfer the current tenant would have the controlling vote for this transfer as a basic right of tenancy.

This scheme could be easily implemented in state-managed housing today, allowing vulnerable members of society to build predictable revenue streams and perhaps eventually own their rental homes. The scheme could then be rolled out to general residential areas through tax incentives that make RBTO more profitable in the short term — though by design it will be less profitable in the long term to any investor. It is likely then that this tax incentive will have to be significant to make RBTO the more profitable structure. Transition from traditional renting structures is simple, with current landlords being given some arbitrary number of equity that represents their property valuation spread over the term of the RBTO, and acting as the majority equity owner at first until tenancy causes ownership to transition.

[1] Radical Markets: Uprooting Capitalism and Democracy for a Just Society, Eric A. Posner & E. Glen Weyl, 2018

Music Visualisation Programming

More VJ Work

Music Visualisation Programming

Various VJ Experiments

Something I’ve fallen in love with over the past few months is making graphics and software that react to music. I hope to do it much more in the future – performing a visualisation live with a DJ is one of the highlights of this year!



The following is a stageplay I wrote in my final year of high school. I am posting it here for the sake of posterity. The standalone can be found here.


God Only Wise

The following is a story I wrote in my final year of high school. I am posting it here for the sake of posterity. The standalone can be found here.


Ethereum Is Going To Eat Silicon Valley Alive. Here’s Why.

Originally published on Medium.

Many of the current dominators of technological business perform the same task. They serve as a trusted third party in a marketplace of providers and consumers. The trusted company enforces rules in the community, like how Facebook bans accounts that act outside the terms of service. Usually the same company that enforces the rules owns the service. They act as a trusted arbiter for disputes within the market. Usually, to help everything run smoothly, they provide a reputation system for both consumer and producer that enforces a level of good behaviour.

We can see at a glance how many Silicon Valley heavy-hitters act this way.

AirBnB defines a marketplace of short term room/house/apartment rentals. It is currently worth $30 billion USD and takes a 6-12% fee from consumer bookings, with a 3% service fee for providers..

  • It defines a ruleset where consumers pay on a daily basis, producers can charge certain fees.
  • It provides a website, app and backend that stores these rentals, and allows for consumer search and interaction with those rentals. There is no way to interact with AirBnB via API or as a service, and in this sense it is a closed system.
  • Disputes can arise in situations like the consumer damaging or breaking the rules of the rental. The company holds the user’s funds until the stay is done, in case arbitration is required. In the case of disputes where a refund is found to be warranted, the company provides the refund and penalises the provider.
  • Both consumer and provider can review and provide feedback on the other

Uber definies a marketplace of ride-sharing, where car-owners sell transportation to people wanting to get around an area. It is currently worth $70 billion USD and takes 25% of the fee paid from consumer to producer.

  • It defines a ruleset where consumers pay on a hybrid distance/time basis, with generally fixed rates. These fixed rates have a form of automated collective bargaining (surge pricing). They also manage a consumer/producer reputation system.
  • It provides an app for both producers and consumers, and a backend for connecting the two. This backend is a complex scheduling/resource allocation system that we can only really speculate on the design on. I would speculate that the system seeks a fair allocation of rider to car, in that it seeks to minimise user cost and time, while maximising provider utilisation.
  • Consumers can generally dispute through Uber if they believe their trip to have been poorly executed, for instance if the provider takes an extremely sub-optimal route, or if either party acts in an objectionable way. Uber holds onto funds to be able to act as an arbitrator in consumer-against-producer arbitrage, and punishes consumers in the reputation system for their transgressions (e.g. their card declining, insulting a driver).
  • It provides a reputation system for both driver and rider. Low reputation means that agents won’t be prioritised by the scheduling system.

I would challenge the reader to apply the same thinking to a wide range of existing digital titans – eBay, Steam, Amazon, UberEats, and many more. This is a compelling lens through which to view these companies, because it suggests that a change to how these three pillars of modern technological innovation are achieved could be extremely disruptive – especially if that change allows for the new entities that emerge to out-compete the existing services.

So, thinking about the company structures discussed above, we should ask ourselves where the juicy inefficiencies lie. We have a company defining a market, but how efficient is that market? Well, not very. These markets are restricted by a central authority which harnesses it for its own benefit. Solvable market inefficiencies, as much of the history of Silicon Valley style disruption has shown, is a surefire recipe for explosive adoption.

Firstly, most of these services are charging absolutely exorbitant fees for transactions within the market. A market that was able to do away with these fees would immediately be much cheaper than the existing competitors. The price of the trusted middleman is a substantial weight dragging down market efficiency, as the middle-man consumes a portion of the value for itself.

Secondly, there are many sub-markets within the wider market that are non-competitive, and therefore run sub-optimally. For instance, generally the interfaces to these markets are monopolistic. Uber does not let you roll your own Uber application – you must use theirs. But while the interface does have value, it is fundamentally detached from the value of the service itself. Interface monopolies often allows market definers to act unethically by gatekeeping access to the market. If the Uber app started tracking all of your movements tomorrow, and selling that information to advertisers, you would have no real recourse that wouldn’t deny you access to that market. Alternatively, in a parallel universe where if I disagreed with the ethics of Uber’s interface, I could just make and distribute my own, it creates an entirely new and self-contained space for competition. The same logic can be applied to many sub-tasks within the markets. For instance, the sub-task of generating a navigation route for your Uber to follow is something best left to a trusted oracle service, but the selection and payment of this service could feasibly be based on a system where they bid for work and receive some small fraction of the final price.

Distributed blockchain-based computing platforms, such as Ethereum, are poised to become this disruptive force. Ethereum has a significant first-mover advantage in this area, but really this applies to any platform that can do what Ethereum does. This is a vision of an optimistic future where scaling issues have by-and-large been solved through some means or another, and so we will be assuming that both latency and fees for transactions within the network are reasonable.

Smart contracts allow us to create self-governing marketplaces that remove many of the inefficiencies discussed above. Previously a market being well defined require a central authority that is almost always detrimental to its efficiency. Now, we can define completely transparent markets where the rules are clear and unbreakable. Best of all, nobody owns these markets. They will be entirely public spaces, as this is the most efficient option. Markets that are created, owned, and used for wealth extraction will fundamentally be less competitive than public markets, and so will eventually fall from grace due to this middleman inefficiency. This form of new marketplace has been called a Distributed Platform Cooperative. These cooperatives are related to the idea of a Distributed Autonomous Organisation, although they are not synonymous.

Of course, there may be many business cases where a completely decentralized marketplace isn’t the best option. But for many-to-many digital marketplaces, where the centralized power only fulfils the duties mentioned above, it seems like a compelling possibility that they could remove a now useless weight on the system.

Competitive sub-markets also offer the possibility of reducing redundancy in overlapping systems. For instance, do we really need each reputation systems for each marketplace, as we have currently? Users have their eBay rating, their Uber rating, their AirBnB rating, all connected to a concept of their trustworthiness, but all disconnected from each other. Imagine, alternatively, if we connected reputation to identities that can be carried across markets. This is not to say having one reputation system for all users, but rather that a single user could use one reputation system across multiple services. Having reputation transfer across markets means that new users to markets can show trustworthiness more easily. Instead of requiring some kind of gating mechanism (for instance, Steam requires new users to spend $10 or more before unlocking a range of features) a user can just present evidence from a different market. This means that a user can for instance use their reputation as a reliable seller on one marketplace to immediately receive a level of trust in any other participating market. Transferrable trust in this way brings digital reputation more closely in line with the real-world equivalent. We have singular reputations in the real world that we build on and utilise across our lives, which has a stronger incentive for good behaviour due to the difficulty of creating ‘throw-away’ real identity.

I think there is a compelling case for this new paradigm of Distributed Platform Cooperatives to disrupt and outcompete their centralized competition. When we can create platforms that remove some substantial inefficiency, history would suggest that the competitors do not last well. It also gives a tantalizing glimpse into a world of no gatekeepers to a rich collection of markets that all can enter and participate in freely. It is hoped that these well-lubricated markets would provide fair prices to both consumer and producer. The predatory nature of Silicon Valley pricing, while at times advantageous to the consumer, has had less than desirable impacts to the disempowered providers who have to depend on the whims of a central authority for their survival. Distributed markets create a fertile ground for unionization and increased power to the producer, though it will be interesting to see how consumers respond to this new bargaining relationship.

Programming Unity

Mad Maps: A Non-Destructive Terrain Pipeline for Unity

There are so many powerful terrain tools out there, but too often you will find yourself having to choose between procedural generation and a hand-crafted touch. For most terrain assets out there, adding polish means that your pipeline become destructive. If you need to go back and alter procedural elements, you will lose all polish work you have done. And what if one asset does one thing well, but not another? How can you combine the results from multiple sources?

Mad Maps is a powerful, integrated collection of tools to solve all of your Unity terrain pipeline needs. It is an effort to build a terrain pipeline that is non-destructive, extensible, flexible, fast and modular. It’s been battle-tested for the past 2 years in a professional studio environment, used for creating massive open world levels. It can be integrated with existing procedural solutions, allow you to split complex levels up into manageable chunks, and easily modify and reuse areas of a world.

Check out some overview videos below:

This is currently making its way to the Unity Asset Store. Stay tuned!

Programming Unity

An Intersection Test for Arbitrary Rectangular Prisms

Have you ever had two arbitrarily rotated and sized rectangular prisms, and wanted to check if they’re intersecting? I know I have! Just an old AABB won’t do the trick, as very snug fitting rectangular prisms need to be detected and dismissed. There are some dastardly configurations (for instance, imagine a very very small rectangular prism sitting just above the surface of a massive and highly skewed rectangular prism) which also need to be sussed out.

It turned out to be a surprisingly tricky problem, and I had to pull a lot of different things from a lot different places together to get it working.

So how does it work? Well first lets think about the problem in 2 dimensions. There’s 3 escalating tests we can run to check if these rotated boxes overlap. The first is to generate two axis-aligned boxes and run a quick AABB check as a broad phase check. The second is to iterate the points of one of the boxes and check the overlap. If there are any points within the box, the box is overlapping. If that is inconclusive, we run the final and most expensive test. First, we pick one of the boxes to define a set of axis in whatever dimensions we’re working with. We basically rotate the whole world in such a way that one box is now perfectly aligned with the axis. Then, we project to each axis. If any of the projections do not overlap, we can guarantee that the boxes do not overlap either.

It’s pretty much a straight shoot up into the third dimension for the first 2 tests. However, for the 3rd, instead of projecting a 1D line from a 2D shape as above, we instead project a 2D shape onto a 2D surface. To do this, we decompose the rotated 3D rectangular prism into its composite triangles.

We can then flatten these triangles against a 2D axis by swizzling their coordinates. We then can do the much simpler test of if a triangle is intersecting an axis aligned rectangle, for each triangle. If any of the triangles succeed, the whole axis succeeds and exits. If all axis succeed, the test is a success and the rectangular prisms absolutely do overlap.

As always let me know if you think I’ve done it wrong, or if there was a simpler way to do this, or if you think I fucked up somewhere.

Get it here.