Interview with Simon Peyton Jones, Engineering Fellow at Epic Games, first speaker of the DTS event of 2023

The Distinguished Talks Series are back!

Our first speaker is Simon Peyton Jones, Engineering Fellow at Epic Games. Scheduled for November 8th, his talk promises an exploration of the intricate world of functional logic programming and semantics. This interview serves as a prelude, offering a glimpse into Verse, the metaverse, and the subject matter of his presentation.

“Verse is a functional logic language, which is quite unusual. Functional programming is like a leash within programming, it's the part I'm actually most interested in, and functional logic programming is like a leash with a dog. And so at Epic I'm going to take functional logic programming out of the lab and kick it into the mainstream, which is quite ambitious because nobody else has ever done that.”

I have been at Microsoft Research in Cambridge for approximately 20 years. Over that period, the lab has undergone significant changes, shifting its focus towards larger projects rather than engineers working on projects directly related to Microsoft's core business. I primarily identified as a purist researcher 1.0, specializing in programming language design.

It became evident that it was time for me to seek new horizons. Upon exploring other options, I came across Epic Games. This company, led by CEO and founder Tim Sweeney, not only established itself as one of the most successful gaming companies, but also engaged in the development of a programming language. This language, known as Verse, serves as the focal point of my upcoming discussion. Tim had been working on it in parallel with his responsibilities at the company, envisioning the need for programming language researchers to unravel the mysteries of “what a Verse program truly signifies.” As it turns out, Verse proves to be a remarkably intriguing programming language, distinguished by its unique characteristics.

My official title is Engineering Fellow, a term that encompasses a role offering significant autonomy. I take great pleasure in what I do and consider myself fortunate to work for Epic on a language and project that, if successful, holds the potential for substantial impact. Tim envisions Verse as the language of the metaverse. I'll touch upon this aspect during my presentation, but Tim's overarching goal is to create an immersive 3D virtual reality space where individuals can seamlessly interact with one another. While previous attempts have been made in this direction, game companies serve as the ideal starting point, given their existing millions of users engaged in immersive 3D virtual reality experiences. Although such interactions have occurred in the past, the Metaverse represents a natural evolution of this concept and is at the core of Tim's vision.

I do mean that Tim is developing a new programming language. It's a means of instructing a computer on what actions to perform. A programming language is to a software developer what bricks are to a builder; they serve as the foundation upon which software is constructed. Just as a builder must decide whether to use bricks, steel, or bananas to construct a building, the choice of building material makes a significant impact. Bricks enable the construction of more ambitious structures than bananas, and steel provides even greater possibilities than bricks.

The choice of building material holds great importance. Programming languages are designed to liberate programmers from low-level concerns, eliminating entire classes of errors common in languages like C, errors that don't exist in higher-level programming languages. These languages can enhance programmers' productivity by removing error-prone aspects and enabling the creation of more intricate software. Over time, programming languages have evolved, with modern software composed of millions of lines of code. Writing such extensive code would have been a formidable task in the past.

Today, programming languages are of utmost importance, with thousands in existence. While a select few, like C, C++, and Java, have achieved mainstream recognition, many others have emerged, such as Go, Transcript, Swift, Clojure, and Ruby, each finding substantial use. However, Tim holds a unique perspective on these languages, which leads him to Verse, a functional logic language, a rarity in the field. Functional programming is akin to a leash within programming, a facet that particularly piques my interest. Functional logic programming, on the other hand, is akin to a leash with a dog. During my tenure at Epic, I am determined to propel functional logic programming from the confines of the laboratory into the mainstream, an ambitious endeavor, as no one has attempted this before. Our motivation lies in the belief that functional logic programming can offer a superior platform for writing more productive and advanced software.

In my presentation, I will delve deeply into the concept of functional logic programming languages, as this area remains unfamiliar to many. I've acquired substantial knowledge in this field over the past two years.

In an imperative language like C or Fortran, your program consists of a concealed sequence of commands: do this, then that, and so on. This approach seems quite intuitive, as it's the initial method we typically associate with programming. It's akin to making a slice of toast: insert the bread into the toaster, press the button, wait for 3 minutes, remove the toast, spread jam, and savor it. These are the steps, the secrets of the process.

Conversely, in a functional programming language, the approach differs. Instead of focusing on a step-by-step sequence, you work with unchanging and immutable values. This concept may be familiar to many through spreadsheets. In a spreadsheet, you might define that the value in cell A3 is the sum of A1 and A2. There's no explicit notion of a step; it's merely the value of one cell derived from the values of others. For instance, cell B7 might be defined as the product of A3 and B9. The spreadsheet automatically determines the order of calculation, as A3 must be computed before B7, given that B7 relies on A3. A spreadsheet with numerous formulas essentially functions as a piece of software. The intriguing aspect is that this seemingly simpler and less structured programming approach, reliant on working with values alone rather than a predefined sequence of commands, proves to be just as potent. This is a profound revelation: functional programming, centered around immutable values, wields equal power as step-by-step programming.

Languages like Haskell or ML fall within this category. They represent languages that have taken the concept of functional programming and applied it to real-world problems. Functional logic, however, takes this a step further. In a functional language, you might say, “let X be the value of the expression.” You introduce X and define an expression that immediately ascribes a value to it. In a functional logic language, you can introduce X and determine its value through a process known as unifications or equations. This concept may be somewhat challenging to visualize without visual aids, but it offers even greater expressiveness than traditional functional programming. I believe we are conducting a substantial intellectual experiment to explore whether there's a superior method for creating software. I am optimistic that this approach stands a good chance of gaining acceptance.

I'm not an expert in the metaverse; that's Tim's vision. I'm truly a programming language (PL) enthusiast. However, I've gained some insight into what Tim is attempting to achieve. If people are going to spend time in virtual reality as they do in the real world, they will socialize, conduct business, stroll down the virtual high street, rent space, set up shops, sell products, and exchange items of value. It's fundamentally a commercial endeavor, mirroring how our society functions. People work hard in different capacities, trading with one another using currency. Yet, there is a need for a shared space, much like the real high street, where multiple shops come together.

Thinking about the metaverse, one way to perceive it is as a place where people can socialize. While we have some elements of this in 2D platforms like Zoom, a 3D immersive virtual reality environment offers a more captivating experience. Moreover, the metaverse is a space where people can exchange items of value, akin to a high street. In a high street, the key requirements are places to share space, thoughtfully created by someone to bring people together. Rather than being overwhelmed by corporate dominance, the metaverse should have ground rules —much like the understanding that you shouldn't break someone else's windows on a physical high street. People should conduct themselves in a civilized manner in this shared public space. Tim's vision aims to create a public space with these rules, fostering social interaction, fun, and the exchange of valuable items.

Will this vision become a reality? It's an experiment, and only time will tell. However, we do have evidence of such interactions happening in the gaming world. People already exchange valuable items within games, albeit on a smaller scale. This concept is not expected to materialize all at once. For instance, Epic Games has previously created a few successful games like Fortnite, but it's increasingly shifting towards a model where other individuals can develop their own games within the Unreal Engine, which is Epic's platform for such endeavors. Other creators can make games, players can enjoy them, and the creators can generate income. Epic might take a share, similar to collecting rent for a shop on a high street. This vision is evolving towards establishing a space where third-party game developers can thrive, and I find that vision quite appealing. It's like a vast garden where individuals can access it by paying, allowing many third parties to become creators and thrive.

To accomplish this, a common infrastructure is essential. For example, if you possess a digital asset, such as a character or a piece of 3D rendering created in Minecraft, for it to function seamlessly in this virtual 3D reality, standardized protocols are necessary. These rules encompass far more than just aspects like open windows; they encompass extensive and precise regulations governing how computer systems interact with one another to create a user experience that appears seamless. This task is intricate and demanding.

I believe Tim wants to bring about substantial change. As I mentioned, the future remains uncertain, and Tim is placing his bet on this vision. I think it's about establishing value systems in the way he's setting things up. The success of this endeavor remains to be seen since the world is a complex place. Nevertheless, I think it's commendable to make a dedicated and sincere effort to bring about such change, and that's precisely what Epic is doing.

Yes, I believe so. We shouldn't limit our perspective to just games. Game companies have a head start in this field because they already possess immersive 3D virtual reality spaces where millions of people interact. Games serve as a starting point, not the endpoint. They demonstrate what is possible. However, you might simply want to meet your friends or host a party, and a significant portion of these activities is already taking place in virtual reality, including concerts by well-known pop stars. These events are not games; they are social experiences. I may not be a Generation Z individual, and I may not have a thorough understanding of current trends, but I think it extends far beyond just games.

This is what games have been doing for ages. They have continually improved. Over the past 30 years, the world of game development has been pursuing this goal, striving for multiplayer functionality, 3D interactive virtual reality, and more. There hasn't been a sudden change recently, but everything has significantly advanced. Epic's primary asset, and the heart of their intellectual property, is the Unreal Engine.

The Unreal Engine is the software responsible for rendering images and includes a physics engine. This means that when, for example, a rock falls off a cliff in your game, it will bounce, collide with objects, and potentially knock other items over. How does this happen? It's not due to a programmer specifying each interaction individually, such as “what happens if it falls there and hits another object, causing another object to fall.” Instead, a physics engine takes into account forces, mass, velocity, and friction to make all objects in the game world behave in a physically realistic manner. It accomplishes this by performing calculations related to mass and velocity.

Furthermore, when the engine renders what is seen in the game, it takes into account lighting and how light interacts with various surfaces. If surfaces have some degree of roughness, all of this functionality is encapsulated within what is typically referred to as the “core engine” of a game engine. Two prominent game engines in this field are Unreal, developed by Epic, with Tim personally working on the Verse version, and Unity, which is highly popular. These game engines are extensive and serve as the foundational platforms for virtual reality experiences. However, they are not limited to any one specific application; instead, they have been evolving over a span of 30 years.

I was seeking a change. Some of my friends were already working at Epic, and they told me it's a really cool place where we have a lot of fun. So, I wasn't thinking, “you're going to work in video games,” but rather, “Oh, it might be an interesting change to explore.” However, that wasn't the primary motivation behind my transition. I believe it's a great privilege. Computer scientists are incredibly fortunate. Here I am, searching for a new job at the age of 63, and in many professions, at that age, it's nearly impossible to find employment. People often assume you're on the brink of retirement. But in the field of computing, where skills are in high demand, we can secure fascinating job opportunities even at that stage. I genuinely feel blessed to have obtained this new job. It allows me to continue some of the work I've been doing, focusing on programming languages, but it also offers the exciting challenge of working on an entirely new language for the metaverse.

Simon is a Fellow of the Royal Society. He graduated from Trinity College Cambridge in 1980. After two years in industry, he spent seven years as a lecturer at University College London, and nine years as a professor at Glasgow University, before joining Microsoft Research (Cambridge) in 1998. He moved to Epic Games as an Engineering Fellow in 2022.

Simon’s main research interest is in functional programming languages, their implementation, and their application. He was a key contributor to the design of the now-standard functional language Haskell, and is the lead designer of the widely-used Glasgow Haskell Compiler (GHC). He has written two textbooks about the implementation of functional languages. He is particularly motivated by direct application of principled theory to practical language design and implementation — that is one reason he loves functional programming so much.

Simon is chair of Computing at School, the grass-roots organisation that was at the epicentre of the 2014 reform of the English computing curriculum.

To find out more about the Metaverse, Tim Sweeney's own world and what he is trying to achieve, you can watch this conference: Beyond functional programming: a taste of Verse. Simon Peyton Jones & Tim Sweeney