Environment Setup
Last updated
Last updated
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 . That repo has 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
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:
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.
Run the pallas
binary to confirm all is well:
Get a Sire REPL:
(Ctrl-C to get out of the REPL)
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.
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.
On MacOS, is a good option (assumes you have Homebrew installed):
Linux x86_64:
Mac arm64/aarch64 (M1 macs):
Clone and navigate to its root. Then run:
First off, you'll need the Pallas source code. Clone it from . The rest of this guide will assume you're at the root of that repo.