Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 35a64f6

Browse files
committed
upd readmes
1 parent 6bc55f6 commit 35a64f6

File tree

3 files changed

+71
-77
lines changed

3 files changed

+71
-77
lines changed

README.md

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,18 @@ We implement it as a term rewriting system.
1919
- [EO editor](https://github.com/deemp/eo-editor)
2020
- [Phi editor](https://github.com/deemp/phi-editor)
2121

22-
## Prerequisites
23-
24-
- Install [Nix](https://nixos.org/download.html) (Single-user installation)
25-
26-
```sh
27-
sh <(curl -L https://nixos.org/nix/install) --no-daemon
28-
```
22+
## Quick start
2923

30-
- Enable [flakes](https://nixos.wiki/wiki/flakes/8ee5d35e592860636adb57cee3e27c98de04202a#Permanent)
24+
1. [Install Nix](https://github.com/deemp/flakes/blob/main/README/InstallNix.md)
3125

32-
- Enter the repo
26+
1. Enter the repo.
3327

3428
```sh
3529
git clone https://github.com/objectionary/try-phi
3630
cd try-phi
3731
```
3832

39-
## Quick start
40-
41-
- Run back and front in separate terminals
33+
1. Run `back end` and `front end` in separate terminals.
4234

4335
```console
4436
nix run .#back
@@ -47,31 +39,25 @@ We implement it as a term rewriting system.
4739

4840
## Development
4941

50-
- Install [direnv](https://nix.dev/tutorials/declarative-and-reproducible-developer-environments#direnv-automatically-activating-the-environment-on-directory-change) - steps 1, 2
51-
52-
- [Enable flakes](https://nixos.wiki/wiki/flakes/8ee5d35e592860636adb57cee3e27c98de04202a#Enable_flakes)
53-
54-
- Allow direnv in flake folders
42+
1. Allow `direnv` in flake folders.
5543

5644
```sh
5745
direnv allow
5846
(cd front && direnv allow)
5947
(cd back && direnv allow && stack build)
6048
```
6149

62-
- Open Codium
50+
1. Start a deshell.
6351

6452
```console
6553
nix develop
66-
codium .
6754
```
6855

69-
- Hotkey for `Command palette` - `Ctrl` (`Cmd`) + `Shift` + `P`
56+
1. (Optionally) Start `VSCodium`.
7057

71-
- Start app - a browser window should open
72-
- Command palette -> `Tasks: Run Task` -> `Run app`
73-
74-
- Terminate app
75-
- Command palette -> `Tasks: Terminate Task` -> `All Running Tasks`>
58+
```console
59+
nix run .#writeSettings
60+
nix run .#codium .
61+
```
7662

77-
- In case of problems reload the window (`Ctrl` + `Shift` + `P` -> `Developer: Reload window`) and repeat previous commands to start the server and the client
63+
1. In a `.hs` file, hover over a function. `HLS` should start giving the type info soon.

back/README.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
# Try-phi backend
22

3-
## Dependencies
3+
## Quick start
44

5-
- Install [stack](https://docs.haskellstack.org/en/stable/README/)
5+
1. [Install Nix](https://github.com/deemp/flakes/blob/main/README/InstallNix.md)
66

7-
## Run
8-
9-
* Build and execute
7+
1. Enter the dir.
108

119
```sh
12-
sh run.sh
10+
git clone https://github.com/objectionary/try-phi
11+
cd try-phi/back
1312
```
1413

15-
## Deploy to Heroku
14+
1. Run `back end`.
15+
16+
```console
17+
nix run
18+
```
1619

17-
- Read [this](https://hackernoon.com/for-all-the-world-to-see-deploying-haskell-with-heroku-7ea46f827ce) till `web: run-server`
20+
## Development
1821

19-
- Select a port when running locally:
22+
1. Start a deshell.
23+
24+
```console
25+
nix develop
26+
```
2027

21-
```haskell
22-
startApp :: IO ()
23-
startApp = catchIOError
24-
(do
25-
port <- read <$> getEnv "Port"
26-
print port
27-
run port app)
28-
(\_ -> run 8082 app)
29-
```
28+
1. Build the package
3029

31-
- Next, add a `Procfile` and [commit](https://devcenter.heroku.com/articles/procfile#deploying-to-heroku) it to `heroku`
30+
```console
31+
cabal build
32+
```
33+
34+
1. (Optionally) Start `VSCodium`.
35+
36+
```console
37+
nix run .#writeSettings
38+
nix run .#codium .
39+
```
3240

33-
- Return to the [guide](https://hackernoon.com/for-all-the-world-to-see-deploying-haskell-with-heroku-7ea46f827ce)
41+
1. In a `.hs` file, hover over a function. `HLS` should start giving the type info soon.
3442

35-
- `push` and get
43+
1. [Troubleshoot](https://github.com/deemp/flakes/blob/main/README/Troubleshooting.md) if necessary
3644

37-
```sh
38-
2022-06-25T14:39:52.239150+00:00 heroku[web.1]: State changed from crashed to starting
39-
2022-06-25T14:39:53.260912+00:00 heroku[web.1]: Starting process with command `try-servant-exe`
40-
2022-06-25T14:40:53.904920+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
41-
2022-06-25T14:40:53.936273+00:00 heroku[web.1]: Stopping process with SIGKILL
42-
2022-06-25T14:40:54.126423+00:00 heroku[web.1]: Process exited with status 137
43-
2022-06-25T14:40:54.215588+00:00 heroku[web.1]: State changed from starting to crashed
45+
## References
4446

45-
```
47+
- Heroku's [Container Registry & Runtime (Docker Deploys)](https://devcenter.heroku.com/articles/container-registry-and-runtime#dockerfile-commands-and-runtime)

front/README.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,51 @@
22

33
This is a `PureScript` version of `try-phi` front end. Previously, it was written in [Elm](https://github.com/fizruk/try-phi/tree/cf29332d08376e1da90c851f5326b440ac070763) and [Haskell](https://github.com/fizruk/try-phi/commit/bc04b4d61b00f79ad7736769d1420d632e294579) (via `Miso`). It uses `Halogen` for UI.
44

5-
## Dependencies
5+
## Quick Start
66

7-
- Install [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm/)
7+
1. [Install Nix](https://github.com/deemp/flakes/blob/main/README/InstallNix.md)
88

9-
## Quick Start
9+
1. Switch to this directory
10+
11+
```sh
12+
git clone https://github.com/objectionary/try-phi
13+
cd try-phi/front
14+
```
1015

11-
- Switch to this directory, build and run the project
16+
1. Run project:
1217

13-
```sh
14-
cd front
15-
npm run quick-start
16-
```
18+
```console
19+
nix develop
20+
npm run quick-start
21+
```
1722

18-
- If there is an [inotify error](https://askubuntu.com/a/1088275), run
23+
- If there is an [inotify error](https://askubuntu.com/a/1088275), run
1924

20-
```sh
21-
echo fs.inotify.max_user_watches=1000000 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
22-
```
25+
```sh
26+
echo fs.inotify.max_user_watches=1000000 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
27+
```
2328

24-
Now, your browser will open, showing [http://localhost:1234](http://localhost:1234)
29+
1. Now, your browser will open, showing [http://localhost:1234](http://localhost:1234)
2530

2631
## Develop
2732

28-
- Run
33+
1. Run
2934

30-
```sh
31-
npm run dev
32-
```
35+
```sh
36+
nix develop
37+
npm run dev
38+
```
3339

3440
If you're using an [editor](https://github.com/purescript/documentation/blob/master/ecosystem/Editor-and-tool-support.md#editors) that supports [`purs ide`](https://github.com/purescript/purescript/tree/master/psc-ide) or are running [`pscid`](https://github.com/kRITZCREEK/pscid), you simply need to keep the previous `npm run dev` command running in a terminal. Any save to a file **used** in the project will trigger an incremental recompilation, rebundle, and web page refresh, so you can immediately see your changes.
3541
3642
If your workflow does not support automatic recompilation, then you will need to manually re-run `npm run build`. Even with automatic recompilation, a manual rebuild is occasionally required, such as when you add, remove, or modify module names, or notice any other unexpected behavior.
3743
3844
## Deployment
3945
40-
* Produce the bundled and minified code at `./prod` and see the app running in a browser via [http-server](https://www.npmjs.com/package/http-server):
46+
1. Produce the bundled and minified code at `./prod` and see the app running in a browser via [http-server](https://www.npmjs.com/package/http-server):
4147
42-
```sh
43-
npm run build:prod
44-
```
48+
```sh
49+
npm run build:prod
50+
```
4551
46-
* Now, you may deploy your app to a static hosting service, e.g., GitHub Pages (see this [post](https://javascript.plainenglish.io/deploying-any-app-to-github-pages-1e8e946bf890))
52+
1. Now, you may deploy your app to a static hosting service, e.g., GitHub Pages (see this [post](https://javascript.plainenglish.io/deploying-any-app-to-github-pages-1e8e946bf890))

0 commit comments

Comments
 (0)