Skip to content

Latest commit

 

History

History
268 lines (183 loc) · 6.1 KB

README.md

File metadata and controls

268 lines (183 loc) · 6.1 KB

Pallas

An open source Solid State Interpreter exokernel and runtime

Index

  1. Introduction
  2. Caveats
  3. Installation
  4. Getting Started
  5. Example
  6. Contributing
  7. Additional Resources

Introduction

The Pallas SSI programming environment is written in a purely functional, rune-based language called Sire. Sire is a sort of Lispy-Haskell with a visual resemblance to Hoon.

Pallas provides the following features out of the box, without any special configuration or external libraries:

  • Automatic orthogonal persistence
  • Extreme portability with zero external dependencies
  • Merkleized state and content-addressable memory pages (data, code, running programs)
  • Natively networked with public keys as endpoints
  • Serializable closures that can be transferred over the network

This project is a fork of Plunder.

Caveats

Despite being in development for over four years, Pallas is still considered to be a prototype implementation. Anything explicitly mentioned in this README or the documentation does work as advertised, but other areas of the repo are less complete, including:

  • TODO: Haskell runtime
  • TODO

Installation

Quick Start (Ubuntu/Debian-based and MacOS)

The quickest way to run Pallas is by installing a few dependencies and grabbing a pre-built binary.

  1. Install dependencies:

Dependencies:

  • libgmp (GNU Multiple Precision Arithmetic Library)
  • liblmdb (Lightning Memory-Mapped Database)
  • libz (zlib compression library)

On Ubuntu or Debian-based systems, you can install these with:

sudo apt-get update && sudo apt-get install -y \
    libgmp10 \
    liblmdb0 \
    zlib1g

On MacOS, Homebrew is a good option (assumes you have Homebrew installed):

brew install gmp lmdb zlib
  1. Get a prebuilt binary:

Currently we provide the following prebuilt binaries:

Your browser may not prompt to download these files, in which case you can use cURL:

curl -L <URL of your choice here> -o pallas

Make it executable and move it somewhere on your path.

  1. Run it:

If all went well, you should see this:

$ pallas

Run a Pallas machine

Usage: pallas COMMAND

  Pallas

Available options:
  -h,--help                Show this help text

Available commands:
  sire                     Run a standalone Sire repl.
  save                     Load a sire file and save a seed.
  show                     Print a seed file.
  repl                     Interact with a seed file.
  start                    Resume an idle machine.
  boot                     Boot a machine.
  1. Get a Sire REPL:

Clone this repository and navigate to its root. Then run:

$ pallas sire sire/prelude.sire
...
...
("prelude","LOADED FROM CACHE!")

}
} ==== Sire REPL ====
}
} Since input is multi-line, there is currently no input-prompt.
} Just type away!
}

(Ctrl-C to get out of the REPL)

Get a Development Environment

Using Nix is the most straightfoward way to install Pallas at this time. If your system doesn't support Nix or if you need further instruction (including instructions for Docker), refer to the documentation.

  1. Clone this repo. Navigate to the root of it.
git clone [email protected]:operating-function/pallas.git
cd pallas
  1. Get into a Nix shell
nix develop
  1. Build pallas

This will take some time. Perhaps upwards of 15 minutes, depending on your system.

stack build
  1. Confirm everything is working by dropping into a Sire REPL:
$ stack run pallas sire sire/prelude.sire
...
...
("prelude","LOADED FROM CACHE!")

}
} ==== Sire REPL ====
}
} Since input is multi-line, there is currently no input-prompt.
} Just type away!
}

Getting Started

COMING SOON: Quick start instructions for a todo list app with automatic persistence.

Example

Sire is the programming language of Pallas.

Here is a brief look at Sire. The documentation covers the language more fully, but we want you to get a sense of it now.

If you are following along, use the instructions above to get a Sire REPL.

Top-level binding

; This is a comment.

; Top-level binding of 3 to x:
x=3

Function application

(add 1 3)
; ^ function name (add)
;    ^ first argument (1)
;      ^ second argument (3)

4 ; return value
| add 1 3
4   ; return value
add-1-3
4
; Binding a named function
= (addTwo input)
| add 2 input


; Applying it
(addTwo 4)
6

Rows

row=[10 64 42]

; idx is a function that returns a particular index in a row

(idx 0 row)
10
; the zeroth item in the row

(idx 2 row)
42

Demo Examples

COMING SOON: An /examples filled with more complex Sire procedures.

Contributing

At this stage in Pallas development, these are the types of contributions that are most appropriate:

  • Bugs in the existing examples
  • New examples
  • Documentation improvements
  • New GitHub issues for parts of the system that are unclear

That said, we encourage you to dive even deeper and submit PRs beyond these suggestions.

CONTRIBUTING.md

Additional Resources