Environment Setup
Docker quickstart
If you're interested in the quickest way to get a Sire REPL and start playing with the language and you have Docker on your system, you can simply pull the Pallas image found here. That repo has instructions for quickly getting straight into a Sire REPL.
Once you're in the REPL, you should see something this:
Try entering (add 1 2)
and hitting enter.
Let's learn some more Sire now
Prebuilt binary
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:
On MacOS, Homebrew is a good option (assumes you have Homebrew installed):
Get a prebuilt binary:
Currently we provide the following prebuilt binaries:
Mac arm64/aarch64 (M1 macs): https://pallas-binaries.nyc3.cdn.digitaloceanspaces.com/apple_m1_arm64/pallas
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.
Run the
pallas
binary to confirm all is well:
Get a Sire REPL:
Clone the Pallas repository and navigate to its root. Then run:
(Ctrl-C to get out of the REPL)
Install from source
First off, you'll need the Pallas source code. Clone it from https://github.com/operating-function/pallas. The rest of this guide will assume you're at the root of that repo.
Dependency installation and first-run
If your system does not or cannot run
nix
, you would need to install the Haskell and its build tool,stack
, as well aslmdb
andzlib
. Once these requirements are satisfied, you canstack install
at the root of the Pallas repo.
Because the current runtime is somewhat experimental, enormous time has not been invested into portability just yet. As a result, using nix
is the most straightforward way to get Pallas running. (installing and configuring nix
is outside the scope of this guide. We recommend using Docker if you're unable to use nix
)
Any time you open a new terminal, you must remember to enter the development shell with nix by running:
You will forget to do this and wonder why nothing is working. That's probably why.
Once you're in a nix development shell, run the following command to build the Pallas environment:
This might take a while! When it's done, you should be able to verify all went well by running a simple cog:
You should see a process that logs a message every second.
Press CTRL-C
when you're ready to exit the process.
The pallas
command and REPLs
pallas
command and REPLsEnter this command in a shell at the root level of the pallas repo (where you've remembered to first run nix develop
):
As of the time of this writing, you'll see the usage hint for the pallas
command:
We'll more get into booting machines and running cogs soon, but first let's just get a Sire REPL to play with.
While the repl
command looks attractive, it's not going to do exactly what you expect.
There is a particular boot sequence required before we have all the necessary tools at hand. Since we want our environment to be hydrated properly, we'll execute the proper boot sequence in order to get a working REPL:
You'll see something like this:
Try entering (add 1 2)
and hitting enter.
Last updated