Aviva Directory » Computers & Internet » Programming » Unison

Created by RĂșnar Bjarnason and Paul Chiusano, the first alpha release of the Unison programming language was in 2019.

Licensed under the Apache License 2.0, the most recent release, as of this writing, was on December 13, 2023.

Unison is a modern, statically-typed purely functional programming language similar to Haskell. It was inspired by Haskell, Erland, and Frank.

Unison code is stored in a database, and identified by a hash of its syntax tree. This unique identifier simplifies distributed programming, eliminates builds and dependency conflicts, supports typed durable storage and structures refactorings, and enables better tools for working with code.

Most programming languages are designed to describe what a program does on a single computer. When you want to run a computation elsewhere, it is necessary to send bytes over the network and make sure the other end is running a separate program that will run the computation you want.

This makes distributed computations complicated and requires separate programs to be stitched together when being sent over the network. Unison simplifies this process by allowing arbitrary computations to be moved from one location to another, with missing dependencies deployed on the fly.

The basic protocol is easy. The sender ships the bytecode tree to the recipient, who inspects the bytecode for any missing hashes. If it already has all of the necessary hashes, it can run the computation; otherwise, it requests the ones that are missing, and the sender syncs them on the fly. They'll be cached for next time.

The ability to relocate arbitrary computations embodies the more limited notions of code deployment, remote procedure calls, and more, all of which allow for more powerful distributed computing components as ordinary Unison libraries.

In Unison, you're rarely waiting around for your code to build because Unison definitions are identified by their hash, which never changes. We may change which names are associated with which hashes, but the definition associated with a hash doesn't change. For this reason, in Unison, we can parse and typecheck definitions once, and then store the results in a cache that is never validated. This cache is not something temporary in yor IDE or build tool, but part of the Unison codebase format. Once a definition has been parsed, typechecked, and added to the codebase, it never has to be done again.

This portion of our computer programming language guide features the Unison programming language. Online resources for the language, such as the official developer community website, repositories, or other websites focused on the language, are appropriate for this category, along with developer community sites, forums, tutorials, reviews, or other Unison content.

 

 

Recommended Resources


Search for Unison on Google or Bing