Start updating documentation

This commit is contained in:
Radon Rosborough 2021-07-11 02:25:23 +00:00
parent 7b4751d544
commit 25e3bdf6d8
6 changed files with 38 additions and 56 deletions

View File

@ -27,7 +27,8 @@ Riju does not collect your personal information.
* Riju uses [Fathom Analytics](https://usefathom.com/) to measure * Riju uses [Fathom Analytics](https://usefathom.com/) to measure
traffic. Fathom collects very limited data and does not sell it to traffic. Fathom collects very limited data and does not sell it to
third parties, unlike Google Analytics. third parties, unlike Google Analytics.
* Riju does not serve advertisements. * Riju does not serve advertisements or share data with any third
party aside from Fathom Analytics.
All of the above notwithstanding, any service that allows people to All of the above notwithstanding, any service that allows people to
run code online is inherently risky. For this reason, I can't make any run code online is inherently risky. For this reason, I can't make any

View File

@ -8,4 +8,7 @@ way to:
* View or interfere with another user's session. * View or interfere with another user's session.
* Tamper with the Riju server. * Tamper with the Riju server.
I will do my best to correct the vulnerability as soon as possible. Although I work on Riju in my free time, I take security seriously, so
I will do my best to get back to you in less than a week, and to
correct the vulnerability as soon as possible (I will let you know the
likely timeline by email).

View File

@ -24,8 +24,8 @@ start the admin shell:
$ make image shell I=admin $ make image shell I=admin
``` ```
All future operations can be done inside the admin shell, where all All future operations can be done inside the admin shell, where Riju's
dependencies are installed automatically. dependencies are already installed.
## Start tmux ## Start tmux
@ -48,60 +48,32 @@ keybindings are:
use `control-b` twice to do a command on the inner one instead of use `control-b` twice to do a command on the inner one instead of
the outer one the outer one
## Configure local project ## Start Riju server
Using your regular text editor (the Riju repository is synchronized Use `dep`, the Riju build tool, to compile the Docker image that the
inside and outside of the container, so you can use whatever editor Riju server will run inside:
you would like, it doesn't have to be something in the terminal),
create a file `.env` in the Riju repository with the following
contents:
``` ```
DOCKER_REPO=raxod502/riju $ dep image:runtime
S3_BUCKET=riju
``` ```
This tells Riju to pull assets from the official registries that I Start Riju in development mode:
maintain, so that you don't have to build them yourself.
## Set up Docker images
Download the two Docker images needed for testing a new language:
``` ```
$ make pull I=packaging $ make shell I=runtime E=1 CMD="make dev"
$ make pull I=runtime
```
Create a new tab in tmux (`control-b c`) and start the runtime image
with ports exposed:
```
$ make shell I=runtime E=1
```
Inside that shell, start another instance of tmux:
```
$ make tmux
```
Now within that tmux, start Riju in development mode:
```
$ make dev
``` ```
You should now be able to navigate to <http://localhost:6119> and see You should now be able to navigate to <http://localhost:6119> and see
that Riju is running, although it does not have any languages that Riju is running, although it does not have any languages
installed. installed.
Finally, switch back to the admin shell (`control-b p`). We are ready We are now ready to start creating your new language.
to start creating your new language.
## Create a language configuration ## Create a language configuration
Create a file `langs/mylanguage.yaml` with the following contents: Create a file `langs/mylanguage.yaml` with the following contents
(replacing `mylanguage` and `My Language` with appropriate values,
like `objectivecpp` and `Objective-C++`):
```yaml ```yaml
id: "mylanguage" id: "mylanguage"
@ -115,15 +87,21 @@ run: |
echo "Hello, world!" echo "Hello, world!"
``` ```
Now from the admin shell, run `make repkgs L=mylanguage`. Once that Open a new tmux pane in the admin shell (`control-b c`) and build the
completes, you should see your language at <http://localhost:6119>. Docker image for your language:
Furthermore, you can switch to the runtime image (`control-b n`) and
run `make sandbox L=mylanguage` to test your language at the command
line (e.g. type `run` to print `Hello, world!`). Each time you modify
the language configuration, run `make repkgs L=mylanguage` to
reinstall the language.
Follow these steps to augment your language configuration: ```
$ dep image:lang-mylanguage
```
Once that completes, you should see your language at
<http://localhost:6119>. Furthermore, you can run `make sandbox
L=mylanguage` to test your language at the command line (e.g. type
`run` to print `Hello, world!`). Each time you modify the language
configuration, run `dep image:lang-mylanguage` to update the language.
Follow these steps to get from "Hello, world" to running your actual
language:
* [Install your language](tutorial/install.md) * [Install your language](tutorial/install.md)
* [Provide run commands](tutorial/run.md) * [Provide run commands](tutorial/run.md)

View File

@ -1,6 +1,6 @@
# Tutorial: install your language # Tutorial: install your language
Presumably, your language isn't installed by default in Ubuntu. If Most likely, your language isn't installed by default in Ubuntu. If
not, you'll need to add an `install:` block to your language not, you'll need to add an `install:` block to your language
configuration describing how to install it. configuration describing how to install it.
@ -95,7 +95,8 @@ paths for the targets of symlinks (`/opt/swift/bin/swiftc`) but
This is because while we are putting all files into `${pkg}` during This is because while we are putting all files into `${pkg}` during
build, the eventual place they will be installed by the package is build, the eventual place they will be installed by the package is
into the root filesystem, so any references to paths *within* files into the root filesystem, so any references to paths *within* files
(including symlink targets) must not mention `${pkg}`. (including symlink targets) must not mention `${pkg}`. This is a
standard feature of all Linux packaging tools.
```yaml ```yaml
install: install:

View File

@ -62,9 +62,8 @@ Here are some explicit *non-requirements*:
* *Language must be well-known.* Nope, I'll be happy to add your pet * *Language must be well-known.* Nope, I'll be happy to add your pet
project; after all, [Kalyn](https://github.com/raxod502/kalyn) and project; after all, [Kalyn](https://github.com/raxod502/kalyn) and
[Ink](https://github.com/thesephist/ink) are already supported. [Ink](https://github.com/thesephist/ink) are already supported.
* *Language must be useful.* I would have no objection to adding * *Language must be useful.* I have no objection to adding everything
everything on the esolangs wiki, if there are interpreters/compilers on the esolangs wiki, if there are interpreters/compilers available.
available.
* *Language must be easy to install and run.* Well, it would be nice, * *Language must be easy to install and run.* Well, it would be nice,
but I've seen some s\*\*\* when adding languages to Riju so it will but I've seen some s\*\*\* when adding languages to Riju so it will
take a lot to surprise me at this point. take a lot to surprise me at this point.

View File

@ -27,7 +27,7 @@ const jsonSchemaPromise = readJSONSchemaFromDisk();
export async function getLangs() { export async function getLangs() {
return (await fs.readdir("langs")) return (await fs.readdir("langs"))
.filter((lang) => lang.endsWith(".yaml")) .filter((lang) => lang.endsWith(".yaml"))
.map((lang) => path.parse(lang).name); .map((lang) => path.parse(lang).name).sort();
} }
// Return a list of the IDs of all the configured shared dependencies. // Return a list of the IDs of all the configured shared dependencies.