Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README polished a bit #29

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 43 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Try-phi

<img alt="logo" src="https://www.objectionary.com/cactus.svg" height="100px" />

[![Hits-of-Code](https://hitsofcode.com/github/objectionary/try-phi?branch=main)](https://hitsofcode.com/view/github/objectionary/try-phi?branch=main)
Expand All @@ -10,9 +8,7 @@ Right now we implement it as a term rewriting system.

It is combined with [EO](https://github.com/objectionary/eo) editor. EO is based on 𝜑-calculus.

## Usage

- The online playground is available [here](https://www.objectionary.com/try-phi/?editor=phi&snippet=%5B%0A%20%20a%20-%3E%203%2C%0A%20%20b%20-%3E%20%5E0.a%0A%5D.b)
The online playground is available [here](https://www.objectionary.com/try-phi/?editor=phi&snippet=%5B%0A%20%20a%20-%3E%203%2C%0A%20%20b%20-%3E%20%5E0.a%0A%5D.b)

## Components

Expand All @@ -21,42 +17,53 @@ It is combined with [EO](https://github.com/objectionary/eo) editor. EO is based
- [EO editor](https://github.com/br4ch1st0chr0n3/eo-editor)
- [Phi editor](https://github.com/br4ch1st0chr0n3/phi-editor)

## Development
## How to Contribute

Install [Nix](https://nixos.org/download.html) (Single-user installation)

```sh
sh <(curl -L https://nixos.org/nix/install) --no-daemon
```

- Install [Nix](https://nixos.org/download.html) (Single-user installation)
```sh
sh <(curl -L https://nixos.org/nix/install) --no-daemon
```
Install [direnv](https://nix.dev/tutorials/declarative-and-reproducible-developer-environments#direnv-automatically-activating-the-environment-on-directory-change) - steps 1, 2

- Install [direnv](https://nix.dev/tutorials/declarative-and-reproducible-developer-environments#direnv-automatically-activating-the-environment-on-directory-change) - steps 1, 2
For [VS Code](https://code.visualstudio.com/)

- For [VS Code](https://code.visualstudio.com/)
- Install extensions
```sh
code --install-extension mkhl.direnv --install-extension haskell.haskell --install-extension nwolverson.ide-purescript
```

```sh
code --install-extension mkhl.direnv --install-extension haskell.haskell --install-extension nwolverson.ide-purescript
```

- Open workspace in `.vscode/try-phi.code-workspace`

- In separate terminals:
Then, in separate terminals:

- backend dev
```sh
cd back
# for the first time
direnv allow
# start the server
nix run
```

```sh
cd back
# for the first time
direnv allow
# build for HLS
nix build
# start the server
nix run
```

- front
```sh
cd front
# for the first time
direnv allow
# open app in a browser
npm run dev
# or any other commands from package.json
```

- If in VS Code, reload the window (`Ctrl`+`Shift`+`P` -> `Developer: Reload window`) and repeat previous commands to start the server and the client

- For Haskell, your shell will have [haskell-language-server](https://github.com/haskell/haskell-language-server)
- For Purescript - [purescript-language-server](https://github.com/nwolverson/purescript-language-server)

```sh
cd front
# for the first time
direnv allow
# open app in a browser
npm run dev
# or any other commands from package.json
```

If in VS Code, reload the window (`Ctrl`+`Shift`+`P` -> `Developer: Reload window`) and repeat previous commands to start the server and the client

For Haskell, your shell will have [haskell-language-server](https://github.com/haskell/haskell-language-server)

For Purescript - [purescript-language-server](https://github.com/nwolverson/purescript-language-server)
4 changes: 0 additions & 4 deletions build.sh

This file was deleted.

Loading