mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-18 20:31:40 +03:00
Merge branch 'develop' into ted/ames-clog-less
This commit is contained in:
commit
4bac6ea642
10
.github/ISSUE_TEMPLATE/blank-issue.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/blank-issue.md
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
name: Blank Issue
|
||||||
|
about: Other
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,8 +1,8 @@
|
|||||||
blank_issues_enabled: true
|
blank_issues_enabled: true
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Submit a Landscape issue
|
- name: Submit a Landscape issue
|
||||||
url: https://github.com/urbit/landscape/issues/new/choose
|
url: https://github.com/tloncorp/landscape-apps/issues/new/choose
|
||||||
about: Issues with Landscape (Tlon's flagship client) should be filed at urbit/landscape. This includes groups, chats, collections, notebooks, and more.
|
about: Issues with Landscape should be filed at tloncorp/landscape-apps. This includes Groups, Talk, and Landscape proper.
|
||||||
- name: urbit-dev mailing list
|
- name: urbit-dev mailing list
|
||||||
url: https://groups.google.com/a/urbit.org/g/dev
|
url: https://groups.google.com/a/urbit.org/g/dev
|
||||||
about: Developer questions and discussions also take place on the urbit-dev mailing list.
|
about: Developer questions and discussions also take place on the urbit-dev mailing list.
|
||||||
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -12,9 +12,11 @@ on:
|
|||||||
- 'pkg/libaes_siv/**'
|
- 'pkg/libaes_siv/**'
|
||||||
- 'pkg/urbit/**'
|
- 'pkg/urbit/**'
|
||||||
- 'pkg/urcrypt/**'
|
- 'pkg/urcrypt/**'
|
||||||
|
- 'tests/**'
|
||||||
- 'bin/**'
|
- 'bin/**'
|
||||||
- 'nix/**'
|
- 'nix/**'
|
||||||
- 'default.nix'
|
- 'default.nix'
|
||||||
|
- 'vere-version'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/build.yml'
|
- '.github/workflows/build.yml'
|
||||||
@ -26,9 +28,11 @@ on:
|
|||||||
- 'pkg/libaes_siv/**'
|
- 'pkg/libaes_siv/**'
|
||||||
- 'pkg/urbit/**'
|
- 'pkg/urbit/**'
|
||||||
- 'pkg/urcrypt/**'
|
- 'pkg/urcrypt/**'
|
||||||
|
- 'tests/**'
|
||||||
- 'bin/**'
|
- 'bin/**'
|
||||||
- 'nix/**'
|
- 'nix/**'
|
||||||
- 'default.nix'
|
- 'default.nix'
|
||||||
|
- 'vere-version'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-vere:
|
call-vere:
|
||||||
|
24
.github/workflows/frontend-test.yml
vendored
24
.github/workflows/frontend-test.yml
vendored
@ -1,24 +0,0 @@
|
|||||||
name: frontend-test
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'pkg/interface/**'
|
|
||||||
- 'pkg/btc-wallet/**'
|
|
||||||
- 'pkg/npm/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
frontend-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: "Test changed frontend packages"
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- run: git fetch --prune
|
|
||||||
- name: 'Setup root deps'
|
|
||||||
run: npm ci
|
|
||||||
- name: 'Setup dependencies'
|
|
||||||
run: npm run bootstrap
|
|
||||||
- name: 'Run tests'
|
|
||||||
run: npm run test -- --since origin/$GITHUB_BASE_REF --include-dependents
|
|
4
.github/workflows/ota.yml
vendored
4
.github/workflows/ota.yml
vendored
@ -3,7 +3,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'next/arvo'
|
- 'develop'
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -16,4 +16,4 @@ jobs:
|
|||||||
credentials: ${{ secrets.JANEWAY_SERVICE_KEY }}
|
credentials: ${{ secrets.JANEWAY_SERVICE_KEY }}
|
||||||
ssh-sec-key: ${{ secrets.JANEWAY_SSH_SEC_KEY }}
|
ssh-sec-key: ${{ secrets.JANEWAY_SSH_SEC_KEY }}
|
||||||
ssh-pub-key: ${{ secrets.JANEWAY_SSH_PUB_KEY }}
|
ssh-pub-key: ${{ secrets.JANEWAY_SSH_PUB_KEY }}
|
||||||
ref: 'next/arvo'
|
ref: 'develop'
|
||||||
|
14
.github/workflows/pre-release.yml
vendored
14
.github/workflows/pre-release.yml
vendored
@ -1,14 +0,0 @@
|
|||||||
name: pre-release
|
|
||||||
|
|
||||||
on:
|
|
||||||
release: null
|
|
||||||
push:
|
|
||||||
tags: 'urbit-v[0-9]+.[0-9]+-rc[0-9]+'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
call-vere:
|
|
||||||
uses: ./.github/workflows/vere.yml
|
|
||||||
with:
|
|
||||||
pace: 'soon'
|
|
||||||
upload: true
|
|
||||||
secrets: inherit
|
|
51
.github/workflows/release-docker.yml
vendored
51
.github/workflows/release-docker.yml
vendored
@ -1,51 +0,0 @@
|
|||||||
name: release-docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
release: null
|
|
||||||
push:
|
|
||||||
tags: 'urbit-v[0-9]+.[0-9]+'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
upload:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- { os: ubuntu-latest, system: x86_64-linux }
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: cachix/install-nix-action@v16
|
|
||||||
with:
|
|
||||||
extra_nix_config: |
|
|
||||||
system-features = nixos-test benchmark big-parallel kvm
|
|
||||||
- uses: cachix/cachix-action@v10
|
|
||||||
with:
|
|
||||||
name: ares
|
|
||||||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
||||||
- uses: docker/docker-login-action@v1.8.0
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
- uses: christian-korneck/update-container-description-action@v1
|
|
||||||
env:
|
|
||||||
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
destination_container_repo: ${{ secrets.DOCKERHUB_USERNAME }}/urbit
|
|
||||||
provider: dockerhub
|
|
||||||
short_description: 'Urbit: a clean-slate OS and network for the 21st century'
|
|
||||||
readme_file: 'pkg/docker-image/README.md'
|
|
||||||
|
|
||||||
- run: |
|
|
||||||
version="$(cat ./pkg/urbit/version)"
|
|
||||||
image="$(nix-build -A docker-image)"
|
|
||||||
imageName="$(nix-instantiate --eval -A docker-image.imageName | cut -d'"' -f2)"
|
|
||||||
imageTag="$(nix-instantiate --eval -A docker-image.imageTag | cut -d'"' -f2)"
|
|
||||||
# Load the image from the nix-built tarball
|
|
||||||
docker load -i $image
|
|
||||||
docker tag "$imageName:$imageTag" ${{secrets.DOCKERHUB_USERNAME }}/urbit:v$version
|
|
||||||
docker tag "$imageName:$imageTag" ${{secrets.DOCKERHUB_USERNAME }}/urbit:latest
|
|
||||||
docker push ${{secrets.DOCKERHUB_USERNAME }}/urbit:v$version
|
|
||||||
docker push ${{secrets.DOCKERHUB_USERNAME }}/urbit:latest
|
|
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@ -1,14 +0,0 @@
|
|||||||
name: release
|
|
||||||
|
|
||||||
on:
|
|
||||||
release: null
|
|
||||||
push:
|
|
||||||
tags: 'urbit-v[0-9]+.[0-9]+'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
call-vere:
|
|
||||||
uses: ./.github/workflows/vere.yml
|
|
||||||
with:
|
|
||||||
pace: 'live'
|
|
||||||
upload: true
|
|
||||||
secrets: inherit
|
|
44
.github/workflows/tarballs.yml
vendored
44
.github/workflows/tarballs.yml
vendored
@ -1,44 +0,0 @@
|
|||||||
name: tarballs
|
|
||||||
|
|
||||||
on:
|
|
||||||
release: null
|
|
||||||
push:
|
|
||||||
tags: ['*']
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
upload:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- { os: ubuntu-latest, system: x86_64-linux }
|
|
||||||
- { os: macos-latest, system: x86_64-darwin }
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: cachix/install-nix-action@v16
|
|
||||||
- uses: cachix/cachix-action@v10
|
|
||||||
with:
|
|
||||||
name: ${{ secrets.CACHIX_NAME }}
|
|
||||||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
||||||
|
|
||||||
- uses: google-github-actions/setup-gcloud@v0.2.0
|
|
||||||
with:
|
|
||||||
version: '290.0.1'
|
|
||||||
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
|
|
||||||
project_id: ${{ secrets.GCS_PROJECT }}
|
|
||||||
export_default_credentials: true
|
|
||||||
|
|
||||||
- run: nix-build -A tarball --arg enableStatic true
|
|
||||||
|
|
||||||
- name: Run upload to bootstrap.urbit.org
|
|
||||||
run: |
|
|
||||||
version="$(cat ./pkg/urbit/version)"
|
|
||||||
system="$(nix-instantiate --eval --expr 'builtins.currentSystem')"
|
|
||||||
system=${system:1:${#system}-2}
|
|
||||||
target="gs://bootstrap.urbit.org/ci/urbit-v${version}-${system}-${GITHUB_SHA:0:9}.tgz"
|
|
||||||
|
|
||||||
gsutil cp -n ./result "$target"
|
|
||||||
|
|
||||||
echo "upload to $target complete."
|
|
201
.github/workflows/vere.yml
vendored
201
.github/workflows/vere.yml
vendored
@ -51,8 +51,6 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- { os: ubuntu-latest, type: linux }
|
- { os: ubuntu-latest, type: linux }
|
||||||
- { os: macos-latest, type: macos }
|
|
||||||
- { os: buildjet-4vcpu-ubuntu-2204-arm, type: linux }
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
@ -76,196 +74,13 @@ jobs:
|
|||||||
name: ares
|
name: ares
|
||||||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||||
|
|
||||||
# run unit tests early on linux (x-compilation will skip them)
|
|
||||||
- name: build dynamic binary (and run tests)
|
|
||||||
if: ${{ matrix.type == 'linux' }}
|
|
||||||
run: nix-build -A urbit
|
|
||||||
|
|
||||||
- name: build static binary
|
|
||||||
run: |
|
|
||||||
nix-build -A urbit \
|
|
||||||
--arg enableStatic true \
|
|
||||||
--argstr verePace ${{ env.VERE_PACE }} > ./urbit-derivation
|
|
||||||
cat ./urbit-derivation
|
|
||||||
echo -n "urbit_static=" >> $GITHUB_ENV
|
|
||||||
cat ./urbit-derivation >> $GITHUB_ENV
|
|
||||||
cat ./urbit-derivation
|
|
||||||
|
|
||||||
- name: confirm binary is mostly static
|
|
||||||
if: matrix.type == 'macos'
|
|
||||||
run: |
|
|
||||||
bin="${{ env.urbit_static }}/bin/urbit"
|
|
||||||
|
|
||||||
if [ ! -f "$bin" ]; then
|
|
||||||
echo "no binary at $bin"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
libs="$(otool -L "${{ env.urbit_static }}/bin/urbit" | tail -n +2)"
|
|
||||||
|
|
||||||
# XX CoreFoundation?
|
|
||||||
if [ -z "$(echo "$libs" | grep -v libSystem)" ]; then
|
|
||||||
echo "it's mostly static"
|
|
||||||
echo "$libs"
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "dynamic links found:"
|
|
||||||
echo "$libs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: get version string
|
|
||||||
run: |
|
|
||||||
if [ "real" == "$VERSION_TYPE" ]; then
|
|
||||||
version="$(cat ./pkg/urbit/version)"
|
|
||||||
else
|
|
||||||
version="${GITHUB_SHA:0:9}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n "$version" > ./version-string
|
|
||||||
|
|
||||||
- name: upload version string artifact
|
|
||||||
if: matrix.type == 'linux'
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: version-string
|
|
||||||
path: version-string
|
|
||||||
|
|
||||||
- uses: google-github-actions/auth@v1
|
|
||||||
with:
|
|
||||||
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
|
|
||||||
|
|
||||||
- uses: google-github-actions/setup-gcloud@v1
|
|
||||||
if: inputs.upload
|
|
||||||
with:
|
|
||||||
project_id: ${{ secrets.GCS_PROJECT }}
|
|
||||||
|
|
||||||
- name: upload binary to bootstrap.urbit.org
|
|
||||||
if: inputs.upload
|
|
||||||
run: |
|
|
||||||
version="$(cat ./version-string)"
|
|
||||||
system="$(nix-instantiate --eval --expr 'builtins.currentSystem')"
|
|
||||||
system=${system:1:${#system}-2}
|
|
||||||
target="gs://${UPLOAD_BASE}/${VERE_PACE}/${version}/vere-v${version}-${system}"
|
|
||||||
|
|
||||||
gsutil cp -n "${{ env.urbit_static }}/bin/urbit" "$target"
|
|
||||||
exitcode=$?
|
|
||||||
|
|
||||||
test $exitcode -eq 0 &&
|
|
||||||
echo "upload to $target complete." ||
|
|
||||||
echo "upload to $target failed.";
|
|
||||||
exit $exitcode
|
|
||||||
|
|
||||||
- if: ${{ matrix.os == 'ubuntu-latest' }}
|
- if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
run: nix-build -A urbit-tests
|
name: run urbit-tests
|
||||||
|
|
||||||
- if: ${{ matrix.os == 'ubuntu-latest' }}
|
|
||||||
run: nix-build -A docker-image
|
|
||||||
|
|
||||||
mingw:
|
|
||||||
runs-on: windows-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: >
|
|
||||||
C:\msys64\msys2_shell.cmd -mingw64 -defterm -no-start -here -c
|
|
||||||
". <(cygpath '{0}')"
|
|
||||||
working-directory: ./pkg/urbit
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
|
|
||||||
# echo suppresses pacman prompt
|
|
||||||
- run: echo|./configure
|
|
||||||
env:
|
|
||||||
CACHIX_CACHE: ares
|
|
||||||
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
||||||
|
|
||||||
- run: mingw32-make build/urbit
|
|
||||||
- run: mingw32-make test
|
|
||||||
- run: >
|
|
||||||
build/urbit -l -d -B ../../bin/solid.pill -F bus &&
|
|
||||||
curl -f --data '{"source":{"dojo":"+hood/exit"},"sink":{"app":"hood"}}'
|
|
||||||
http://localhost:12321
|
|
||||||
|
|
||||||
- name: confirm binary is mostly static
|
|
||||||
run: |
|
run: |
|
||||||
if [ -z "$(ldd build/urbit | grep -vi "windows/system32")"]; then
|
cp -RL tests pkg/arvo/tests
|
||||||
echo "it's mostly static"
|
vere="$(cat ./vere-version | sed -e 's/\([^ ]*\) \([^ ]*\)/\1\/\2\/vere-\2/g' | tr -d '\n')"
|
||||||
exit 0
|
url="$(echo https://bootstrap.urbit.org/vere/${vere}-linux-x86_64)"
|
||||||
else
|
# put in .jam so it doesn't crash when it gets -A'd in
|
||||||
echo "dynamic links found:"
|
curl -Lo pkg/arvo/vere.jam "$url"
|
||||||
ldd build/urbit
|
chmod +x pkg/arvo/vere.jam
|
||||||
exit 1
|
nix-build -A urbit-tests
|
||||||
fi
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
if: inputs.upload
|
|
||||||
with:
|
|
||||||
python-version: 3.7
|
|
||||||
|
|
||||||
- uses: google-github-actions/setup-gcloud@v0.6.0
|
|
||||||
if: inputs.upload
|
|
||||||
env:
|
|
||||||
# see https://github.com/google-github-actions/setup-gcloud/issues/100
|
|
||||||
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
|
|
||||||
with:
|
|
||||||
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
|
|
||||||
project_id: ${{ secrets.GCS_PROJECT }}
|
|
||||||
export_default_credentials: true
|
|
||||||
|
|
||||||
- name: upload binary to bootstrap.urbit.org
|
|
||||||
if: inputs.upload
|
|
||||||
env:
|
|
||||||
CLOUDSDK_PYTHON: ${{env.pythonLocation}}\python.exe
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [ "real" == "$VERSION_TYPE" ]; then
|
|
||||||
version="$(cat ./version)"
|
|
||||||
else
|
|
||||||
version="${GITHUB_SHA:0:9}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
system="x86_64-windows"
|
|
||||||
target="gs://${UPLOAD_BASE}/${VERE_PACE}/${version}/vere-v${version}-${system}.exe"
|
|
||||||
|
|
||||||
gsutil cp -n ./build/urbit.exe "$target"
|
|
||||||
exitcode=$?
|
|
||||||
|
|
||||||
test $exitcode -eq 0 &&
|
|
||||||
echo "upload to $target complete." ||
|
|
||||||
echo "upload to $target failed.";
|
|
||||||
exit $exitcode
|
|
||||||
|
|
||||||
|
|
||||||
after:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [urbit, mingw]
|
|
||||||
if: inputs.upload
|
|
||||||
steps:
|
|
||||||
- uses: google-github-actions/setup-gcloud@v0.2.0
|
|
||||||
with:
|
|
||||||
version: '290.0.1'
|
|
||||||
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
|
|
||||||
project_id: ${{ secrets.GCS_PROJECT }}
|
|
||||||
export_default_credentials: true
|
|
||||||
|
|
||||||
- name: download version-string
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: version-string
|
|
||||||
|
|
||||||
- name: update latest deployed version
|
|
||||||
run: |
|
|
||||||
target="gs://${UPLOAD_BASE}/${VERE_PACE}/last"
|
|
||||||
|
|
||||||
# *not* -n, as we want to overwrite the latest version-string
|
|
||||||
#
|
|
||||||
gsutil cp ./version-string "$target"
|
|
||||||
exitcode=$?
|
|
||||||
|
|
||||||
test $exitcode -eq 0 &&
|
|
||||||
echo "upload to $target complete." ||
|
|
||||||
echo "upload to $target failed.";
|
|
||||||
exit $exitcode
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; }
|
|
||||||
git lfs post-checkout "$@"
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"; exit 2; }
|
|
||||||
git lfs post-commit "$@"
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; }
|
|
||||||
git lfs post-merge "$@"
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; }
|
|
||||||
git lfs pre-push "$@"
|
|
376
CONTRIBUTING.md
376
CONTRIBUTING.md
@ -1,141 +1,101 @@
|
|||||||
# Contributing to Urbit
|
## Workflow
|
||||||
|
|
||||||
Thank you for your interest in contributing to Urbit.
|
Before beginning any unit of work, you should have a GitHub issue detailing the
|
||||||
|
scope of the work. This could be an issue someone else filed and has been
|
||||||
|
assigned to you (or you've assigned to yourself) or a new issue you filed
|
||||||
|
specifically for this unit of work. As much as possible, discussion of the work
|
||||||
|
should take place in the issue. When this is not possible, please update the
|
||||||
|
issue with relevant details from any offline conversations. Each issue should
|
||||||
|
provide a clear and thorough history of the work from inception to completion.
|
||||||
|
|
||||||
See [urbit.org/using/install][start] for basic orientation and usage
|
## Issues
|
||||||
instructions. You may also want to subscribe to [urbit-dev][list], the Urbit
|
|
||||||
development mailing list. For specific information on contributing to the Urbit
|
|
||||||
interface, see its [contribution guidelines][interface].
|
|
||||||
|
|
||||||
For information on Arvo's maintainers, see [pkg/arvo][main].
|
The [GitHub tracker][issu] is our canonical source of truth around issues, bugs,
|
||||||
|
performance problems and feature requests. If you encounter any issues when
|
||||||
|
developing on Urbit, feel free to submit a report about it here.
|
||||||
|
|
||||||
For more extensive information on Urbit development, such as how to set up an
|
A good bug report, description of a crash, etc., should ideally be
|
||||||
environment and how to submit a grant, see the [developer documentation][dev].
|
*reproducible*, with clear steps as to how another developer can replicate and
|
||||||
|
examine your problem. That said, this isn't always possible -- some bugs depend
|
||||||
|
on having created a complicated or unusual state, or can otherwise simply be
|
||||||
|
difficult to trigger again.
|
||||||
|
|
||||||
[start]: https://urbit.org/using/install
|
Your issue should thus at a minimum be *informative*. The best advice here is
|
||||||
[interface]: /pkg/interface/CONTRIBUTING.md
|
probably "don't write bad issues," where "bad" is a matter of judgment and
|
||||||
[dev]: https://urbit.org/docs/development
|
taste. Issues that the maintainers don't judge to be sufficiently useful or
|
||||||
|
informative may be closed.
|
||||||
|
|
||||||
## Fake ships
|
Feature requests are welcome, but they should include sufficient detail and
|
||||||
|
explanation, as well as a discussion of perceived benefits one could expect from
|
||||||
|
them. "It would be cool if.." probably does not, in itself, constitute a good
|
||||||
|
feature request; instead, try to be specific about what you're requesting, and
|
||||||
|
what your desired feature would accomplish.
|
||||||
|
|
||||||
You may have an identity on the live network, but doing all your development on
|
### Feature Branch Names
|
||||||
the live network would be cumbersome and unnecessary. Standard practice in
|
|
||||||
Urbit development is to work on a fake `~zod`. Fake ships use deterministic
|
|
||||||
keys (derived from the ship address) and don't talk to the live network. They
|
|
||||||
can talk to each other over the local loopback.
|
|
||||||
|
|
||||||
To start a fake ship, simply specify the name with `-F`:
|
Every branch that you intend to put up for review must adhere to the form
|
||||||
|
`i/<N>/<...>`, where `<N>` is the number of the issue that the branch
|
||||||
|
corresponds to and `<...>` is an optional short description of the branch to aid
|
||||||
|
in readability. If `<...>` is omitted, the `/` should be omitted as well, which
|
||||||
|
makes `i/<N>` a well-formed branch name. These feature branches should be based
|
||||||
|
off of `develop`.
|
||||||
|
|
||||||
```
|
### Commits
|
||||||
$ urbit -F zod
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also pass a name for the *pier* (or ship directory):
|
Commits should generally be relevant, atomic, and have descriptions formatted in
|
||||||
|
the following manner:
|
||||||
```
|
|
||||||
$ urbit -F zod -c my-fake-zod
|
|
||||||
```
|
|
||||||
|
|
||||||
To resume a fake ship, just pass the name of the pier:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ urbit my-fake-zod
|
|
||||||
```
|
|
||||||
|
|
||||||
Fake ships by default use the same pre-compiled kernelspace ('pills') as livenet
|
|
||||||
ships do: boot pills, which are not always current with `master`. If you wish to
|
|
||||||
develop using code off the master branch, run the following from the repo
|
|
||||||
directory:
|
|
||||||
|
|
||||||
```
|
|
||||||
git lfs install
|
|
||||||
git lfs pull
|
|
||||||
urbit -F zod -B "bin/solid.pill" -A "pkg/arvo"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Git practice
|
|
||||||
|
|
||||||
### Contributing
|
|
||||||
|
|
||||||
The canonical source tree is the `master` branch of
|
|
||||||
[https://github.com/urbit/urbit][repo]. You should typically branch off of
|
|
||||||
`master` when commencing new work. Most pull requests should be merging into
|
|
||||||
one of the `next/*` branches, depending on what part of the system the pull
|
|
||||||
request is targeting.
|
|
||||||
|
|
||||||
Since we use GitHub, we request you contribute via a GitHub pull request. Tag
|
|
||||||
the [maintainer][main] for the component. If you have a question for the
|
|
||||||
maintainer, you can direct message them from your Urbit ship using that
|
|
||||||
information.
|
|
||||||
|
|
||||||
When contributing changes, via whatever means, make sure you describe them
|
|
||||||
appropriately. You should attach a reasonably high-level summary of what the
|
|
||||||
changes are and what they do; reference any useful background material that may
|
|
||||||
exist, e.g. a GitHub issue, a mailing list discussion, a UP, etc. [Here][jbpr]
|
|
||||||
is a good example of a pull request with a useful, concise description.
|
|
||||||
|
|
||||||
If your changes replace significant extant functionality, be sure to compare
|
|
||||||
them with the thing you're replacing. You may also want to cc reviewers,
|
|
||||||
or other parties who might have a particular interest in what you're
|
|
||||||
contributing.
|
|
||||||
|
|
||||||
[jbpr]: https://github.com/urbit/urbit/pull/1782
|
|
||||||
|
|
||||||
### Hygiene
|
|
||||||
|
|
||||||
Commits should generally be relevant, atomic, and have descriptions formatted
|
|
||||||
in the following manner:
|
|
||||||
|
|
||||||
> component: short description
|
> component: short description
|
||||||
>
|
>
|
||||||
> long description
|
> long description
|
||||||
|
|
||||||
The 'component' is a short prefix of what area of the codebase the commit
|
The 'component' is a short prefix of what area of the codebase the commit
|
||||||
applies to. If a commit patches `%gall`, for example, the description should
|
applies to. If a commit patches `%gall`, for example, the description should be
|
||||||
be prefixed by 'gall'. If it touches `:aqua`, it should be prefixed by 'aqua'.
|
prefixed by 'gall'. If it touches `:aqua`, it should be prefixed by 'aqua'. If
|
||||||
If it touches multiple components, then separate these by commas, e.g. "gall,
|
it touches multiple components, then separate these by commas, e.g. "gall, aqua,
|
||||||
aqua, ph" -- but note that this may be a warning that too many changes are
|
ph" -- but note that this may be a warning that too many changes are being
|
||||||
being packed into a single commit. The 'component' and 'short description'
|
packed into a single commit. The 'component' and 'short description' combined
|
||||||
combined should be no more than 50 characters.
|
should be no more than 50 characters.
|
||||||
|
|
||||||
A lengthier description is encouraged, where useful, but is not always strictly
|
Every individual commit should at a minimum be in a compiling and runnable state.
|
||||||
required. You should use the longer description to give any useful background
|
Broken commits or commits simply marked "wip" are not allowed. If you need to
|
||||||
on or motivation for the commit, provide a summary of what it does, link to
|
clean up the commits in your branch, you can soft reset to an earlier state and
|
||||||
relevant issues, proposals, or other commits, and so on.
|
recommit with better metadata (or if the change is small enough, squash to one
|
||||||
|
good commit at the end).
|
||||||
|
|
||||||
|
A lengthier description is encouraged, but is not always strictly required. You
|
||||||
|
should use the longer description to give any useful background on or motivation
|
||||||
|
for the commit, provide a summary of what it does, link to relevant issues,
|
||||||
|
proposals, or other commits, and so on.
|
||||||
|
|
||||||
Here is an example of our commit format, taken from a commit in the history:
|
Here is an example of our commit format, taken from a commit in the history:
|
||||||
|
|
||||||
> zuse: remove superfluous 'scup' and 'culm' types.
|
> zuse: remove superfluous 'scup' and 'culm' types.
|
||||||
>
|
>
|
||||||
> %zuse includes definitions for 'scup' and 'culm', both of which are
|
> %zuse includes definitions for 'scup' and 'culm', both of which are
|
||||||
> superfluous. 'scup' is simply (pair ship desk) and is used only in
|
> superfluous. 'scup' is simply (pair ship desk) and is used only in the
|
||||||
> the definition of 'culm', a tagged union in which three of the four
|
> definition of 'culm', a tagged union in which three of the four branches are
|
||||||
> branches are commented out (i.e. are unused).
|
> commented out (i.e. are unused).
|
||||||
>
|
>
|
||||||
> This commit deletes 'scup' and 'culm' and refactors what little code
|
> This commit deletes 'scup' and 'culm' and refactors what little code made use
|
||||||
> made use of them.
|
> of them.
|
||||||
|
|
||||||
Note that the short description is prefixed by `zuse:`, which is what the
|
Note that the short description is prefixed by `zuse:`, which is what the commit
|
||||||
commit touches. Otherwise it just includes a summary of the change.
|
touches. Otherwise it just includes a summary of the change.
|
||||||
|
|
||||||
Here's another example:
|
Here's another example:
|
||||||
|
|
||||||
> build: give arvo a high priority
|
> build: give arvo a high priority
|
||||||
>
|
>
|
||||||
> 0bdced981e4 introduced the 'arvo-ropsten' derivation. Attempting to
|
> 0bdced981e4 introduced the 'arvo-ropsten' derivation. Attempting to install
|
||||||
> install both 'arvo' and 'arvo-ropsten' via nix-env will result in a
|
> both 'arvo' and 'arvo-ropsten' via nix-env will result in a priority error;
|
||||||
> priority error; this assigns a higher priority to 'arvo' to resolve the
|
> this assigns a higher priority to 'arvo' to resolve the conflict.
|
||||||
> conflict.
|
|
||||||
>
|
>
|
||||||
> Fixes #1912.
|
> Fixes #1912.
|
||||||
|
|
||||||
Note that it cites a previous relevant commit, `0bdced981e4`, in its summary,
|
Note that it cites a previous relevant commit, `0bdced981e4`, in its summary,
|
||||||
and also points at the issue that it resolves.
|
and also points at the issue that it resolves.
|
||||||
|
|
||||||
If you're in doubt about how to format your commit descriptions, take a look at
|
|
||||||
the recent history and try to mimic the style that you can see others broadly
|
|
||||||
follow there.
|
|
||||||
|
|
||||||
When we say commits should be "atomic", we mean with respect to some distinct
|
When we say commits should be "atomic", we mean with respect to some distinct
|
||||||
logical unit, e.g. a type definition used across many files, or a single file,
|
logical unit, e.g. a type definition used across many files, or a single file,
|
||||||
or just a single function in a single file. Commits should be atomic at the
|
or just a single function in a single file. Commits should be atomic at the
|
||||||
@ -144,104 +104,83 @@ into a single one that captures everything you're trying to do -- the history
|
|||||||
will never make for pleasant bedtime reading, so focus instead on making your
|
will never make for pleasant bedtime reading, so focus instead on making your
|
||||||
commits useful for tools like `git-blame` and `git-bisect`.
|
commits useful for tools like `git-blame` and `git-bisect`.
|
||||||
|
|
||||||
Your contribution must apply cleanly to `master` in order to be considered
|
Your contribution must apply cleanly to `develop` in order to be considered
|
||||||
mergeable. You may want to regularly [rebase your changes][reba] onto `master`
|
mergeable. You may want to regularly [rebase your changes][reba] onto
|
||||||
in order to both clean up any intermediate "development" commits you make and
|
`develop` in order to both clean up any intermediate "development" commits you
|
||||||
to ensure that you're up to date.
|
make and to ensure that you're up to date.
|
||||||
|
|
||||||
If you're making a GitHub pull request, it's good practice to make it from a
|
### Pull Requests and Merges
|
||||||
topic branch, rather than `master`, on your fork.
|
|
||||||
|
|
||||||
### Pills
|
When your work is ready for review, open a pull request, making sure to link to
|
||||||
|
the tracking issue in the description, which should be formatted as follows
|
||||||
|
(where `<N>` is the number of this work's tracking issue):
|
||||||
|
|
||||||
|
```
|
||||||
|
### Description
|
||||||
|
|
||||||
|
Resolves #<N>.
|
||||||
|
|
||||||
|
Thoroughly describe the changes made.
|
||||||
|
|
||||||
|
### Related
|
||||||
|
|
||||||
|
Reference any related issues, links, papers, etc. here.
|
||||||
|
```
|
||||||
|
|
||||||
|
Tests will run automatically via GitHub Actions when you open a pull request or
|
||||||
|
push new commits to an existing pull request.
|
||||||
|
|
||||||
|
Once you've collected and addressed feedback, tests are passing, and your PR has
|
||||||
|
been approved, merge the pull request.
|
||||||
|
|
||||||
|
**Note**: If you are merging into develop, you *must* be syncing OTAs from
|
||||||
|
`~binnec-dozzod-marzod` which gets the tip of develop deployed to it. If
|
||||||
|
your merge breaks `binnec` it's your responsibility to alert people and
|
||||||
|
fix it. Your PR is shipped when it's successfully been deployed to
|
||||||
|
`~binnec` and picked up by your personal ship. If you're merging on behalf
|
||||||
|
of an external developer, this is also your responsibility.
|
||||||
|
|
||||||
|
If you properly included the "Resolves
|
||||||
|
#N." directive in the pull request description, merging will automatically close
|
||||||
|
the tracking issue associated with the pull request.
|
||||||
|
|
||||||
|
## Code style
|
||||||
|
|
||||||
|
Hoon will be a less familiar language to many contributors. We've published
|
||||||
|
some [style guidelines for Hoon][hoon], but above all you should try to mimic
|
||||||
|
the style of the code around you. With regards to the style used throughout the
|
||||||
|
codebase: the more recently the code was written, the more standard and accepted
|
||||||
|
its style is likely to be.
|
||||||
|
|
||||||
|
### Kernel Development and Pills
|
||||||
|
|
||||||
|
Urbit bootstraps itself from a pill (you can see it being fetched from
|
||||||
|
`bootstrap.urbit.org` on boot). This is the compiled version of the kernel
|
||||||
|
(which you can find in the `sys` directory of [Arvo][arvo]), along with a
|
||||||
|
complete copy of the Arvo source.
|
||||||
|
|
||||||
|
You can find the latest solid pill, as well as the latest so-called *brass*
|
||||||
|
and *ivory* pills, in the `bin/` directory at the repository root.
|
||||||
|
|
||||||
Any contribution that touches the kernel (i.e., anything in `pkg/arvo/sys`),
|
Any contribution that touches the kernel (i.e., anything in `pkg/arvo/sys`),
|
||||||
should be accompanied by an updated [solid pill](#the-kernel-and-pills). Pills
|
should be accompanied by an updated [solid pill](#the-kernel-and-pills). Pills
|
||||||
are tracked in the repository via [git LFS][git-lfs].
|
are tracked in the repository via [git LFS][git-lfs].
|
||||||
|
|
||||||
Whenever you make a contribution to the kernel, please create a new solid pill
|
|
||||||
via:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
sh/update-solid-pill
|
$ git lfs init
|
||||||
|
$ git lfs pull
|
||||||
```
|
```
|
||||||
|
|
||||||
and include it along with your contribution.
|
[git-lfs]: https://git-lfs.github.com
|
||||||
|
|
||||||
Historically, we've sometimes included these updated pills in separate,
|
The +solid command is used to write the compiled kernel to a file.
|
||||||
standalone commits (you will see plenty of "pills: update solid" and similar
|
|
||||||
commits if you look through the history), but this practice is considered to be
|
|
||||||
deprecated -- you should usually just include the updated pill in the same
|
|
||||||
commit that updates the source.
|
|
||||||
|
|
||||||
## Releases
|
|
||||||
|
|
||||||
We typically create releases by tagging appropriate commits on `master`, so any
|
|
||||||
given commit in `master` may not actually be present in the latest release.
|
|
||||||
|
|
||||||
We perform updates by pushing releases over-the-air to `~zod` approximately
|
|
||||||
once per week, so any contribution that can be deployed OTA will usually find
|
|
||||||
its way onto the network pretty rapidly.
|
|
||||||
|
|
||||||
If you want to propose a hotfix (i.e. a small, OTA-updateable change, usually a
|
|
||||||
bugfix, to some currently-deployed release) then simply make it clear that your
|
|
||||||
contribution -- whether it be a pull request, patch, or whatever -- is intended
|
|
||||||
to be a hotfix. A maintainer can then deploy it to the network outside of the
|
|
||||||
normal release schedule.
|
|
||||||
|
|
||||||
Less frequently we release new Vere versions, which requires users to download
|
|
||||||
new binaries, and occasionally, while Urbit is still in early development, we
|
|
||||||
breach network continuity in order to release large changes that are difficult
|
|
||||||
to push out over-the-air. Contributions to Vere, or non-OTA-able updates to
|
|
||||||
Arvo, will find their way into releases before terribly long.
|
|
||||||
|
|
||||||
## Code style
|
|
||||||
|
|
||||||
The Urbit project uses two-space indentation and avoids tab characters.
|
|
||||||
In C code, it should not be too difficult to mimic the style of the code
|
|
||||||
around you, which is just fairly standard K&R with braces on every
|
|
||||||
compound statement. One thing to watch out for is top-level sections in
|
|
||||||
source files that are denoted by comments and are actually indented one
|
|
||||||
level.
|
|
||||||
|
|
||||||
Hoon will be a less familiar language to many contributors. We've published
|
|
||||||
some [style guidelines for Hoon][hoon], but above all you should try to mimic
|
|
||||||
the style of the code around you. With regards to the style used throughout
|
|
||||||
the codebase: the more recently the code was written, the more standard and
|
|
||||||
accepted its style is likely to be.
|
|
||||||
|
|
||||||
## Kernel development
|
|
||||||
|
|
||||||
Working on either C or non-kernel Hoon should not bring any surprises, but the
|
|
||||||
Hoon kernel (anything under [`pkg/arvo/sys/`][sys]) is bootstrapped from a
|
|
||||||
so-called *pill*, and must be recompiled if any changes are made. This should
|
|
||||||
happen automatically when you make changes, but if it doesn't, the command to
|
|
||||||
manually recompile and install the new kernel is `|reset` in `dojo`. This
|
|
||||||
rebuilds from the `sys` directory in the `base` desk in `%clay`.
|
|
||||||
|
|
||||||
Currently, `|reset` does not reload apps like `dojo` itself, which will still
|
|
||||||
reference the old kernel. To force them to reload, make a trivial edit to their
|
|
||||||
main source file (under the `app` directory) in `%clay`.
|
|
||||||
|
|
||||||
[arvo]: https://github.com/urbit/urbit/tree/master/pkg/arvo
|
|
||||||
[sys]: https://github.com/urbit/urbit/tree/master/pkg/arvo/sys
|
|
||||||
|
|
||||||
## The kernel and pills
|
|
||||||
|
|
||||||
Urbit bootstraps itself using a binary blob called a pill (you can see it being
|
|
||||||
fetched from `bootstrap.urbit.org` on boot). This is the compiled version of
|
|
||||||
the kernel (which you can find in the `sys` directory of [Arvo][arvo]), along
|
|
||||||
with a complete copy of the Arvo source.
|
|
||||||
|
|
||||||
The procedure for creating a pill is often called "soliding." It is somewhat
|
|
||||||
similar to `|reset`, but instead of replacing your running kernel, it writes
|
|
||||||
the compiled kernel to a file. The command to solid is:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
> .urbit/pill +solid
|
> .urbit/pill +solid
|
||||||
```
|
```
|
||||||
|
|
||||||
When the compilation finishes, your pill will be found in the
|
When the compilation finishes, your pill will be found in the `[pier]/.urb/put/`
|
||||||
`[pier]/.urb/put/` directory as `urbit.pill`.
|
directory as `urbit.pill`.
|
||||||
|
|
||||||
You can boot a new ship from your local pill with `-B`:
|
You can boot a new ship from your local pill with `-B`:
|
||||||
|
|
||||||
@ -253,48 +192,57 @@ Release pills, i.e. those corresponding to vere releases, are cached at
|
|||||||
`https://bootstrap.urbit.org` and are indexed by the vere version number, e.g.
|
`https://bootstrap.urbit.org` and are indexed by the vere version number, e.g.
|
||||||
`urbit-0.8.2.pill`.
|
`urbit-0.8.2.pill`.
|
||||||
|
|
||||||
Pills are also cached in version control via [git LFS][git-lfs]. You can find
|
Whenever you make a contribution to the kernel, please create a new solid pill
|
||||||
the latest solid pill, as well as the latest so-called *brass* and *ivory*
|
via:
|
||||||
pills, in the `bin/` directory at the repository root. Note that you'll need
|
|
||||||
to initialise git LFS in order to check these pills out:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git lfs init
|
sh/update-solid-pill
|
||||||
$ git lfs pull
|
|
||||||
```
|
```
|
||||||
|
|
||||||
[git-lfs]: https://git-lfs.github.com
|
You should include the updated pill in the same commit that updates the source.
|
||||||
|
|
||||||
## Issues
|
## Development Environment
|
||||||
|
|
||||||
The [GitHub tracker][issu] is our canonical source of truth around issues,
|
Although you likely have an identity on the live network, developing on the live
|
||||||
bugs, performance problems, feature requests, and so on. If you encounter any
|
network is high-risk and largely unnecessary. Instead, standard practice is to
|
||||||
issues when developing on Urbit, feel free to submit a report about it here.
|
work on a fake ship. Fake ships use deterministic keys derived from the ship's
|
||||||
|
address, don't communicate on the live network, and can communicate with other
|
||||||
|
fake ships over the local loopback.
|
||||||
|
|
||||||
A good bug report, description of a crash, etc., should ideally be
|
### Boot a New Fake Ship
|
||||||
*reproducible*, with clear steps as to how another developer can replicate and
|
|
||||||
examine your problem. That said, this isn't always possible -- some bugs
|
|
||||||
depend on having created a complicated or unusual state, or can otherwise
|
|
||||||
simply be difficult to trigger again (say, you encountered it in the last
|
|
||||||
continuity era).
|
|
||||||
|
|
||||||
Your issue should thus at a minimum be *informative*. The best advice here is
|
To boot a new fake ship, pass the `-F` flag and a valid Urbit ship name to
|
||||||
probably "don't write bad issues," where "bad" is a matter of judgment and
|
`urbit`:
|
||||||
taste. Issues that the maintainers don't judge to be sufficiently useful or
|
|
||||||
informative may be closed.
|
|
||||||
|
|
||||||
Feature requests are welcome, but they should include sufficient detail and
|
```console
|
||||||
explanation, as well as a discussion of perceived benefits one could expect
|
$ bazel build :urbit
|
||||||
from them. "It would be cool if.." probably does not, in itself, constitute a
|
$ ln -s bazel-bin/pkg/vere/urbit urbit
|
||||||
good feature request; instead, try to be specific about what you're requesting,
|
$ ./urbit -F <ship>
|
||||||
and what your desired feature would accomplish.
|
```
|
||||||
|
|
||||||
## Staying in touch
|
By default, booting a fake ship will use the same pill that livenet ships use,
|
||||||
|
which leads to a non-trivial boot time on the order of tens of minutes. However,
|
||||||
|
using a development specific "solid" pill reduces this time to a couple minutes.
|
||||||
|
|
||||||
|
To boot using the solid pill, download or create one as described in the Kernel
|
||||||
|
Development and Pills section above and then run the following:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ ./urbit -F <ship> -B solid.pill
|
||||||
|
```
|
||||||
|
|
||||||
|
### Launch an Existing Fake Ship
|
||||||
|
|
||||||
|
To launch an existing fake ship, supply the pier (the ship directory), which is
|
||||||
|
simply the name of the ship[^1], to `urbit`:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ ./urbit <ship>
|
||||||
|
```
|
||||||
|
|
||||||
|
[^1]: Unless you specified the pier name using the `-c` flag.
|
||||||
|
|
||||||
Questions or other communications about contributing to Urbit can go to
|
|
||||||
[support@urbit.org][mail].
|
|
||||||
|
|
||||||
[mail]: mailto:support@urbit.org
|
|
||||||
[list]: https://groups.google.com/a/urbit.org/forum/#!forum/dev
|
[list]: https://groups.google.com/a/urbit.org/forum/#!forum/dev
|
||||||
[repo]: https://github.com/urbit/urbit
|
[repo]: https://github.com/urbit/urbit
|
||||||
[reba]: https://git-rebase.io/
|
[reba]: https://git-rebase.io/
|
||||||
|
400
MAINTAINERS.md
400
MAINTAINERS.md
@ -1,249 +1,98 @@
|
|||||||
# Maintainers' Guide
|
# Maintaining
|
||||||
|
|
||||||
## Branch organization
|
## Overview
|
||||||
|
|
||||||
The essence of this branching scheme is that you create "release branches" of
|
We use a three-stage release pipeline. Each stage of the release pipeline has
|
||||||
independently releasable units of work. These can then be released by their
|
its own dedicated branch and corresponding testing moon. Features and bug fixes
|
||||||
maintainers when ready.
|
progress through each stage--and are subject to testing along the way--until
|
||||||
|
they're eventually released to the live network. This pipeline automates our
|
||||||
|
release process, making it much easier to quickly and reliably ship code. It's
|
||||||
|
also simple to reason about.
|
||||||
|
|
||||||
### Master branch
|
## Branches and Moons
|
||||||
|
|
||||||
Master is what's released on the network. Deployment instructions are in the
|
|
||||||
next section, but tagged releases should always come from this branch.
|
|
||||||
|
|
||||||
### Feature branches
|
|
||||||
|
|
||||||
Anyone can create feature branches. For those with commit access to
|
|
||||||
urbit/urbit, you're welcome to create them in this repo; otherwise, fork the
|
|
||||||
repo and create them there.
|
|
||||||
|
|
||||||
Usually, new development should start from master, but if your work depends on
|
|
||||||
work in another feature branch or release branch, start from there.
|
|
||||||
|
|
||||||
If, after starting your work, you need changes that are in master, merge it into
|
|
||||||
your branch. If you need changes that are in a release branch or feature
|
|
||||||
branch, merge it into your branch, but understand that your work now depends on
|
|
||||||
that release branch, which means it won't be released until that one is
|
|
||||||
released.
|
|
||||||
|
|
||||||
### Release branches
|
|
||||||
|
|
||||||
Release branches are code that is ready to release. All release branch names
|
|
||||||
should start with `next/`.
|
|
||||||
|
|
||||||
All code must be reviewed before being pushed to a release branch. Thus,
|
|
||||||
feature branches should be PR'd against a release branch, not master.
|
|
||||||
|
|
||||||
Create new release branches as needed. You don't need a new one for every PR,
|
|
||||||
since many changes are relatively small and can be merged together with little
|
|
||||||
risk. However, once you merge two branches, they're now coupled and will only
|
|
||||||
be released together -- unless one of the underlying commits is separately put
|
|
||||||
on a release branch.
|
|
||||||
|
|
||||||
Here's a worked example. The rule is to make however many branches are useful,
|
|
||||||
and no more. This example is not prescriptive; the developers making the
|
|
||||||
changes may add, remove, or rename branches in this flow at will.
|
|
||||||
|
|
||||||
Suppose you (plural, the dev community at large) complete some work in a
|
|
||||||
userspace app, and you put it in `next/landscape`. Separately, you make a small
|
|
||||||
JS change. If you PR it to `next/landscape`, then it will only be released at
|
|
||||||
the same time as the app changes. Maybe this is fine, or maybe you want this
|
|
||||||
change to go out quickly, and the change in `next/landscape` is relatively
|
|
||||||
risky, so you don't want to push it out on Friday afternoon. In this case, put
|
|
||||||
the change in another release branch, say `next/js`. Now either can be released
|
|
||||||
independently.
|
|
||||||
|
|
||||||
Suppose you do further work that you want to PR to `next/landscape`, but it
|
|
||||||
depends on your fixes in `next/js`. Simply merge `next/js` into either your
|
|
||||||
feature branch or `next/landscape` and PR your finished work to
|
|
||||||
`next/landscape`. Now there is a one-way coupling: `next/landscape` contains
|
|
||||||
`next/js`, so releasing it will implicitly release `next/js`. However, you can
|
|
||||||
still release `next/js` independently.
|
|
||||||
|
|
||||||
This scheme extends to other branches, like `next/base` or `next/os1.1` or
|
|
||||||
`next/ford-fusion`. Some branches may be long-lived and represent simply the
|
|
||||||
"next" release of something, while others will have a definite lifetime that
|
|
||||||
corresponds to development of a particular feature or numbered release.
|
|
||||||
|
|
||||||
Since they are "done", release branches should be considered "public", in the
|
|
||||||
sense that others may depend on them at will. Thus, never rebase a release
|
|
||||||
branch.
|
|
||||||
|
|
||||||
When cutting a new release, you can filter branches with `git branch --list
|
|
||||||
'next/*'` or by typing "next/" in the branch filter on Github. This will give
|
|
||||||
you the list of branches which have passed review and may be merged to master
|
|
||||||
and released. When choosing which branches to release, make sure you understand
|
|
||||||
the risks of releasing them immediately. If merging these produces nontrivial
|
|
||||||
conflicts, consider asking the developers on those branches to merge between
|
|
||||||
themselves. In many cases a developer can do this directly, but if it's
|
|
||||||
sufficiently nontrivial, this may be a reviewed PR of one release branch into
|
|
||||||
another.
|
|
||||||
|
|
||||||
#### Standard release branches
|
|
||||||
|
|
||||||
While you can always create non-standard release branches to stage for a
|
|
||||||
particular release, most changes should go through the following:
|
|
||||||
|
|
||||||
- next/base -- changes to the %base desk in pkg/arvo
|
|
||||||
- next/garden -- changes to the %garden desk
|
|
||||||
- next/landscape -- changes to the %landscape desk
|
|
||||||
- next/bitcoin -- changes to the %bitcoin desk
|
|
||||||
- next/webterm -- changes to the %webterm desk
|
|
||||||
- next/vere -- changes to the runtime
|
|
||||||
|
|
||||||
### Other cases
|
|
||||||
|
|
||||||
Outside contributors can generally target their PRs against master unless
|
|
||||||
specifically instructed. Maintainers should retarget those branches as
|
|
||||||
appropriate.
|
|
||||||
|
|
||||||
If a commit is not something that goes into a release (eg changes to README or
|
|
||||||
CI), it may be committed straight to master.
|
|
||||||
|
|
||||||
If a hotfix is urgent, it may be PR'd straight to master. This should only be
|
|
||||||
done if you reasonably expect that it will be released soon and before anything
|
|
||||||
else is released.
|
|
||||||
|
|
||||||
If a series of commits that you want to release is on a release branch, but you
|
|
||||||
really don't want to release the whole branch, you must cherry-pick them onto
|
|
||||||
another release branch. Cherry-picking isn't ideal because those commits will
|
|
||||||
be duplicated in the history, but it won't have any serious side effects.
|
|
||||||
|
|
||||||
|
|
||||||
## Hotfixes
|
|
||||||
|
|
||||||
Here lies an informal guide for making hotfix releases and deploying them to
|
|
||||||
the network.
|
|
||||||
|
|
||||||
Take [this PR][1], as an example. This constituted a great hotfix. It's a
|
|
||||||
single commit, targeting a problem that existed on the network at the time.
|
|
||||||
Here's how it should be released and deployed OTA.
|
|
||||||
|
|
||||||
[1]: https://github.com/urbit/urbit/pull/2025
|
|
||||||
|
|
||||||
### If the thing is acceptable to merge, merge it to master
|
|
||||||
|
|
||||||
Unless it's very trivial, it should probably have a single "credible looking"
|
|
||||||
review from somebody else on it.
|
|
||||||
|
|
||||||
You should avoid merging the PR in GitHub directly. Instead, use the
|
|
||||||
`sh/merge-with-custom-msg` script -- it will produce a merge commit with
|
|
||||||
message along the lines of:
|
|
||||||
|
|
||||||
|
The branches and their corresponding moons that comprise the stages of the
|
||||||
|
release pipeline are:
|
||||||
```
|
```
|
||||||
Merge branch FOO (#PR_NUM)
|
----------------------------------------------------------------------------------------------
|
||||||
|
Branch | Moon | Target audience | Contains
|
||||||
* FOO:
|
----------------------------------------------------------------------------------------------
|
||||||
bar: ...
|
`develop` | `~binnec-dozzod-marzod` | Kernel developers | Latest `develop` branch commit
|
||||||
baz: ...
|
`release` | `~marnec-dozzod-marzod` | Early Adopters | Latest `release` branch commit
|
||||||
|
`release` | `~doznec-dozzod-marzod` | App Developers | Latest release candidate
|
||||||
Signed-off-by: SIGNER <signer@example.com>
|
`master` | `~zod` | Everyone else | Latest release
|
||||||
```
|
```
|
||||||
|
|
||||||
We do this as it's nice to have the commit log information in the merge commit,
|
**WARNING**: If you lack the requisite skills to troubleshoot and fix kernel issues, you should not sync from develop/~binnec. If you're not prepared to breach your ship in response to an issue stemming from an early release, do not use pre-release moons.
|
||||||
which GitHub's "Merge PR" button doesn't do (at least by default).
|
|
||||||
`sh/merge-with-custom-msg` performs some useful last-minute urbit-specific
|
|
||||||
checks, as well.
|
|
||||||
|
|
||||||
You might want to alias `sh/merge-with-custom-msg` locally, to make it easier
|
`develop` is the default branch in the repo, which means that all new pull
|
||||||
to use. My .git/config contains the following, for example:
|
requests target it by default. The general flow of a new feature or bug fix
|
||||||
|
through the pipeline is:
|
||||||
```
|
|
||||||
[alias]
|
|
||||||
mu = !sh/merge-with-custom-msg
|
|
||||||
```
|
|
||||||
|
|
||||||
so that I can type e.g. `git mu origin/foo 1337`.
|
|
||||||
|
|
||||||
### Prepare a release commit
|
|
||||||
|
|
||||||
If you're making a Vere release, just play it safe and update all the pills.
|
|
||||||
|
|
||||||
To produce multi pills, you will need to set up an environment with the
|
|
||||||
appropriate desks with the appropriate contents, doing something like the
|
|
||||||
following (where `> ` denotes an urbit command and `% ` denotes a unix shell
|
|
||||||
command):
|
|
||||||
|
|
||||||
```console
|
```console
|
||||||
> |merge %garden our %base
|
feature branch ----> develop ----> release ---------> master
|
||||||
> |merge %landscape our %base
|
| | |
|
||||||
> |merge %bitcoin our %base
|
deployed to deployed to deployed to
|
||||||
> |merge %webterm our %base
|
~binnec moon ~marnec/~doznec moon network
|
||||||
> |mount %
|
|
||||||
> |mount %garden
|
|
||||||
> |mount %landscape
|
|
||||||
> |mount %bitcoin
|
|
||||||
> |mount %webterm
|
|
||||||
% rsync -avL --delete pkg/arvo/ zod/base/
|
|
||||||
% rm -rf zod/base/tests/
|
|
||||||
% for desk in garden landscape bitcoin webterm; do \
|
|
||||||
rsync -avL --delete pkg/$desk/ zod/$desk/ \
|
|
||||||
done
|
|
||||||
> |commit %base
|
|
||||||
> |commit %garden
|
|
||||||
> |commit %landscape
|
|
||||||
> |commit %bitcoin
|
|
||||||
> |commit %webterm
|
|
||||||
> .multi/pill +solid %base %garden %landscape %bitcoin %webterm
|
|
||||||
> .multi-brass/pill +brass %base %garden %landscape %bitcoin %webterm
|
|
||||||
```
|
```
|
||||||
|
|
||||||
And then of course:
|
If an issue arises in the course of testing the `release` branch (because more
|
||||||
|
people are using `marnec` than `binnec`), a PR can be opened to target
|
||||||
|
`release`. If that's the case, the `master` needs to be merged back into
|
||||||
|
`develop` after `release` merges into `master` to ensure that `develop` gets the
|
||||||
|
fix.
|
||||||
|
|
||||||
```console
|
## Release Workflow
|
||||||
> .solid/pill +solid
|
|
||||||
> .brass/pill +brass
|
|
||||||
> .ivory/pill +ivory
|
|
||||||
```
|
|
||||||
|
|
||||||
For an Urbit OS release, after all the merge commits, make a release with the
|
Developers work on feature branches built against `develop`. While doing this,
|
||||||
commit message "release: urbit-os-v1.0.xx". This commit should have up-to-date
|
they continually merge in changes from `develop` to their feature branch. When
|
||||||
artifacts from pkg/interface and a new version number in the desk.docket-0 of
|
their feature is ready (and they've tested it), they open a pull request. After
|
||||||
any desk which changed. If neither the pill nor the JS need to be updated (e.g
|
code review approval and passing tests, their feature can merge into `develop`.
|
||||||
if the pill was already updated in the previous merge commit), consider making
|
Every merge into `develop` immediately triggers a deploy to the `binnec` moon.
|
||||||
the release commit with --allow-empty.
|
If your merge breaks `binnec` it's your responsibility to fix it.
|
||||||
|
|
||||||
If anything in `pkg/interface` has changed, ensure it has been built and
|
Once a week on Tuesday, a `release` branch is cut off of `develop`. This release
|
||||||
deployed properly. You'll want to do this before making a pill, since you want
|
gets deployed to `marnec` to be tested for the rest of the week. Any fixes that
|
||||||
the pill to have the new files/hash. For most things, it is sufficient to run
|
have to go into the release can go straight into the release branch. New work
|
||||||
`npm install; npm run build:prod` in `pkg/interface`.
|
that didn't make the release continues on feature branches against `develop`
|
||||||
|
(eventually merging there). After initial testing on `marnec`, a release
|
||||||
|
candidate is tagged and merges into `~doznec` where early adopters and app
|
||||||
|
developers can pick it up and test or update their apps for a new kelvin. If
|
||||||
|
it's a new kelvin, we also send an email to urbit-dev with instructions for
|
||||||
|
testing the breaking changes.
|
||||||
|
|
||||||
However, if you've made a change to Landscape's JS, then you will need to build
|
Then on the next Tuesday the release branch merges into master and tagged using
|
||||||
a "glob" and upload it to bootstrap.urbit.org. To do this, run `npm install;
|
the tag instructions below, we create a GitHub release (marked latest) using
|
||||||
npm run build:prod` in `pkg/interface`, and add the resulting
|
that tag on `master` which documents the changes that went into the release. In
|
||||||
`pkg/arvo/app/landscape/index.[hash].js` to a fakezod at that path (or just create a
|
the Github UI you can get the changelog by selecting the tag prior to it from
|
||||||
new fakezod with `urbit -F zod -B bin/solid.pill -A pkg/arvo`). Run
|
the previous release when creating the new release. Then the release is deployed
|
||||||
`:glob|make`, and this will output a file in `fakezod/.urb/put/glob-0vXXX.glob`.
|
to the broader network via `zod`. Master is then merged back into `develop`
|
||||||
|
where any fixes that went straight to release get picked up. Lastly, a new
|
||||||
|
release branch is cut from `develop` and the process begins again.
|
||||||
|
|
||||||
Upload this file to bootstrap.urbit.org, and modify `+hash` at the top of
|
### Tagging
|
||||||
`pkg/arvo/app/glob.hoon` to match the hash in the filename of the `.glob` file.
|
|
||||||
Amend `pkg/arvo/app/landscape/index.html` to import the hashed JS bundle, instead
|
|
||||||
of the unversioned index.js. Do not commit the produced `index.js` and
|
|
||||||
make sure it doesn't end up in your pills (they should be less than 10MB each).
|
|
||||||
|
|
||||||
### Tag the resulting commit
|
When we branch release to deploy to `~marnec`, we need to tag it as a release candidate (RC), like `urbit-os-vx.y-rc1`. Here 'x' is the major version and 'y' is an OTA patch counter. After this any change that goes into release gets a new tag that increments the rc.
|
||||||
|
|
||||||
What you should do here depends on the type of release being made.
|
After we ship a release to the live network, add a tag that is not a release candidate, like `urbit-os-vx.y`, to the master branch, since that's what was released.
|
||||||
|
|
||||||
First, for Urbit OS releases:
|
#### Applying the Tag Locally
|
||||||
|
|
||||||
If it's a very trivial hotfix that you know isn't going to break anything, tag
|
Use an annotated tag with the `-a` git argument. Make sure to follow
|
||||||
it as `urbit-os-vx.y`. Here 'x' is the major version and 'y' is an OTA patch
|
the naming convention for RCs and live releases, described above.
|
||||||
counter. Change `urbit-os` to e.g. `landscape` or another desk if that's what you're
|
|
||||||
releasing. If you're releasing changes to more than one desk, add a separate
|
|
||||||
tag for each desk (but only make one announcment email/post, with all of the
|
|
||||||
desks listed).
|
|
||||||
|
|
||||||
Use an annotated tag, i.e.
|
|
||||||
|
To add a tag to the local repo, run this:
|
||||||
|
|
||||||
```
|
```
|
||||||
git tag -a urbit-os-vx.y
|
git tag -a <tagname>
|
||||||
```
|
```
|
||||||
|
|
||||||
The tag format should look something like this:
|
This will bring up an editor, where you should add the release notes,
|
||||||
|
which should look like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
urbit-os-vx.y
|
<tagname>
|
||||||
|
|
||||||
This release will be pushed to the network as an over-the-air update.
|
This release will be pushed to the network as an over-the-air update.
|
||||||
|
|
||||||
@ -256,99 +105,54 @@ Contributions:
|
|||||||
[..]
|
[..]
|
||||||
```
|
```
|
||||||
|
|
||||||
You can get the "contributions" section by the shortlog between the
|
To fill in the "contributions" section, copy in the shortlog between the last release and this release, obtained by running this command:
|
||||||
last release and this release:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
git shortlog LAST_RELEASE..
|
git shortlog --no-merges LAST_RELEASE..
|
||||||
```
|
```
|
||||||
|
|
||||||
I originally tried to curate this list somewhat, but now just paste it
|
#### Pushing the Tag to the Main Repo
|
||||||
verbatim. If it's too noisy, yell at your colleagues to improve their commit
|
|
||||||
messages.
|
|
||||||
|
|
||||||
Try to include a high-level summary of the changes in the "release notes"
|
Once you have added a tag, push it to the main repository using the
|
||||||
section. You should be able to do this by simply looking at the git log and
|
following command:
|
||||||
skimming the commit descriptions (or perhaps copying some of them in verbatim).
|
|
||||||
If the commit descriptions are too poor to easily do this, then again, yell at
|
|
||||||
your fellow contributors to make them better in the future.
|
|
||||||
|
|
||||||
If it's *not* a trivial hotfix, you should probably make any number of release
|
|
||||||
candidate tags (e.g. `urbit-os-vx.y.rc1`, `urbit-os-vx.y.rc2`, ..), test
|
|
||||||
them, and after you confirm one of them is good, tag the release as
|
|
||||||
`urbit-os-vx.y`.
|
|
||||||
|
|
||||||
For Vere releases:
|
|
||||||
|
|
||||||
Tag the release as `urbit-vx.y`. The tag format should look something like
|
|
||||||
this:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
urbit-vx.y
|
git push origin <tagname>
|
||||||
|
|
||||||
Note that this Vere release will by default boot fresh ships using an Urbit OS
|
|
||||||
va.b.c pill.
|
|
||||||
|
|
||||||
Release binaries:
|
|
||||||
|
|
||||||
(linux64)
|
|
||||||
https://bootstrap.urbit.org/urbit-vx.y-linux64.tgz
|
|
||||||
|
|
||||||
(macOS)
|
|
||||||
https://bootstrap.urbit.org/urbit-vx.y-darwin.tgz
|
|
||||||
|
|
||||||
Release notes:
|
|
||||||
|
|
||||||
[..]
|
|
||||||
|
|
||||||
Contributions:
|
|
||||||
|
|
||||||
[..]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Ensure the Vere release is marked as the 'latest' release and upload the two
|
## Releases
|
||||||
`.tgz` files to the release as `darwin.tgz` and `linux64.tgz`;
|
|
||||||
this allows us to programmatically retrieve the latest release at
|
|
||||||
[urbit.org/install/mac/latest/](https://urbit.org/install/mac/latest) and
|
|
||||||
[urbit.org/install/linux64/latest](https://urbit.org/install/linux64/latest),
|
|
||||||
respectively.
|
|
||||||
|
|
||||||
The same schpeel re: release candidates applies here.
|
- [ ] Create a pull request from the relevant release branch (with the format `release/urbit-os-vX.XX`) to `master`.
|
||||||
|
- [ ] ssh into `~zod`
|
||||||
|
- [ ] Check to ensure that nobody else is ssh'd into `~zod`, by running `screen -ls` and verifying no sessions are attached.
|
||||||
|
- [ ] Attach to the screen session using `screen -x`
|
||||||
|
- [ ] Install the contents of the `%kids` desk on `~marnec-dozzod-marzod` into our `%base`: `|merge %base ~marnec-dozzod-marzod %kids, =gem %only-that`
|
||||||
|
- [ ] Check that `~zod` has updated to the latest release. For a Kelvin release, you can run `zuse` in the Dojo. Each non-Kelvin release might its own way of checking whether the update has completed, possibly through checking the `%cz` hash of the `%base` desk matches the hash on `~marnec-dozzod-marzod` by comparing the outputs of `+vat %base` on both ships.
|
||||||
|
- [ ] Merge `~zod`'s `%base` desk into its `%kids` desk to distribute the new code to the network: `|merge %kids our %base, =gem %only-that`
|
||||||
|
- [ ] Before exiting the screen session on `~zod`, make sure the screen session is not left in copy mode for a long period of time, since that will disrupt `~zod`'s operation.
|
||||||
|
|
||||||
Note that the release notes indicate which version of Urbit OS the Vere release
|
### Release Communications
|
||||||
will use by default when booting fresh ships. Do not include implicit Urbit OS
|
|
||||||
changes in Vere releases; this used to be done, historically, but shouldn't be
|
|
||||||
any longer. If there are Urbit OS and Vere changes to be released, make two
|
|
||||||
separate releases.
|
|
||||||
|
|
||||||
### Deploy the update
|
- [ ] Tag the commit that went onto the live network as a release, using GitHub's "Releases" interface. See the "Tagging" section of this document for details.
|
||||||
|
- [ ] Update (add a response) the mailing list post to include the base hash of the new release, and indicate that this has now been deployed to the network.
|
||||||
|
- [ ] Tweet from the `@zodisok` Twitter account linking to the GitHub release.
|
||||||
|
- [ ] Post links to the release in the Urbit Community Development channel and a channel in the UF public group.
|
||||||
|
|
||||||
(**Note**: the following steps are automated by some other Tlon-internal
|
### Post-Release Git Cleanup
|
||||||
tooling. Just ask `~nidsut-tomdun` for details.)
|
|
||||||
|
|
||||||
For Urbit OS updates, this means copying the files into ~zod's %base desk. The
|
- [ ] Merge `master` back into `develop`.
|
||||||
changes should be merged into /~zod/kids and then propagated through other galaxies
|
- [ ] Cut a new release branch from `develop`. The branch should have the format `release/urbit-os-vX.XX`
|
||||||
and stars to the rest of the network.
|
|
||||||
|
|
||||||
For consistency, I create a release tarball and then rsync the files in.
|
### Post-Release Checks
|
||||||
|
- [ ] Check that `~marzod` and other distribution stars are receiving the update by running `|ames-sift ~zod` and `|ames-verb %rcv %ges`. You should see lots of packets from `~zod`. Once you have confirmed packets are flowing, run `|ames-sift` and `|ames-verb` with no arguments to reset the verbosity state.
|
||||||
|
- [ ] Check that planets are receiving the update. They should start updating within an hour or so.
|
||||||
|
- [ ] Monitor the Urbit Community Help channel, UF public group channels, and Twitter to make
|
||||||
|
|
||||||
```
|
### Post-Release Artifacts
|
||||||
$ wget https://github.com/urbit/urbit/archive/urbit-os-vx.y.tar.gz
|
After waiting at least 24 hours after the release to the network, make and distribute a pill.
|
||||||
$ tar xzf urbit-os-vx.y.tar.gz
|
- [ ] Find a ship on the network (for now, use `~halbex-palheb`, which runs the UF public group) whose sources for `%base` and the standard app desks are mainline, not devstream.
|
||||||
$ herb zod -p hood -d "+hood/mount /=base="
|
- [ ] Ensure the `%cz` hashes of all desks match those on the distribution ships.
|
||||||
$ rsync -zr --delete urbit-urbit-os-vx.y/pkg/arvo/ zod/base
|
- [ ] Make a pill by running `.multi-vX-XX/pill +solid %base %garden %webterm %landscape %groups %talk` (replacing `X-XX` with the appropriate version numbers, in this and later steps).
|
||||||
$ herb zod -p hood -d "+hood/commit %base"
|
- [ ] Boot a fakezod off that pill to make sure the pill is viable.
|
||||||
$ herb zod -p hood -d "+hood/merge %kids our %base"
|
- [ ] Upload the pill to `bootstrap.urbit.org` using the Google Cloud SDK by running: `gsutil cp /path/to/pier/.urb/put/multi-vX-XX.pill gs://bootstrap.urbit.org/urbit-vX.XX.pill` -- note that it should be `vX.XX`, not `vX-XX` as in the original pill filename.
|
||||||
```
|
- [ ] Boot a ship with the latest binary and check that it downloads the pill from `https://bootstrap.urbit.org/urbit-vX.XX.pill` where you just uploaded it.
|
||||||
|
|
||||||
For Vere updates, this means simply shutting down each desired ship, installing
|
|
||||||
the new binary, and restarting the pier with it.
|
|
||||||
|
|
||||||
### Announce the update
|
|
||||||
|
|
||||||
Post an announcement to urbit-dev. The tag annotation, basically, is fine here
|
|
||||||
-- I usually add the %cz hash (for Urbit OS releases) and the release binary
|
|
||||||
URLs (for Vere releases). Check the urbit-dev archives for examples of these
|
|
||||||
announcements.
|
|
||||||
|
|
||||||
Post the same announcement to the group feed of Urbit Community.
|
|
||||||
|
97
README.md
97
README.md
@ -7,101 +7,36 @@ has an identity layer (Azimuth), virtual machine (Vere), and operating system
|
|||||||
A running Urbit "ship" is designed to operate with other ships peer-to-peer.
|
A running Urbit "ship" is designed to operate with other ships peer-to-peer.
|
||||||
Urbit is a general-purpose, peer-to-peer computer and network.
|
Urbit is a general-purpose, peer-to-peer computer and network.
|
||||||
|
|
||||||
This repository contains:
|
This repository contains the [Arvo Kernel][arvo]
|
||||||
|
|
||||||
- The [Arvo OS][arvo]
|
For the Runtime, see [Vere][vere].
|
||||||
- [herb][herb], a tool for Unix control of an Urbit ship
|
For more on the identity layer, see [Azimuth][azim].
|
||||||
- Source code for [Landscape's web interface][land]
|
To manage your Urbit identity, use [Bridge][brid].
|
||||||
- Source code for the [vere][vere] virtual machine.
|
|
||||||
|
|
||||||
For more on the identity layer, see [Azimuth][azim]. To manage your Urbit
|
|
||||||
identity, use [Bridge][brid].
|
|
||||||
|
|
||||||
[arvo]: https://github.com/urbit/urbit/tree/master/pkg/arvo
|
|
||||||
[azim]: https://github.com/urbit/azimuth
|
|
||||||
[brid]: https://github.com/urbit/bridge
|
|
||||||
[herb]: https://github.com/urbit/urbit/tree/master/pkg/herb
|
|
||||||
[land]: https://github.com/urbit/urbit/tree/master/pkg/interface
|
|
||||||
[vere]: https://github.com/urbit/urbit/tree/master/pkg/urbit
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
To install and run Urbit, please follow the instructions at
|
To install and run Urbit, please follow the instructions at
|
||||||
[urbit.org/install][start]. You'll be on the live network in a
|
[urbit.org/getting-started][start]. You'll be on the live network in a
|
||||||
few minutes.
|
few minutes.
|
||||||
|
|
||||||
If you're interested in Urbit development, keep reading.
|
[start]: https://urbit.org/getting-started/
|
||||||
|
|
||||||
[start]: https://urbit.org/install/
|
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
[![License][license-badge]][license]
|
|
||||||
[![Build][build-badge]][build]
|
|
||||||
[![Nix][nix-badge]][nix]
|
|
||||||
[![Cachix][cachix-badge]][cachix]
|
|
||||||
|
|
||||||
Urbit uses [Nix][nix] to manage builds. On Linux and macOS you can install Nix
|
|
||||||
via:
|
|
||||||
|
|
||||||
```
|
|
||||||
curl -L https://nixos.org/nix/install | sh
|
|
||||||
```
|
|
||||||
|
|
||||||
You can optionally setup Nix to pull build artefacts from the binary cache
|
|
||||||
that continuous integration uses. This will improve build times and avoid
|
|
||||||
unnecessary recompilations of common dependencies. Once Nix has been installed
|
|
||||||
you can setup Cachix via:
|
|
||||||
|
|
||||||
```
|
|
||||||
nix-env -iA cachix -f https://cachix.org/api/v1/install
|
|
||||||
cachix use ares
|
|
||||||
```
|
|
||||||
|
|
||||||
The Makefile in the project's root directory contains useful phony targets for
|
|
||||||
building, installing, testing, and so on. You can use it to avoid dealing with
|
|
||||||
Nix explicitly.
|
|
||||||
|
|
||||||
To build the Urbit virtual machine binary, for example, use:
|
|
||||||
|
|
||||||
```
|
|
||||||
make build
|
|
||||||
```
|
|
||||||
|
|
||||||
The test suite can similarly be run via a simple:
|
|
||||||
|
|
||||||
```
|
|
||||||
make test
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that some of the Makefile targets need access to pills tracked via [git
|
|
||||||
LFS][git-lfs], so you'll also need to have those available locally:
|
|
||||||
|
|
||||||
```
|
|
||||||
git lfs install
|
|
||||||
git lfs pull
|
|
||||||
```
|
|
||||||
|
|
||||||
[license]: https://raw.githubusercontent.com/urbit/urbit/master/LICENSE.txt
|
|
||||||
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg
|
|
||||||
[build]: https://github.com/urbit/urbit/actions
|
|
||||||
[build-badge]: https://github.com/urbit/urbit/workflows/build/badge.svg
|
|
||||||
[cachix]: https://ares.cachix.org
|
|
||||||
[cachix-badge]: https://img.shields.io/badge/cachix-ares-purple.svg
|
|
||||||
[nix]: https://nixos.org
|
|
||||||
[nix-badge]: https://img.shields.io/badge/builtwith-nix-purple.svg
|
|
||||||
[git-lfs]: https://git-lfs.github.com
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Contributions of any form are more than welcome! Please take a look at our
|
Contributions of any form are more than welcome! Please take a look at our
|
||||||
[contributing guidelines][cont] for details on our git practices, coding
|
[contributing guidelines][cont] for details on our git practices, coding
|
||||||
styles, how we manage issues, and so on.
|
styles, and how we manage issues.
|
||||||
|
|
||||||
For instructions on contributing to Landscape, see [its][lcont] guidelines.
|
|
||||||
|
|
||||||
You might also be interested in joining the [urbit-dev][list] mailing list.
|
You might also be interested in joining the [urbit-dev][list] mailing list.
|
||||||
|
|
||||||
|
## Release
|
||||||
|
|
||||||
|
For details about our release process, see the [maintainers guidelines][main]
|
||||||
|
|
||||||
|
[arvo]: https://github.com/urbit/urbit/tree/master/pkg/arvo
|
||||||
|
[azim]: https://github.com/urbit/azimuth
|
||||||
|
[brid]: https://github.com/urbit/bridge
|
||||||
|
[vere]: https://github.com/urbit/vere
|
||||||
[list]: https://groups.google.com/a/urbit.org/forum/#!forum/dev
|
[list]: https://groups.google.com/a/urbit.org/forum/#!forum/dev
|
||||||
[cont]: https://github.com/urbit/urbit/blob/master/CONTRIBUTING.md
|
[cont]: https://github.com/urbit/urbit/blob/master/CONTRIBUTING.md
|
||||||
[lcont]: https://github.com/urbit/urbit/blob/master/pkg/interface/CONTRIBUTING.md
|
[main]: https://github.com/urbit/urbit/blob/master/MAINTAINERS.md
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:c4247c64a7d9fc0c0f1d2f017c21dd3464ddfe56529c7d6eef0e64554bd453e8
|
oid sha256:bd487cdb8294fdef6878f623bceb893553b36b2a616d22d30017b430361586fb
|
||||||
size 7611162
|
size 3889185
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:5123a1ac30b83ec026587574df1ce13a73e72d06588ff68b5c41c09e1bebb5b7
|
oid sha256:26ff86808886beb831e4a135f478e42ce83ef4a09ad24808b3fe97248ce7a6b7
|
||||||
size 949962
|
size 1136643
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ea8626444e4f0213e39c21ded20607145ee85a947afc592f182f46e7f598ef30
|
|
||||||
size 7748671
|
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:187ea751a274dba7ed69df3a5b8f6f7ac620e3f9787abd75b18cf494d0c41f05
|
oid sha256:4e4c99cd57805f38ffa1c8d0abe2e21cf1b93d5dbb76e32135721a9b8f46aa31
|
||||||
size 11174099
|
size 7740551
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:e46c7fb35826bcc3352eca8dbfeea3a8bdf1686cf46b3f873fad0c09bc25c5a7
|
oid sha256:2035ef65290065edbd99a86f9f5a36978617bc1983131fa474a9a5c0e91dc15d
|
||||||
size 5715362
|
size 5998440
|
||||||
|
@ -100,8 +100,6 @@ let
|
|||||||
|
|
||||||
marsSources = callPackage ./nix/pkgs/marsSources { };
|
marsSources = callPackage ./nix/pkgs/marsSources { };
|
||||||
|
|
||||||
urbit = callPackage ./nix/pkgs/urbit { inherit enableStatic verePace; };
|
|
||||||
|
|
||||||
urcrypt = callPackage ./nix/pkgs/urcrypt { inherit enableStatic; };
|
urcrypt = callPackage ./nix/pkgs/urcrypt { inherit enableStatic; };
|
||||||
|
|
||||||
docker-image = callPackage ./nix/pkgs/docker-image { };
|
docker-image = callPackage ./nix/pkgs/docker-image { };
|
||||||
@ -112,11 +110,9 @@ let
|
|||||||
# Expose packages with local customisations (like patches) for dev access.
|
# Expose packages with local customisations (like patches) for dev access.
|
||||||
inherit (pkgsStatic) libsigsegv lmdb;
|
inherit (pkgsStatic) libsigsegv lmdb;
|
||||||
|
|
||||||
urbit-debug = urbit.override { enableDebug = true; };
|
|
||||||
urbit-tests = libLocal.testFakeShip {
|
urbit-tests = libLocal.testFakeShip {
|
||||||
inherit arvo;
|
inherit arvo;
|
||||||
|
|
||||||
urbit = urbit-debug;
|
|
||||||
pill = solid.lfs;
|
pill = solid.lfs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ lib, stdenvNoCC, curl }:
|
{ lib, stdenvNoCC, curl }:
|
||||||
|
|
||||||
{ urbit, arvo ? null, pill, ship, arguments ? [ "-l" ] }:
|
{ arvo ? null, pill, ship, arguments ? [ "-l" ] }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -10,14 +10,14 @@ let
|
|||||||
in stdenvNoCC.mkDerivation {
|
in stdenvNoCC.mkDerivation {
|
||||||
name = "fake-${ship}";
|
name = "fake-${ship}";
|
||||||
|
|
||||||
buildInputs = [ curl urbit ];
|
buildInputs = [ curl ];
|
||||||
|
|
||||||
phases = [ "buildPhase" "installPhase " ];
|
phases = [ "buildPhase" "installPhase " ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
set -xeuo pipefail
|
set -xeuo pipefail
|
||||||
|
|
||||||
urbit ${lib.concatStringsSep " " args} ./pier
|
${arvo}/vere.jam ${lib.concatStringsSep " " args} ./pier
|
||||||
|
|
||||||
cleanup () {
|
cleanup () {
|
||||||
if [ -f ./pier/.vere.lock ]; then
|
if [ -f ./pier/.vere.lock ]; then
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
{ lib, stdenvNoCC, curl, python3, bootFakeShip }:
|
{ lib, stdenvNoCC, curl, python3, bootFakeShip }:
|
||||||
|
|
||||||
{ urbit, arvo ? null, pill, ship ? "bus", arguments ? urbit.meta.arguments
|
{ arvo ? null, pill, ship ? "bus", doCheck ? true }:
|
||||||
, doCheck ? true }:
|
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
name = "test-${ship}";
|
name = "test-${ship}";
|
||||||
|
|
||||||
src = bootFakeShip { inherit urbit arvo pill ship; };
|
src = bootFakeShip { inherit arvo pill ship; };
|
||||||
|
|
||||||
phases = [ "unpackPhase" "buildPhase" "checkPhase" ];
|
phases = [ "unpackPhase" "buildPhase" "checkPhase" ];
|
||||||
|
|
||||||
buildInputs = [ curl python3 urbit ];
|
buildInputs = [ curl python3 ];
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
cp -R $src ./pier
|
cp -R $src ./pier
|
||||||
@ -20,7 +19,7 @@ stdenvNoCC.mkDerivation {
|
|||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
urbit ${lib.concatStringsSep " " arguments} -d ./pier 2> urbit-output
|
${arvo}/vere.jam -d ./pier 2> urbit-output
|
||||||
|
|
||||||
# Sledge Hammer!
|
# Sledge Hammer!
|
||||||
# See: https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959
|
# See: https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959
|
||||||
|
@ -584,10 +584,11 @@
|
|||||||
~| [%no-next-domain idx=idx]
|
~| [%no-next-domain idx=idx]
|
||||||
(head (skim pending |=([turf idx=@ud ?] =(idx ^idx))))
|
(head (skim pending |=([turf idx=@ud ?] =(idx ^idx))))
|
||||||
:: XX should confirm that :turf points to us
|
:: XX should confirm that :turf points to us
|
||||||
:: confirms that domain exists (and an urbit is on :80)
|
:: confirms that domain exists (and an urbit is on the standard port)
|
||||||
::
|
::
|
||||||
|
=/ sec=? p:.^(hart:eyre %e /(scot %p our.bow)/host/(scot %da now.bow))
|
||||||
=/ =purl
|
=/ =purl
|
||||||
:- [sec=| por=~ host=[%& turf.next]]
|
:- [sec=sec por=~ host=[%& turf.next]]
|
||||||
[[ext=~ path=/'~debug'] query=~]
|
[[ext=~ path=/'~debug'] query=~]
|
||||||
=/ =wire
|
=/ =wire
|
||||||
(acme-wire try %validate-domain /idx/(scot %ud idx.next))
|
(acme-wire try %validate-domain /idx/(scot %ud idx.next))
|
||||||
@ -754,9 +755,8 @@
|
|||||||
?> ?=(%wake sas.u.rod)
|
?> ?=(%wake sas.u.rod)
|
||||||
=* aut u.active.aut.u.rod
|
=* aut u.active.aut.u.rod
|
||||||
=/ pat=path /'.well-known'/acme-challenge/[tok.cal.aut]
|
=/ pat=path /'.well-known'/acme-challenge/[tok.cal.aut]
|
||||||
:: note: requires port 80, just as the ACME service will
|
=/ sec=? p:.^(hart:eyre %e /(scot %p our.bow)/host/(scot %da now.bow))
|
||||||
::
|
=/ url=purl [[sec=sec por=~ hos=[%& dom.aut]] [ext=~ pat] hed=~]
|
||||||
=/ url=purl [[sec=| por=~ hos=[%& dom.aut]] [ext=~ pat] hed=~]
|
|
||||||
:: =/ url=purl [[sec=| por=`8.081 hos=[%& /localhost]] [ext=~ pat] hed=~]
|
:: =/ url=purl [[sec=| por=`8.081 hos=[%& /localhost]] [ext=~ pat] hed=~]
|
||||||
:: XX idx in wire?
|
:: XX idx in wire?
|
||||||
::
|
::
|
||||||
|
@ -3,16 +3,16 @@
|
|||||||
:: :: ::
|
:: :: ::
|
||||||
/? 309 :: arvo kelvin
|
/? 309 :: arvo kelvin
|
||||||
/- *sole, lens :: console structures
|
/- *sole, lens :: console structures
|
||||||
/+ sole, pprint, ::
|
/+ sole, pprint, dprint, ::
|
||||||
auto=language-server-complete, ::
|
auto=language-server-complete, ::
|
||||||
easy-print=language-server-easy-print ::
|
easy-print=language-server-easy-print ::
|
||||||
:: :: ::
|
:: :: ::
|
||||||
:::: :: ::::
|
:::: :: ::::
|
||||||
:: :: ::
|
:: :: ::
|
||||||
=> |% :: external structures
|
=> |% :: external structures
|
||||||
+$ id @tasession :: session id
|
+$ id sole-id :: session id
|
||||||
+$ house :: all state
|
+$ house :: all state
|
||||||
$: %8
|
$: %9
|
||||||
egg=@u :: command count
|
egg=@u :: command count
|
||||||
hoc=(map id session) :: conversations
|
hoc=(map id session) :: conversations
|
||||||
acl=(set ship) :: remote access whitelist
|
acl=(set ship) :: remote access whitelist
|
||||||
@ -54,6 +54,7 @@
|
|||||||
r=@t
|
r=@t
|
||||||
==
|
==
|
||||||
[%poke p=goal] :: poke app
|
[%poke p=goal] :: poke app
|
||||||
|
[%help p=(list term)] :: doccords
|
||||||
[%show p=?(%0 %1 %2 %3 %4 %5)] :: val/type/hoon/xray
|
[%show p=?(%0 %1 %2 %3 %4 %5)] :: val/type/hoon/xray
|
||||||
[%verb p=term] :: store variable
|
[%verb p=term] :: store variable
|
||||||
== ::
|
== ::
|
||||||
@ -180,6 +181,18 @@
|
|||||||
;~(pfix cen gap (parse-variable sym ;~(pfix gap parse-mark)))
|
;~(pfix cen gap (parse-variable sym ;~(pfix gap parse-mark)))
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
|
::
|
||||||
|
;~ pfix hax
|
||||||
|
;~ pose
|
||||||
|
;~ pfix ace
|
||||||
|
%+ cook
|
||||||
|
|= a=(list term)
|
||||||
|
[[%help (flop a)] 0 %ex [%cnts p=~[[%.y p=1]] q=~]]
|
||||||
|
(most fas sym)
|
||||||
|
==
|
||||||
|
(easy [[%help ~[%$]] 0 %ex [%cnts p=~[[%.y p=1]] q=~]])
|
||||||
|
==
|
||||||
|
==
|
||||||
::
|
::
|
||||||
;~((glue ace) parse-sink parse-source)
|
;~((glue ace) parse-sink parse-source)
|
||||||
(stag [%show %0] parse-source)
|
(stag [%show %0] parse-source)
|
||||||
@ -621,6 +634,9 @@
|
|||||||
++ maar ?: =(%noun p.cay) ~
|
++ maar ?: =(%noun p.cay) ~
|
||||||
[[%rose [~ " " ~] >p.cay< ~] ~]
|
[[%rose [~ " " ~] >p.cay< ~] ~]
|
||||||
--
|
--
|
||||||
|
::
|
||||||
|
%help
|
||||||
|
(dy-inspect p.p.mad p.q.cay)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ dy-show |=(cay=cage (dy-print cay ~))
|
++ dy-show |=(cay=cage (dy-print cay ~))
|
||||||
@ -660,6 +676,20 @@
|
|||||||
:- i=""
|
:- i=""
|
||||||
t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip)
|
t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip)
|
||||||
==
|
==
|
||||||
|
::
|
||||||
|
++ dy-inspect
|
||||||
|
|= [topics=(list term) sut=type]
|
||||||
|
%+ dy-rash %mor
|
||||||
|
=+ to-display=(mule |.((find-item-in-type:dprint (flop topics) sut)))
|
||||||
|
?: ?=(%| -.to-display)
|
||||||
|
[%tan [%leaf "Could not find help A"] p.to-display]~
|
||||||
|
?~ p.to-display
|
||||||
|
[%tan [%leaf "Could not find help B"]~]~
|
||||||
|
=/ item (mule |.((print-item:dprint u.p.to-display)))
|
||||||
|
?: ?=(%| -.item)
|
||||||
|
[%tan [%leaf "Could not find help C"] p.item]~
|
||||||
|
p.item
|
||||||
|
::
|
||||||
++ dy-show-type-noun
|
++ dy-show-type-noun
|
||||||
|= a=type ^- tank
|
|= a=type ^- tank
|
||||||
=- >[-]<
|
=- >[-]<
|
||||||
@ -676,11 +706,16 @@
|
|||||||
[%face ^] a(q $(a q.a))
|
[%face ^] a(q $(a q.a))
|
||||||
[%cell ^] a(p $(a p.a), q $(a q.a))
|
[%cell ^] a(p $(a p.a), q $(a q.a))
|
||||||
[%fork *] a(p (silt (turn ~(tap in p.a) |=(b=type ^$(a b)))))
|
[%fork *] a(p (silt (turn ~(tap in p.a) |=(b=type ^$(a b)))))
|
||||||
[%hint *] ?. ?=(%know -.q.p.a) $(a q.a)
|
[%hint *] ?+ q.p.a $(a q.a)
|
||||||
?@ p.q.p.a [(cat 3 '#' mark.p.q.p.a)]~
|
[%know *]
|
||||||
[(rap 3 '#' auth.p.q.p.a (spat type.p.q.p.a) ~)]~
|
?@ p.q.p.a [(cat 3 '#' mark.p.q.p.a)]~
|
||||||
|
[(rap 3 '#' auth.p.q.p.a '+' (spat type.p.q.p.a) ~)]~
|
||||||
|
::
|
||||||
|
[%help *]
|
||||||
|
[summary.crib.p.q.p.a]~
|
||||||
|
==
|
||||||
[%core ^] `wain`/core
|
[%core ^] `wain`/core
|
||||||
[%hold *] a(p $(a p.a))
|
[%hold *] $(a (~(play ut p.a) q.a))
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: XX needs filter
|
:: XX needs filter
|
||||||
@ -820,12 +855,23 @@
|
|||||||
=/ poz=vase (dy-sore p.cig)
|
=/ poz=vase (dy-sore p.cig)
|
||||||
=/ kev=vase
|
=/ kev=vase
|
||||||
=/ kuv=(unit vase) (slew 7 som)
|
=/ kuv=(unit vase) (slew 7 som)
|
||||||
?: =(~ q.cig)
|
|
||||||
(fall kuv !>(~))
|
|
||||||
=/ soz=(list [var=term vax=vase])
|
=/ soz=(list [var=term vax=vase])
|
||||||
%~ tap by
|
%~ tap by
|
||||||
%- ~(run by q.cig)
|
%- ~(run by q.cig)
|
||||||
|=(val=(unit dojo-source) ?~(val !>([~ ~]) (dy-vase p.u.val)))
|
|=(val=(unit dojo-source) ?~(val !>([~ ~]) (dy-vase p.u.val)))
|
||||||
|
:: if the generator takes a named argument "drum-session",
|
||||||
|
:: then if a value isn't already supplied, we set it to the session
|
||||||
|
:: that this dojo instance is being run in.
|
||||||
|
:: (dojo is, indeed, quite coupled with drum.)
|
||||||
|
::
|
||||||
|
=? soz
|
||||||
|
?& ?=(^ kuv)
|
||||||
|
(slab %both %drum-session p.u.kuv)
|
||||||
|
!(~(has by q.cig) %drum-session)
|
||||||
|
==
|
||||||
|
[[%drum-session !>(ses.id)] soz] ::TODO does the who matter?
|
||||||
|
?: =(~ soz)
|
||||||
|
(fall kuv !>(~))
|
||||||
~| keyword-arg-failure+~(key by q.cig)
|
~| keyword-arg-failure+~(key by q.cig)
|
||||||
%+ slap
|
%+ slap
|
||||||
(with-faces kuv+(need kuv) rep+(with-faces soz) ~)
|
(with-faces kuv+(need kuv) rep+(with-faces soz) ~)
|
||||||
@ -1018,13 +1064,14 @@
|
|||||||
|= =card:agent:gall
|
|= =card:agent:gall
|
||||||
^+ +>
|
^+ +>
|
||||||
=? card ?=(%pass -.card)
|
=? card ?=(%pass -.card)
|
||||||
card(p [id p.card])
|
^- card:agent:gall
|
||||||
|
card(p [(scot %p who.id) ses.id p.card])
|
||||||
%_(+> moz [card moz])
|
%_(+> moz [card moz])
|
||||||
::
|
::
|
||||||
++ he-diff :: emit update
|
++ he-diff :: emit update
|
||||||
|= fec=sole-effect
|
|= fec=sole-effect
|
||||||
^+ +>
|
^+ +>
|
||||||
(he-card %give %fact ~[/sole/[id]] %sole-effect !>(fec))
|
(he-card %give %fact ~[(id-to-path:sole id)] %sole-effect !>(fec))
|
||||||
::
|
::
|
||||||
++ he-stop :: abort work
|
++ he-stop :: abort work
|
||||||
^+ .
|
^+ .
|
||||||
@ -1532,21 +1579,47 @@
|
|||||||
::
|
::
|
||||||
++ on-load
|
++ on-load
|
||||||
|= ole=vase
|
|= ole=vase
|
||||||
|
^- (quip card:agent:gall _..on-init)
|
||||||
|^ =+ old=!<(house-any ole)
|
|^ =+ old=!<(house-any ole)
|
||||||
=? old ?=(%5 -.old)
|
=? old ?=(%5 -.old)
|
||||||
|
^- house-any
|
||||||
|
^- house-6
|
||||||
(house-5-to-6 old)
|
(house-5-to-6 old)
|
||||||
=? old ?=(?(%6 %7) -.old)
|
=? old ?=(?(%6 %7) -.old)
|
||||||
(house-6-7-to-8 +.old)
|
(house-6-7-to-8 +.old)
|
||||||
?> ?=(%8 -.old)
|
=^ caz old
|
||||||
`..on-init(state old)
|
?. ?=(%8 -.old) [~ old]
|
||||||
|
(house-8-to-9 old)
|
||||||
|
?> ?=(%9 -.old)
|
||||||
|
[caz ..on-init(state old)]
|
||||||
::
|
::
|
||||||
+$ house-any $%(house house-7 house-6 house-5)
|
+$ house-any $%(house house-8 house-7 house-6 house-5)
|
||||||
|
::
|
||||||
|
+$ id-8 @tasession
|
||||||
|
+$ house-8
|
||||||
|
$: %8
|
||||||
|
egg=@u
|
||||||
|
hoc=(map id-8 session)
|
||||||
|
acl=(set ship)
|
||||||
|
==
|
||||||
|
++ house-8-to-9
|
||||||
|
|= old=house-8
|
||||||
|
^- (quip card:agent:gall house)
|
||||||
|
:- %+ turn ~(tap in ~(key by hoc.old))
|
||||||
|
|= id=@ta
|
||||||
|
^- card:agent:gall
|
||||||
|
[%give %kick ~[/sole/[id]] ~]
|
||||||
|
=- [%9 egg.old - acl.old]
|
||||||
|
%- ~(gas by *(map sole-id session))
|
||||||
|
%+ murn ~(tap by hoc.old)
|
||||||
|
|= [id=@ta s=session]
|
||||||
|
(bind (upgrade-id:sole id) (late s))
|
||||||
::
|
::
|
||||||
+$ house-7 [%7 house-6-7]
|
+$ house-7 [%7 house-6-7]
|
||||||
+$ house-6 [%6 house-6-7]
|
+$ house-6 [%6 house-6-7]
|
||||||
+$ house-6-7
|
+$ house-6-7
|
||||||
$: egg=@u :: command count
|
$: egg=@u :: command count
|
||||||
hoc=(map id session-6) :: conversations
|
hoc=(map id-8 session-6) :: conversations
|
||||||
acl=(set ship) :: remote access whitelist
|
acl=(set ship) :: remote access whitelist
|
||||||
== ::
|
== ::
|
||||||
+$ session-6 :: per conversation
|
+$ session-6 :: per conversation
|
||||||
@ -1573,9 +1646,10 @@
|
|||||||
old(poy ~, -.dir [our.hid %base ud+0])
|
old(poy ~, -.dir [our.hid %base ud+0])
|
||||||
::
|
::
|
||||||
+$ house-5
|
+$ house-5
|
||||||
[%5 egg=@u hoc=(map id session)]
|
[%5 egg=@u hoc=(map id-8 session-6)]
|
||||||
++ house-5-to-6
|
++ house-5-to-6
|
||||||
|= old=house-5
|
|= old=house-5
|
||||||
|
^- house-6
|
||||||
[%6 egg.old hoc.old *(set ship)]
|
[%6 egg.old hoc.old *(set ship)]
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
@ -1591,7 +1665,8 @@
|
|||||||
he-abet:(~(he-type he hid id.act ~ (~(got by hoc) id.act)) act)
|
he-abet:(~(he-type he hid id.act ~ (~(got by hoc) id.act)) act)
|
||||||
::
|
::
|
||||||
%lens-command
|
%lens-command
|
||||||
=+ !<([=id =command:lens] vase)
|
=+ !<([ses=@ta =command:lens] vase)
|
||||||
|
=/ =id [our.hid ses]
|
||||||
he-abet:(~(he-lens he hid id ~ (~(got by hoc) id)) command)
|
he-abet:(~(he-lens he hid id ~ (~(got by hoc) id)) command)
|
||||||
::
|
::
|
||||||
%allow-remote-login
|
%allow-remote-login
|
||||||
@ -1629,8 +1704,7 @@
|
|||||||
?> ?| (team:title our.hid src.hid)
|
?> ?| (team:title our.hid src.hid)
|
||||||
(~(has in acl) src.hid)
|
(~(has in acl) src.hid)
|
||||||
==
|
==
|
||||||
?> ?=([%sole @ ~] path)
|
=/ =id (need (path-to-id:sole path))
|
||||||
=/ id i.t.path
|
|
||||||
=? hoc (~(has by hoc) id)
|
=? hoc (~(has by hoc) id)
|
||||||
~& [%dojo-peer-replaced id]
|
~& [%dojo-peer-replaced id]
|
||||||
(~(del by hoc) id)
|
(~(del by hoc) id)
|
||||||
@ -1642,7 +1716,7 @@
|
|||||||
++ on-leave
|
++ on-leave
|
||||||
|= =path
|
|= =path
|
||||||
?> ?=([%sole *] path)
|
?> ?=([%sole *] path)
|
||||||
=. hoc (~(del by hoc) t.path)
|
=. hoc (~(del by hoc) (need (path-to-id:sole path)))
|
||||||
[~ ..on-init]
|
[~ ..on-init]
|
||||||
::
|
::
|
||||||
++ on-peek
|
++ on-peek
|
||||||
@ -1651,13 +1725,15 @@
|
|||||||
::
|
::
|
||||||
++ on-agent
|
++ on-agent
|
||||||
|= [=wire =sign:agent:gall]
|
|= [=wire =sign:agent:gall]
|
||||||
?> ?=([@ @ *] wire)
|
^- (quip card:agent:gall _..on-init)
|
||||||
=/ =session (~(got by hoc) i.wire)
|
?> ?=([@ @ @ *] wire)
|
||||||
=/ he-full ~(. he hid i.wire ~ session)
|
=/ =id [(slav %p i.wire) i.t.wire]
|
||||||
|
=/ =session (~(got by hoc) id)
|
||||||
|
=/ he-full ~(. he hid id ~ session)
|
||||||
=^ moves state
|
=^ moves state
|
||||||
=< he-abet
|
=< he-abet
|
||||||
^+ he
|
^+ he
|
||||||
?+ i.t.wire ~|([%dojo-bad-on-agent wire -.sign] !!)
|
?+ i.t.t.wire ~|([%dojo-bad-on-agent wire -.sign] !!)
|
||||||
%poke (he-unto:he-full t.wire sign)
|
%poke (he-unto:he-full t.wire sign)
|
||||||
%wool (he-wool:he-full t.wire sign)
|
%wool (he-wool:he-full t.wire sign)
|
||||||
==
|
==
|
||||||
@ -1665,14 +1741,16 @@
|
|||||||
::
|
::
|
||||||
++ on-arvo
|
++ on-arvo
|
||||||
|= [=wire =sign-arvo]
|
|= [=wire =sign-arvo]
|
||||||
?> ?=([@ *] wire)
|
^- (quip card:agent:gall _..on-init)
|
||||||
=/ =session (~(got by hoc) i.wire)
|
?> ?=([@ @ *] wire)
|
||||||
=/ he-full ~(. he hid i.wire ~ session)
|
=/ =id [(slav %p i.wire) i.t.wire]
|
||||||
|
=/ =session (~(got by hoc) id)
|
||||||
|
=/ he-full ~(. he hid id ~ session)
|
||||||
=^ moves state
|
=^ moves state
|
||||||
=< he-abet
|
=< he-abet
|
||||||
?+ +<.sign-arvo ~|([%dojo-bad-take +<.sign-arvo] !!)
|
?+ +<.sign-arvo ~|([%dojo-bad-take +<.sign-arvo] !!)
|
||||||
%writ (he-writ:he-full t.wire +>.sign-arvo)
|
%writ (he-writ:he-full t.t.wire +>.sign-arvo)
|
||||||
%http-response (he-http-response:he-full t.wire +>.sign-arvo)
|
%http-response (he-http-response:he-full t.t.wire +>.sign-arvo)
|
||||||
==
|
==
|
||||||
[moves ..on-init]
|
[moves ..on-init]
|
||||||
:: if dojo fails unexpectedly, kill whatever each session is working on
|
:: if dojo fails unexpectedly, kill whatever each session is working on
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
:: herm: stand-in for term.c with http interface
|
:: herm: stand-in for term.c with http interface
|
||||||
::
|
::
|
||||||
|
/- herm
|
||||||
/+ default-agent, dbug, verb
|
/+ default-agent, dbug, verb
|
||||||
|
:: keep relevant mark conversions in cache for performance
|
||||||
|
::
|
||||||
/$ blit-to-json %blit %json
|
/$ blit-to-json %blit %json
|
||||||
/$ json-to-blit %json %blit
|
/$ json-to-blit %json %blit
|
||||||
|
/$ json-to-task %json %herm-task
|
||||||
|
::
|
||||||
=, jael
|
=, jael
|
||||||
|%
|
|%
|
||||||
+$ state-0 [%0 ~]
|
+$ state-0 [%0 ~]
|
||||||
@ -13,15 +18,18 @@
|
|||||||
%+ verb |
|
%+ verb |
|
||||||
%- agent:dbug
|
%- agent:dbug
|
||||||
^- agent:gall
|
^- agent:gall
|
||||||
|
=> |%
|
||||||
|
++ pass-session
|
||||||
|
|= [ses=@tas tas=session-task:dill]
|
||||||
|
[%pass /dill/[ses] %arvo %d %shot ses tas]
|
||||||
|
--
|
||||||
|_ =bowl:gall
|
|_ =bowl:gall
|
||||||
+* this .
|
+* this .
|
||||||
def ~(. (default-agent this %|) bowl)
|
def ~(. (default-agent this %|) bowl)
|
||||||
::
|
::
|
||||||
++ on-init
|
++ on-init
|
||||||
^- (quip card:agent:gall _this)
|
^- (quip card:agent:gall _this)
|
||||||
:: set up dill session subscription
|
[~ this]
|
||||||
::
|
|
||||||
[[%pass [%view %$ ~] %arvo %d %view ~]~ this]
|
|
||||||
::
|
::
|
||||||
++ on-save !>([%0 ~])
|
++ on-save !>([%0 ~])
|
||||||
++ on-load
|
++ on-load
|
||||||
@ -32,47 +40,68 @@
|
|||||||
++ on-watch
|
++ on-watch
|
||||||
|= =path
|
|= =path
|
||||||
^- (quip card:agent:gall _this)
|
^- (quip card:agent:gall _this)
|
||||||
?> =(our src):bowl
|
|
||||||
?> ?=([%session @ %view ~] path)
|
|
||||||
:_ this
|
:_ this
|
||||||
:: scry prompt and cursor position out of dill for initial response
|
~| path
|
||||||
|
?> ?=([%session @ %view ~] path)
|
||||||
|
=* ses i.t.path
|
||||||
|
:: subscribe to the requested session
|
||||||
::
|
::
|
||||||
=/ base=^path
|
::NOTE multiple views do not result in multiple subscriptions
|
||||||
/dx/(scot %p our.bowl)//(scot %da now.bowl)/sessions
|
:: because they go over the same wire/duct
|
||||||
:~ [%give %fact ~ %blit !>(.^(blit:dill (weld base //line)))]
|
::
|
||||||
[%give %fact ~ %blit !>(`blit:dill`hop+.^(@ud (weld base //cursor)))]
|
[(pass-session ses %view ~)]~
|
||||||
==
|
|
||||||
::
|
::
|
||||||
++ on-arvo
|
++ on-arvo
|
||||||
|= [=wire =sign-arvo]
|
|= [=wire =sign-arvo]
|
||||||
^- (quip card:agent:gall _this)
|
^- (quip card:agent:gall _this)
|
||||||
|
~| wire
|
||||||
?+ wire (on-arvo:def wire sign-arvo)
|
?+ wire (on-arvo:def wire sign-arvo)
|
||||||
[%tube *] [~ this] :: we no longer care about these
|
[%tube *] [~ this] :: we no longer care about these
|
||||||
::
|
::
|
||||||
:: pass on dill blits for the session
|
:: pass on dill blits for the session
|
||||||
::
|
::
|
||||||
[%view %$ ~]
|
[%dill @ ~]
|
||||||
|
=* ses i.t.wire
|
||||||
?. ?=([%dill %blit *] sign-arvo)
|
?. ?=([%dill %blit *] sign-arvo)
|
||||||
~| [%unexpected-sign [- +<]:sign-arvo]
|
~| [%unexpected-sign [- +<]:sign-arvo]
|
||||||
!!
|
!!
|
||||||
:_ this
|
:_ this
|
||||||
%+ turn p.sign-arvo
|
%+ turn p.sign-arvo
|
||||||
|= =blit:dill
|
|= =blit:dill
|
||||||
[%give %fact [%session %$ %view ~]~ %blit !>(blit)]
|
[%give %fact [%session ses %view ~]~ %blit !>(blit)]
|
||||||
|
::
|
||||||
|
:: clean up old-style subscriptions
|
||||||
|
::
|
||||||
|
[%view @ ~]
|
||||||
|
=* ses i.t.wire
|
||||||
|
:_ this
|
||||||
|
[%pass wire %arvo %d %shot ses %flee ~]~
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ on-poke
|
++ on-poke
|
||||||
|= [=mark =vase]
|
|= [=mark =vase]
|
||||||
^- (quip card:agent:gall _this)
|
^- (quip card:agent:gall _this)
|
||||||
?> =(our src):bowl
|
|
||||||
?. ?=(%belt mark)
|
|
||||||
~| [%unexpected-mark mark]
|
|
||||||
!!
|
|
||||||
:_ this
|
:_ this
|
||||||
[%pass [%belt %$ ~] %arvo %d %belt !<(belt:dill vase)]~
|
:_ ~
|
||||||
|
?+ mark ~|([%unexpected-mark mark] !!)
|
||||||
|
%belt (pass-session %$ %belt !<(belt:dill vase))
|
||||||
|
%herm-task (pass-session !<(task:herm vase))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ on-peek
|
||||||
|
|= =path
|
||||||
|
^- (unit (unit cage))
|
||||||
|
?+ path ~
|
||||||
|
[%x %sessions ~]
|
||||||
|
:+ ~ ~
|
||||||
|
:- %json
|
||||||
|
!> ^- json
|
||||||
|
=- a+(turn ~(tap in -) (lead %s))
|
||||||
|
.^((set @tas) %dy /(scot %p our.bowl)//(scot %da now.bowl)/sessions)
|
||||||
|
==
|
||||||
::
|
::
|
||||||
++ on-leave on-leave:def
|
++ on-leave on-leave:def
|
||||||
++ on-peek on-peek:def
|
::
|
||||||
++ on-agent on-agent:def
|
++ on-agent on-agent:def
|
||||||
++ on-fail on-fail:def
|
++ on-fail on-fail:def
|
||||||
--
|
--
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
/+ drum=hood-drum, helm=hood-helm, kiln=hood-kiln
|
/+ drum=hood-drum, helm=hood-helm, kiln=hood-kiln
|
||||||
|%
|
|%
|
||||||
+$ state
|
+$ state
|
||||||
$~ [%24 *state:drum *state:helm *state:kiln]
|
$~ [%25 *state:drum *state:helm *state:kiln]
|
||||||
$>(%24 any-state)
|
$>(%25 any-state)
|
||||||
::
|
::
|
||||||
+$ any-state
|
+$ any-state
|
||||||
$% [ver=?(%1 %2 %3 %4 %5 %6) lac=(map @tas fin-any-state)]
|
$% [ver=?(%1 %2 %3 %4 %5 %6) lac=(map @tas fin-any-state)]
|
||||||
@ -25,6 +25,7 @@
|
|||||||
[%22 drum=state-4:drum helm=state-1:helm kiln=state-9:kiln]
|
[%22 drum=state-4:drum helm=state-1:helm kiln=state-9:kiln]
|
||||||
[%23 drum=state-4:drum helm=state-2:helm kiln=state-9:kiln]
|
[%23 drum=state-4:drum helm=state-2:helm kiln=state-9:kiln]
|
||||||
[%24 drum=state-4:drum helm=state-2:helm kiln=state-10:kiln]
|
[%24 drum=state-4:drum helm=state-2:helm kiln=state-10:kiln]
|
||||||
|
[%25 drum=state-5:drum helm=state-2:helm kiln=state-10:kiln]
|
||||||
==
|
==
|
||||||
+$ any-state-tuple
|
+$ any-state-tuple
|
||||||
$: drum=any-state:drum
|
$: drum=any-state:drum
|
||||||
@ -92,8 +93,7 @@
|
|||||||
::
|
::
|
||||||
?+ mark (on-poke:def mark vase)
|
?+ mark (on-poke:def mark vase)
|
||||||
%atom poke-helm(mark %helm-atom)
|
%atom poke-helm(mark %helm-atom)
|
||||||
%dill-belt poke-drum(mark %drum-dill-belt)
|
%dill-poke poke-drum
|
||||||
%dill-blit poke-drum(mark %drum-dill-blit)
|
|
||||||
%hood-sync poke-kiln(mark %kiln-sync)
|
%hood-sync poke-kiln(mark %kiln-sync)
|
||||||
%write-sec-atom poke-helm(mark %helm-write-sec-atom)
|
%write-sec-atom poke-helm(mark %helm-write-sec-atom)
|
||||||
==
|
==
|
||||||
@ -108,6 +108,7 @@
|
|||||||
?+ path (on-watch:def +<)
|
?+ path (on-watch:def +<)
|
||||||
[%drum *] =^(c drum.state (peer:drum-core t.path) [c this])
|
[%drum *] =^(c drum.state (peer:drum-core t.path) [c this])
|
||||||
[%kiln *] =^(c kiln.state (peer:kiln-core t.path) [c this])
|
[%kiln *] =^(c kiln.state (peer:kiln-core t.path) [c this])
|
||||||
|
[%dill *] =^(c drum.state (peer:drum-core +<) [c this])
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ on-agent
|
++ on-agent
|
||||||
|
@ -83,7 +83,8 @@
|
|||||||
::
|
::
|
||||||
?+ -.source.com
|
?+ -.source.com
|
||||||
:_ this(job.state (some [eyre-id com]))
|
:_ this(job.state (some [eyre-id com]))
|
||||||
[%pass /sole %agent [our.bowl %dojo] %watch /sole/[eyre-id]]~
|
=/ =path /sole/(scot %p our.bowl)/[eyre-id]
|
||||||
|
[%pass /sole %agent [our.bowl %dojo] %watch path]~
|
||||||
::
|
::
|
||||||
%export
|
%export
|
||||||
:_ this(job.state (some [eyre-id com]))
|
:_ this(job.state (some [eyre-id com]))
|
||||||
|
@ -43,13 +43,13 @@
|
|||||||
++ on-fail on-fail:def
|
++ on-fail on-fail:def
|
||||||
::
|
::
|
||||||
++ command-parser
|
++ command-parser
|
||||||
|= sole-id=@ta
|
|= =sole-id:shoe
|
||||||
^+ |~(nail *(like [? command]))
|
^+ |~(nail *(like [? command]))
|
||||||
%+ stag &
|
%+ stag &
|
||||||
(perk %demo %row %table ~)
|
(perk %demo %row %table ~)
|
||||||
::
|
::
|
||||||
++ tab-list
|
++ tab-list
|
||||||
|= sole-id=@ta
|
|= =sole-id:shoe
|
||||||
^- (list [@t tank])
|
^- (list [@t tank])
|
||||||
:~ ['demo' leaf+"run example command"]
|
:~ ['demo' leaf+"run example command"]
|
||||||
['row' leaf+"print a row"]
|
['row' leaf+"print a row"]
|
||||||
@ -57,7 +57,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ on-command
|
++ on-command
|
||||||
|= [sole-id=@ta =command]
|
|= [=sole-id:shoe =command]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
=; [to=(list _sole-id) fec=shoe-effect:shoe]
|
=; [to=(list _sole-id) fec=shoe-effect:shoe]
|
||||||
[[%shoe to fec]~ this]
|
[[%shoe to fec]~ this]
|
||||||
@ -87,7 +87,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ can-connect
|
++ can-connect
|
||||||
|= sole-id=@ta
|
|= =sole-id:shoe
|
||||||
^- ?
|
^- ?
|
||||||
?| =(~zod src.bowl)
|
?| =(~zod src.bowl)
|
||||||
(team:title [our src]:bowl)
|
(team:title [our src]:bowl)
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
:- %aqua-events
|
:- %aqua-events
|
||||||
%+ turn
|
%+ turn
|
||||||
^- (list unix-event)
|
^- (list unix-event)
|
||||||
:~ [/d/term/1 %belt %ctl `@c`%e]
|
:~ [/d/term/1 %belt %mod %ctl `@c`%e]
|
||||||
[/d/term/1 %belt %ctl `@c`%u]
|
[/d/term/1 %belt %mod %ctl `@c`%u]
|
||||||
[/d/term/1 %belt %txt ((list @c) command)]
|
[/d/term/1 %belt %txt ((list @c) command)]
|
||||||
[/d/term/1 %belt %ret ~]
|
[/d/term/1 %belt %ret ~]
|
||||||
==
|
==
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
rest=(list desk)
|
rest=(list desk)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
~
|
prime=_|
|
||||||
==
|
==
|
||||||
:- %pill
|
:- %pill
|
||||||
^- pill:pill
|
^- pill:pill
|
||||||
@ -39,50 +39,10 @@
|
|||||||
?~ arg %base
|
?~ arg %base
|
||||||
?>(?=(@ base.arg) base.arg)
|
?>(?=(@ base.arg) base.arg)
|
||||||
/(scot %p p.bec)/[desk]/(scot %da now)/sys
|
/(scot %p p.bec)/[desk]/(scot %da now)/sys
|
||||||
=/ bas=path
|
|
||||||
(scag 3 sys)
|
|
||||||
=/ dez=(list [desk path])
|
=/ dez=(list [desk path])
|
||||||
?~ arg ~
|
?~ arg ~
|
||||||
%+ turn rest.arg
|
%+ turn rest.arg
|
||||||
|= =desk
|
|= =desk
|
||||||
[desk /(scot %p p.bec)/[desk]/(scot %da now)]
|
[desk /(scot %p p.bec)/[desk]/(scot %da now)]
|
||||||
::
|
::
|
||||||
:: compiler-source: hoon source file producing compiler, `sys/hoon`
|
(brass:pill sys dez prime)
|
||||||
::
|
|
||||||
=+ compiler-source=.^(@t %cx (welp sys /hoon/hoon))
|
|
||||||
::
|
|
||||||
:: compiler-twig: compiler as hoon expression
|
|
||||||
::
|
|
||||||
~& %brass-parsing
|
|
||||||
=+ compiler-twig=(rain /sys/hoon/hoon compiler-source)
|
|
||||||
~& %brass-parsed
|
|
||||||
::
|
|
||||||
:: compiler-formula: compiler as nock formula
|
|
||||||
::
|
|
||||||
~& %brass-compiling
|
|
||||||
=+ compiler-formula=q:(~(mint ut %noun) %noun compiler-twig)
|
|
||||||
~& %brass-compiled
|
|
||||||
::
|
|
||||||
:: arvo-source: hoon source file producing arvo kernel, `sys/arvo`
|
|
||||||
::
|
|
||||||
=+ arvo-source=.^(@t %cx (welp sys /arvo/hoon))
|
|
||||||
::
|
|
||||||
:: boot-ova: startup events
|
|
||||||
::
|
|
||||||
=/ boot-ova=(list)
|
|
||||||
:~ aeon:eden:part
|
|
||||||
boot:eden:part
|
|
||||||
compiler-formula
|
|
||||||
compiler-source
|
|
||||||
arvo-source
|
|
||||||
==
|
|
||||||
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
|
|
||||||
::
|
|
||||||
:+ %pill %brass
|
|
||||||
:+ boot-ova
|
|
||||||
:~ (boot-ovum:pill compiler-source arvo-source)
|
|
||||||
(file-ovum2:pill bas)
|
|
||||||
==
|
|
||||||
%+ turn
|
|
||||||
(snoc dez [%base bas])
|
|
||||||
file-ovum:pill
|
|
||||||
|
28
pkg/arvo/gen/desk-requests.hoon
Normal file
28
pkg/arvo/gen/desk-requests.hoon
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
:: +desk-requests: count pending requests for a desk
|
||||||
|
::
|
||||||
|
:- %say
|
||||||
|
|= $: [now=@da eny=@uvJ bec=beak]
|
||||||
|
[=desk ~]
|
||||||
|
~
|
||||||
|
==
|
||||||
|
:- %tang
|
||||||
|
^- tang
|
||||||
|
=/ cul=(list [@p rave:clay])
|
||||||
|
%~ tap in
|
||||||
|
.^ (set [@p rave:clay])
|
||||||
|
/cx/(scot %p p.bec)//(scot %da now)/cult/[desk]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
=/ [loc=_cul inc=_cul]
|
||||||
|
(skid cul |=([=@p rave:clay] =(p p.bec)))
|
||||||
|
=/ syc=_cul
|
||||||
|
=/ nex=@ud
|
||||||
|
+(ud:.^(cass:clay %cw /(scot %p p.bec)/[desk]/(scot %da now)))
|
||||||
|
(skim inc |=([@p =rave:clay] =([%sing %w ud+nex /] rave)))
|
||||||
|
::
|
||||||
|
%- flop
|
||||||
|
:~ leaf+"total: {<(lent cul)>}"
|
||||||
|
leaf+"- local: {<(lent loc)>}"
|
||||||
|
leaf+"- incoming: {<(lent inc)>}"
|
||||||
|
leaf+" - for next: {<(lent syc)>}"
|
||||||
|
==
|
@ -39,7 +39,7 @@
|
|||||||
|= a=* ^- [cord path]
|
|= a=* ^- [cord path]
|
||||||
[;;(@t a) (welp (slag len pax) /[nam])]
|
[;;(@t a) (welp (slag len pax) /[nam])]
|
||||||
--
|
--
|
||||||
::
|
::TODO: make this work with doccords
|
||||||
:- %say
|
:- %say
|
||||||
|= [[now=time @ our=ship ^] typ=$@(~ [p=term ~]) ~]
|
|= [[now=time @ our=ship ^] typ=$@(~ [p=term ~]) ~]
|
||||||
=/ pax=path /(scot %p our)/base/(scot %da now)/gen :: XX hardcoded
|
=/ pax=path /(scot %p our)/base/(scot %da now)/gen :: XX hardcoded
|
||||||
|
10
pkg/arvo/gen/hood/ames-snub.hoon
Normal file
10
pkg/arvo/gen/hood/ames-snub.hoon
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
:: Helm: Set Ames Blocklist
|
||||||
|
::
|
||||||
|
/? 310
|
||||||
|
::
|
||||||
|
::::
|
||||||
|
::
|
||||||
|
:- %say
|
||||||
|
|= [^ ships=(list ship) ~]
|
||||||
|
:- %helm-ames-snub
|
||||||
|
ships
|
9
pkg/arvo/gen/hood/close-flows.hoon
Normal file
9
pkg/arvo/gen/hood/close-flows.hoon
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
:: |close-flows: corks all stale ames flows
|
||||||
|
::
|
||||||
|
:: It runs in dry mode by default, printing the flows that can be closed.
|
||||||
|
:: To actually close the flows, run with |close-flows, =dry |
|
||||||
|
::
|
||||||
|
:- %say
|
||||||
|
|= [^ arg=~ dry=?]
|
||||||
|
::
|
||||||
|
[%helm-kroc dry]
|
@ -8,9 +8,11 @@
|
|||||||
::
|
::
|
||||||
:- %say
|
:- %say
|
||||||
|= $: [now=@da eny=@uvJ byk=beak]
|
|= $: [now=@da eny=@uvJ byk=beak]
|
||||||
[arg=$?([dap=term ~] [who=ship dap=term ~]) ~]
|
arg=$?([dap=term ~] [who=ship dap=term ~])
|
||||||
|
drum-session=@ta
|
||||||
==
|
==
|
||||||
:- %drum-link
|
:- %drum-link
|
||||||
|
:- drum-session
|
||||||
?~ +.arg
|
?~ +.arg
|
||||||
[p.byk dap.arg]
|
[p.byk dap.arg]
|
||||||
[who.arg dap.arg]
|
[who.arg dap.arg]
|
||||||
|
@ -8,9 +8,11 @@
|
|||||||
::
|
::
|
||||||
:- %say
|
:- %say
|
||||||
|= $: [now=@da eny=@uvJ byk=beak]
|
|= $: [now=@da eny=@uvJ byk=beak]
|
||||||
[arg=$?([dap=term ~] [who=ship dap=term ~]) ~]
|
arg=$?([dap=term ~] [who=ship dap=term ~])
|
||||||
|
drum-session=@ta
|
||||||
==
|
==
|
||||||
:- %drum-unlink
|
:- %drum-unlink
|
||||||
|
:- drum-session
|
||||||
?~ +.arg
|
?~ +.arg
|
||||||
[p.byk dap.arg]
|
[p.byk dap.arg]
|
||||||
[who.arg dap.arg]
|
[who.arg dap.arg]
|
||||||
|
@ -17,60 +17,4 @@
|
|||||||
=/ sys=path
|
=/ sys=path
|
||||||
?^ arg top.arg
|
?^ arg top.arg
|
||||||
/(scot %p p.bec)/[q.bec]/(scot %da now)/sys
|
/(scot %p p.bec)/[q.bec]/(scot %da now)/sys
|
||||||
=/ lib
|
(ivory:pill sys)
|
||||||
(welp (flop (tail (flop sys))) /lib)
|
|
||||||
::
|
|
||||||
|^ =/ ver
|
|
||||||
=/ sub *(trap vase)
|
|
||||||
=. sub (build-sys sub %hoon)
|
|
||||||
=. sub (build-sys sub %arvo)
|
|
||||||
=. sub (build-sys sub %lull)
|
|
||||||
=. sub (build-sys sub %zuse)
|
|
||||||
=. sub (build-lib sub & %ethereum)
|
|
||||||
=. sub (build-lib sub & %azimuth)
|
|
||||||
(build-lib sub | %vere)
|
|
||||||
=/ nok !.
|
|
||||||
=> *[ver=(trap vase) ~]
|
|
||||||
!= q:$:ver
|
|
||||||
ivory/[nok ver ~]
|
|
||||||
::
|
|
||||||
++ build-sys
|
|
||||||
|= [sub=(trap vase) nam=term] ^- (trap vase)
|
|
||||||
~> %slog.[0 leaf+"ivory: building /sys/{(trip nam)}"]
|
|
||||||
(swat sub (rain /sys/[nam]/hoon .^(@t cx+(welp sys /[nam]/hoon))))
|
|
||||||
::
|
|
||||||
++ build-lib
|
|
||||||
|= [sub=(trap vase) imp=? nam=term] ^- (trap vase)
|
|
||||||
~> %slog.[0 leaf+"ivory: building /lib/{(trip nam)}"]
|
|
||||||
=/ hun=hoon
|
|
||||||
%+ mist /lib/[nam]/hoon
|
|
||||||
.^(@t cx+(welp lib /[nam]/hoon))
|
|
||||||
?. imp (swat sub hun)
|
|
||||||
(swel sub [%ktts nam hun])
|
|
||||||
:: +mist: +rain but skipping past ford runes
|
|
||||||
::
|
|
||||||
++ mist
|
|
||||||
|= [bon=path txt=@]
|
|
||||||
^- hoon
|
|
||||||
=+ vas=vast
|
|
||||||
~| bon
|
|
||||||
%+ scan (trip txt)
|
|
||||||
%- full
|
|
||||||
=; fud
|
|
||||||
(ifix [;~(plug gay fud) gay] tall:vas(wer bon))
|
|
||||||
%- star
|
|
||||||
;~ pose vul
|
|
||||||
%+ ifix [fas (just `@`10)]
|
|
||||||
(star ;~(less (just `@`10) next))
|
|
||||||
==
|
|
||||||
:: +swel: +swat but with +slop
|
|
||||||
::
|
|
||||||
++ swel
|
|
||||||
|= [tap=(trap vase) gen=hoon]
|
|
||||||
^- (trap vase)
|
|
||||||
=/ gun (~(mint ut p:$:tap) %noun gen)
|
|
||||||
=> [tap=tap gun=gun]
|
|
||||||
|. ~+
|
|
||||||
=/ pro q:$:tap
|
|
||||||
[[%cell p.gun p:$:tap] [.*(pro q.gun) pro]]
|
|
||||||
--
|
|
||||||
|
@ -6,9 +6,15 @@
|
|||||||
:- %tang
|
:- %tang
|
||||||
%- flop ^- tang
|
%- flop ^- tang
|
||||||
=/ pax=path /(scot %p p.bec)/[desk]/(scot %da now)
|
=/ pax=path /(scot %p p.bec)/[desk]/(scot %da now)
|
||||||
=+ .^([lal=@tas num=@ud] cx+(weld pax /sys/kelvin))
|
=/ welt=(list [@tas @ud])
|
||||||
|
=+ .^(=waft:clay cx+(weld pax /sys/kelvin))
|
||||||
|
%+ sort ~(tap in (waft-to-wefts:clay waft))
|
||||||
|
|= [a=weft b=weft]
|
||||||
|
?: =(lal.a lal.b)
|
||||||
|
(lte num.a num.b)
|
||||||
|
(lte lal.a lal.b)
|
||||||
:~ '/sys/kelvin:'
|
:~ '/sys/kelvin:'
|
||||||
leaf/"[{<lal>} {<num>}]"
|
(sell !>(welt))
|
||||||
'/desk/bill:'
|
'/desk/bill:'
|
||||||
(sell !>(.^((list dude:gall) cx+(weld pax /desk/bill))))
|
(sell !>(.^((list dude:gall) cx+(weld pax /desk/bill))))
|
||||||
==
|
==
|
||||||
|
@ -28,12 +28,10 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
dub=_|
|
dub=_|
|
||||||
|
prime=_|
|
||||||
==
|
==
|
||||||
:- %pill
|
:- %pill
|
||||||
^- pill:pill
|
^- pill:pill
|
||||||
:: sys: root path to boot system, `/~me/[desk]/now/sys`
|
|
||||||
:: bas: root path to boot system' desk
|
|
||||||
:: dez: secondary desks and their root paths
|
|
||||||
::
|
::
|
||||||
=/ sys=path
|
=/ sys=path
|
||||||
?: ?=([^ *] arg)
|
?: ?=([^ *] arg)
|
||||||
@ -42,84 +40,10 @@
|
|||||||
?~ arg %base
|
?~ arg %base
|
||||||
?>(?=(@ base.arg) base.arg)
|
?>(?=(@ base.arg) base.arg)
|
||||||
/(scot %p p.bec)/[desk]/(scot %da now)/sys
|
/(scot %p p.bec)/[desk]/(scot %da now)/sys
|
||||||
=/ bas=path
|
|
||||||
(scag 3 sys)
|
|
||||||
=/ dez=(list [desk path])
|
=/ dez=(list [desk path])
|
||||||
?~ arg ~
|
?~ arg ~
|
||||||
%+ turn rest.arg
|
%+ turn rest.arg
|
||||||
|= =desk
|
|= =desk
|
||||||
[desk /(scot %p p.bec)/[desk]/(scot %da now)]
|
[desk /(scot %p p.bec)/[desk]/(scot %da now)]
|
||||||
::
|
::
|
||||||
=/ compiler-path (weld sys /hoon)
|
(solid:pill sys dez dub now prime)
|
||||||
=/ arvo-path (weld sys /arvo)
|
|
||||||
~& %solid-start
|
|
||||||
=/ compiler-src .^(@t %cx (weld compiler-path /hoon))
|
|
||||||
=/ arvo-src .^(@t %cx (weld arvo-path /hoon))
|
|
||||||
=/ arvo-formula
|
|
||||||
~& %solid-loaded
|
|
||||||
=/ compiler-hoon (rain compiler-path compiler-src)
|
|
||||||
?. dub
|
|
||||||
:: compile arvo against hoon, with our current compiler
|
|
||||||
::
|
|
||||||
=/ whole-hoon=hoon
|
|
||||||
[%tsgr compiler-hoon [%tsgr [%$ 7] (rain arvo-path arvo-src)]]
|
|
||||||
~& %solid-parsed
|
|
||||||
=/ whole-formula q:(~(mint ut %noun) %noun whole-hoon)
|
|
||||||
~& %solid-arvo
|
|
||||||
whole-formula
|
|
||||||
:: compile arvo against hoon, with a freshly compiled hoon (via +ride)
|
|
||||||
::
|
|
||||||
~& %solid-parsed
|
|
||||||
=/ compiler-formula q:(~(mint ut %noun) %noun compiler-hoon)
|
|
||||||
~& %solid-compiled
|
|
||||||
=/ whole-src
|
|
||||||
(rap 3 ['=> ' compiler-src '=> +7 ' arvo-src ~])
|
|
||||||
~& %solid-double-loaded
|
|
||||||
=/ whole-formula
|
|
||||||
=< +
|
|
||||||
.* [%noun whole-src]
|
|
||||||
[%8 compiler-formula [%9 2 %10 [6 %0 3] [%0 2]]]
|
|
||||||
~& %solid-double-compiled
|
|
||||||
whole-formula
|
|
||||||
::
|
|
||||||
~& [%solid-kernel `@ux`(mug arvo-formula)]
|
|
||||||
::
|
|
||||||
:: installed: Arvo gate (formal interface) with %zuse and vanes installed
|
|
||||||
::
|
|
||||||
=/ installed
|
|
||||||
=< q
|
|
||||||
%^ spin
|
|
||||||
^- (list ovum)
|
|
||||||
:- (boot-ovum:pill compiler-src arvo-src)
|
|
||||||
%+ turn
|
|
||||||
(snoc (turn dez tail) bas)
|
|
||||||
file-ovum2:pill
|
|
||||||
.*(0 arvo-formula)
|
|
||||||
|= [ovo=ovum ken=*]
|
|
||||||
[~ (slum ken [now ovo])]
|
|
||||||
::
|
|
||||||
:: boot-two: startup formula
|
|
||||||
::
|
|
||||||
:: We evaluate :arvo-formula (for jet registration),
|
|
||||||
:: then ignore the result and produce .installed
|
|
||||||
::
|
|
||||||
=/ boot-two
|
|
||||||
=> *[arvo-formula=^ installed=^ tale=*]
|
|
||||||
!= =+(.*(0 arvo-formula) [installed tale])
|
|
||||||
::
|
|
||||||
:: boot-ova
|
|
||||||
::
|
|
||||||
=/ boot-ova=(list)
|
|
||||||
[aeon:eden:part boot-two arvo-formula installed ~]
|
|
||||||
::
|
|
||||||
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
|
|
||||||
::
|
|
||||||
:: Our kernel event-list is ~, as we've already installed them.
|
|
||||||
:: Our userspace event-list is a list containing a full %clay
|
|
||||||
:: filesystem sync event.
|
|
||||||
::
|
|
||||||
:+ %pill %solid
|
|
||||||
:+ boot-ova ~
|
|
||||||
%+ turn
|
|
||||||
(snoc dez [%base bas])
|
|
||||||
file-ovum:pill
|
|
||||||
|
141
pkg/arvo/gen/stale-flows.hoon
Normal file
141
pkg/arvo/gen/stale-flows.hoon
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
:: +stale-flows: prints number of ames flows that can be closed
|
||||||
|
::
|
||||||
|
:: |stale-flows, =veb %1 :: flows from nacking initial subscriptions
|
||||||
|
:: |stale-flows, =veb %2 :: stale flows that keep (re)trying to connect
|
||||||
|
:: |stale-flows, =veb %21 :: ... per app (only forward)
|
||||||
|
:: |stale-flows, =veb %3 :: stale resubscriptions
|
||||||
|
::
|
||||||
|
=> |%
|
||||||
|
+$ subs (jar path [ship bone @])
|
||||||
|
+$ pags (jar app=term [dst=term =ship =path]) :: per-agent
|
||||||
|
+$ naks (set [ship bone])
|
||||||
|
:: verbosity
|
||||||
|
::
|
||||||
|
+$ veb ?(%0 %1 %2 %21 %3 %31)
|
||||||
|
::
|
||||||
|
++ resubs
|
||||||
|
|= [=subs =veb]
|
||||||
|
^- @
|
||||||
|
::=/ sorted
|
||||||
|
:: %+ sort ~(tap by subs)
|
||||||
|
:: |=([a=(list *) b=(list *)] (lte (lent a) (lent b)))
|
||||||
|
%+ roll ~(tap by subs)::sorted
|
||||||
|
|= [[k=path v=(list [ship bone @])] num=@]
|
||||||
|
~? &(=(%3 veb) (gth (lent v) 1))
|
||||||
|
"#{<(dec (lent v))>} stale resubs on {<k>}"
|
||||||
|
?. (gth (lent v) 1) num
|
||||||
|
(add (lent v) num)
|
||||||
|
--
|
||||||
|
::
|
||||||
|
:- %say
|
||||||
|
|= $: [now=@da eny=@uvJ bec=beak]
|
||||||
|
[arg=~ dry=? =veb]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
=/ peers-map
|
||||||
|
.^((map ship ?(%alien %known)) %ax /(scot %p p.bec)//(scot %da now)/peers)
|
||||||
|
::
|
||||||
|
=/ peers=(list ship)
|
||||||
|
%+ murn ~(tap by peers-map)
|
||||||
|
|= [=ship val=?(%alien %known)]
|
||||||
|
?: =(ship p.bec)
|
||||||
|
~ :: this is weird, but we saw it
|
||||||
|
?- val
|
||||||
|
%alien ~
|
||||||
|
%known (some ship)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
=; [[=subs =pags backward=@ forward=@] =naks]
|
||||||
|
:- %tang %- flop
|
||||||
|
%+ weld
|
||||||
|
:~ leaf+"#{<~(wyt in naks)>} flows from %nacking %watches"
|
||||||
|
leaf+"#{<backward>} backward flows with >10 retries"
|
||||||
|
leaf+"#{<forward>} forward flows with >10 retries"
|
||||||
|
leaf+"#{<(resubs subs veb)>} stale resubscriptions"
|
||||||
|
==
|
||||||
|
?. =(%21 veb) ~
|
||||||
|
:- leaf+"----------------------------------"
|
||||||
|
%+ turn %+ sort ~(tap by pags)
|
||||||
|
|= [[* v=(list)] [* w=(list)]]
|
||||||
|
(gth (lent v) (lent w))
|
||||||
|
|= [app=term v=(list [dst=term =ship =path])]
|
||||||
|
:- %leaf
|
||||||
|
%+ weld "#{<(lent v)>} flows for {<app>} with >10 retries"
|
||||||
|
?. =(1 (lent v)) ~
|
||||||
|
?> ?=(^ v)
|
||||||
|
" on {<ship.i.v>} to {<dst.i.v>} at {<path.i.v>}"
|
||||||
|
::
|
||||||
|
%+ roll peers
|
||||||
|
|= [=ship [=subs p=pags b=@ f=@] n=naks]
|
||||||
|
=+ .^ =ship-state:ames
|
||||||
|
%ax /(scot %p p.bec)//(scot %da now)/peers/(scot %p ship)
|
||||||
|
==
|
||||||
|
=/ =peer-state:ames ?>(?=(%known -.ship-state) +.ship-state)
|
||||||
|
::
|
||||||
|
|^ [stale nacks]
|
||||||
|
::
|
||||||
|
++ stale
|
||||||
|
%+ roll ~(tap by snd.peer-state)
|
||||||
|
|= [[=bone message-pump-state:ames] subs=_subs pags=_p backward=_b forward=_f]
|
||||||
|
=, packet-pump-state
|
||||||
|
:- ?~ duct=(~(get by by-bone.ossuary.peer-state) bone) subs
|
||||||
|
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
|
||||||
|
subs
|
||||||
|
=/ =wire i.t.u.duct
|
||||||
|
=/ nonce=(unit @) (rush i.t.t.t.t.t.t.t.i.t.u.duct dem)
|
||||||
|
%- ~(add ja subs)
|
||||||
|
:_ [ship bone ?~(nonce 0 u.nonce)] :: 0, 1?
|
||||||
|
?~ nonce wire
|
||||||
|
:: don't include the sub-nonce in the key
|
||||||
|
::
|
||||||
|
(weld (scag 7 wire) (slag 8 wire))
|
||||||
|
%+ roll ~(tap in live)
|
||||||
|
|= [[* [packet-state:ames *]] pags=_pags out=[b=_backward f=_forward]]
|
||||||
|
::
|
||||||
|
:: only forward flows
|
||||||
|
::
|
||||||
|
=? pags &(=(0 (end 0 bone)) (gth retries 10))
|
||||||
|
?~ duct=(~(get by by-bone.ossuary.peer-state) bone)
|
||||||
|
pags
|
||||||
|
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
|
||||||
|
pags
|
||||||
|
=/ =wire i.t.u.duct
|
||||||
|
(~(add ja pags) (snag 2 wire) (snag 8 wire) ship (slag 9 wire))
|
||||||
|
::
|
||||||
|
~? &(=(%2 veb) (gth retries 10))
|
||||||
|
=+ arrow=?:(=(0 (end 0 bone)) "<-" "->")
|
||||||
|
"{arrow} ({(cite:title ship)}) bone #{<bone>}, retries: #{<retries>}"
|
||||||
|
:- pags
|
||||||
|
=? out (gth retries 10)
|
||||||
|
?: =(0 (end 0 bone))
|
||||||
|
[b.out +(f.out)]
|
||||||
|
[+(b.out) f.out]
|
||||||
|
out
|
||||||
|
::
|
||||||
|
++ nacks
|
||||||
|
%+ roll ~(tap by rcv.peer-state)
|
||||||
|
|= [[=bone *] nacks=_n]
|
||||||
|
?. &(=(0 (end 0 bone)) =(1 (end 0 (rsh 0 bone))))
|
||||||
|
:: not a naxplanation ack bone
|
||||||
|
::
|
||||||
|
nacks
|
||||||
|
:: by only corking forward flows that have received
|
||||||
|
:: a nack we avoid corking the current subscription
|
||||||
|
::
|
||||||
|
=+ target=(mix 0b10 bone)
|
||||||
|
:: make sure that the nack bone has a forward flow
|
||||||
|
::
|
||||||
|
?~ duct=(~(get by by-bone.ossuary.peer-state) target)
|
||||||
|
nacks
|
||||||
|
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
|
||||||
|
nacks
|
||||||
|
=/ =wire i.t.u.duct
|
||||||
|
?> ?=([%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] wire)
|
||||||
|
=/ app=term i.t.t.wire
|
||||||
|
=/ nonce=@
|
||||||
|
=- ?~(- 0 u.-)
|
||||||
|
(rush i.t.t.t.t.t.t.t.wire dem)
|
||||||
|
=/ =path t.t.t.t.t.t.t.t.wire
|
||||||
|
~? =(%1 veb) "[bone={<target>} nonce={<nonce>} agent={<app>}] {<path>}"
|
||||||
|
(~(put in nacks) [ship target])
|
||||||
|
--
|
189
pkg/arvo/lib/deco.hoon
Normal file
189
pkg/arvo/lib/deco.hoon
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
:: Hoon doccords sample
|
||||||
|
::
|
||||||
|
:: this is a sample file designed to explain syntax and conventions
|
||||||
|
:: for doccords
|
||||||
|
::
|
||||||
|
:: all lines must be under 80 characters. no blank lines.
|
||||||
|
:: any line longer than 60 characters is probably too long.
|
||||||
|
:: uppercase or non-ascii letters are strongly discouraged.
|
||||||
|
::
|
||||||
|
:: whenever possible, use formal decorations. {::} decorates
|
||||||
|
:: the next expression when put on its own line, and the previous
|
||||||
|
:: expression if written on the same line
|
||||||
|
::
|
||||||
|
:: there are two places to put decorations: in line with the
|
||||||
|
:: code, and on the right margin.
|
||||||
|
::
|
||||||
|
:: the file below is a well-commented library, built around
|
||||||
|
:: a typical two-core structure. the cores are labeled {%arch}
|
||||||
|
:: (structures) and {%work} (productions).
|
||||||
|
::
|
||||||
|
:: this code is written to display the variety of formatting
|
||||||
|
:: options the parser allows. a specific convention should pick
|
||||||
|
:: one of these styles and stick to it.
|
||||||
|
::
|
||||||
|
:: there are three ways to mark the beginning of a formal comment:
|
||||||
|
:: 1- {:: $foo:}
|
||||||
|
:: 2- {:: +bar:}
|
||||||
|
:: 3- {:: }
|
||||||
|
::
|
||||||
|
:: style 1 may optionally be followed by a series of paragraphs, where each
|
||||||
|
:: paragraph is preceded by a line containing only {::} and whitespace, and
|
||||||
|
:: each line of a given paragraph is preceded by four aces.
|
||||||
|
:: {::}
|
||||||
|
:: {:: more text}
|
||||||
|
:: {:: even more text}
|
||||||
|
:: {::}
|
||||||
|
:: {:: |=(code=hoon !!)}
|
||||||
|
::
|
||||||
|
:: style 2 is much like style 1, but paragraphs are indented by two spaces
|
||||||
|
:: instead of four.
|
||||||
|
:: {::}
|
||||||
|
:: {:: more text}
|
||||||
|
:: {:: even more text}
|
||||||
|
:: {::}
|
||||||
|
:: {:: |=(code=hoon !!)}
|
||||||
|
::
|
||||||
|
:: code is indented a total of six aces, for either style.
|
||||||
|
::
|
||||||
|
:: style 3 is used to annotate the hoon or spec that immediately follows
|
||||||
|
:: the comment. paragraphs are written with style 2.
|
||||||
|
::
|
||||||
|
:: the $foo and +bar above are examples of *lexical locations* for
|
||||||
|
:: style and batch-commenting purposes. this tells the parser to attempt
|
||||||
|
:: to attach the comment to the specified location. these locations
|
||||||
|
:: may be written as follows:
|
||||||
|
:: - `|foo` means a chapter
|
||||||
|
:: - `%foo` means a constant
|
||||||
|
:: - `.foo` means a face
|
||||||
|
:: - `+foo` means an arm
|
||||||
|
:: - `$foo` means a spec
|
||||||
|
:: - `^foo` means a core
|
||||||
|
:: - `_foo` means a door
|
||||||
|
:: - `=foo` means a gate
|
||||||
|
:: - `/foo` means a file path segment
|
||||||
|
::
|
||||||
|
:: thus /lib/foo^widget|initial=open means the =open gate in the |initial
|
||||||
|
:: chapter of the ^widget core in the /foo library
|
||||||
|
::
|
||||||
|
:: at present, doccords does not support lexical locations in full.
|
||||||
|
:: only single-element locations of the form `$foo` and `+foo` are supported,
|
||||||
|
:: and must be written above an arm in the core to which they are to be
|
||||||
|
:: attached, and after the chapter they are in (if the core has chapters).
|
||||||
|
:: you may still write doccords for other locations in anticipation of the
|
||||||
|
:: fully supported lexical location, but they will be thrown away before they
|
||||||
|
:: make it to the compiler.
|
||||||
|
::
|
||||||
|
:: a postfix formal comment will either attach to hoon or spec on the
|
||||||
|
:: current line, or the arm name if there is no hoon or spec on the
|
||||||
|
:: line. the convention for +$ arms is that the comment attached to the
|
||||||
|
:: arm is about the mold itself, while the comment attached to the spec
|
||||||
|
:: is about the output type of the mold.
|
||||||
|
::
|
||||||
|
:: to inspect doccords in this file from dojo, try the following:
|
||||||
|
::
|
||||||
|
:: > =deco -build-file %/lib/deco/hoon
|
||||||
|
:: > # deco
|
||||||
|
:: > # deco/arch
|
||||||
|
:: > # deco/arch/molds
|
||||||
|
:: > # deco/arch/molds/goof
|
||||||
|
::
|
||||||
|
:: > ?? *goof:deco
|
||||||
|
::
|
||||||
|
=> ::
|
||||||
|
:: structures for our imaginary hello, world generator.
|
||||||
|
::
|
||||||
|
:: nothing forces us to put structures in a separate core.
|
||||||
|
:: but compile-time evaluation doesnt work in the current
|
||||||
|
:: core; we often want to statically evaluate structures.
|
||||||
|
::
|
||||||
|
:: there are three kinds of structures: moldss (normalizing
|
||||||
|
:: functions), mold builders (functions that build molds), and
|
||||||
|
:: constants (static data).
|
||||||
|
::
|
||||||
|
:: most code will not need its own mold builders. but put them
|
||||||
|
:: in a separate chapter (separated by {+|}).
|
||||||
|
|%
|
||||||
|
:: molds are functions that normalize nouns.
|
||||||
|
::
|
||||||
|
:: arms producing molds are introduced with {+$}. the
|
||||||
|
:: compiler will copy the arm decoration onto its product
|
||||||
|
+| %molds
|
||||||
|
:: $jam: some delicious jam
|
||||||
|
:: $jelly: different from jam?
|
||||||
|
+$ spot [p=@ q=@] :: a coordinate
|
||||||
|
+$ tops :: mold for coordinate
|
||||||
|
[p=@ q=@] :: another coordinate
|
||||||
|
+$ goof :: a simple tuple mold
|
||||||
|
$: foo=@ :: something mysterious
|
||||||
|
bar=@ :: go here for drink
|
||||||
|
moo=(binary-tree juice) :: cows do this
|
||||||
|
==
|
||||||
|
+$ juice :: fruity beverage mold
|
||||||
|
$% [%plum p=@] :: fresh prune
|
||||||
|
[%pear p=@ q=@] :: good for cider
|
||||||
|
[%acai p=@] :: aztec superfood
|
||||||
|
==
|
||||||
|
+$ jam @tas
|
||||||
|
+$ jelly @tas
|
||||||
|
:: mold builders are functions that build molds from other molds
|
||||||
|
::
|
||||||
|
:: other languages might call these "type constructors"
|
||||||
|
:: or "higher-kinded types".
|
||||||
|
+| %mold-builders
|
||||||
|
++ binary-tree :: tree mold builder
|
||||||
|
|* a=$-(* *)
|
||||||
|
$@(~ [n=a l=(binary-tree a) r=(binary-tree a)])
|
||||||
|
::
|
||||||
|
:: if you have constants, put them in their own chapter.
|
||||||
|
+| %constant
|
||||||
|
++ answer :: answer to everything
|
||||||
|
42
|
||||||
|
--
|
||||||
|
:: engines for our imaginary hello, world app.
|
||||||
|
::
|
||||||
|
|%
|
||||||
|
:: +default-jam: bunts $jam
|
||||||
|
:: +default-juice: bunts $juice
|
||||||
|
++ say-hello :: say hi to someone
|
||||||
|
:: friendly welcome message
|
||||||
|
::
|
||||||
|
|=
|
||||||
|
:: .txt: friend to say hi to
|
||||||
|
::
|
||||||
|
txt=term
|
||||||
|
^- tape
|
||||||
|
"hello, {(rip 3 txt)}"
|
||||||
|
:: +say-goodbye: say a really proper goodbye
|
||||||
|
::
|
||||||
|
:: some paragraphs about the goodbye algorithm, possibly
|
||||||
|
:: including code indented by four extra spaces:
|
||||||
|
::
|
||||||
|
:: ?: =(%hello %world)
|
||||||
|
:: %hello
|
||||||
|
:: %world
|
||||||
|
::
|
||||||
|
++ say-goodbye
|
||||||
|
:: describe product of function
|
||||||
|
::
|
||||||
|
|=
|
||||||
|
:: .txt: departing friend
|
||||||
|
:: .num: number of friends
|
||||||
|
$: txt=term
|
||||||
|
num=@
|
||||||
|
==
|
||||||
|
^- tape
|
||||||
|
:: .foo: four
|
||||||
|
:: .bar: forty-two
|
||||||
|
=/ foo (add 2 2)
|
||||||
|
=/ bar (add (mul num foo) 2)
|
||||||
|
=/ moo (mul num bar) :: for all the cows
|
||||||
|
"goodbye and {(scow %ud moo)}, {(rip 3 txt)}"
|
||||||
|
::
|
||||||
|
++ say-minimum :: minimal decoration
|
||||||
|
|= txt=term
|
||||||
|
"nothing to say to {(rip 3 txt)}"
|
||||||
|
::
|
||||||
|
++ default-jam *jam
|
||||||
|
++ default-juice *juice
|
||||||
|
--
|
1
pkg/arvo/lib/dill.hoon
Symbolic link
1
pkg/arvo/lib/dill.hoon
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../base-dev/lib/dill.hoon
|
@ -36,7 +36,7 @@
|
|||||||
;< ~ bind:m (backoff:strandio try ~h1)
|
;< ~ bind:m (backoff:strandio try ~h1)
|
||||||
;< rep=(unit httr:eyre) bind:m (hiss-request:strandio hiss)
|
;< rep=(unit httr:eyre) bind:m (hiss-request:strandio hiss)
|
||||||
?: ?& ?=(^ rep)
|
?: ?& ?=(^ rep)
|
||||||
|(=(200 p.u.rep) =(307 p.u.rep))
|
|(=(200 p.u.rep) =(307 p.u.rep) =(301 p.u.rep))
|
||||||
==
|
==
|
||||||
(pure:m &)
|
(pure:m &)
|
||||||
?. ?| ?=(~ rep)
|
?. ?| ?=(~ rep)
|
||||||
|
773
pkg/arvo/lib/dprint.hoon
Normal file
773
pkg/arvo/lib/dprint.hoon
Normal file
@ -0,0 +1,773 @@
|
|||||||
|
/- *sole
|
||||||
|
/+ easy-print=language-server-easy-print
|
||||||
|
:: a library for printing doccords
|
||||||
|
=/ debug |
|
||||||
|
=>
|
||||||
|
:: dprint-types
|
||||||
|
|%
|
||||||
|
:: $overview: an overview of all named things in the type.
|
||||||
|
::
|
||||||
|
:: each element in the overview list is either a documentation for a sublist
|
||||||
|
:: or an association betwen a term and documentation for it
|
||||||
|
+$ overview (list overview-item)
|
||||||
|
::
|
||||||
|
:: $overview-item: an element of an overview
|
||||||
|
+$ overview-item
|
||||||
|
$% [%header doc=what children=overview]
|
||||||
|
[%item name=tape doc=what]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: $item: the part of a type being inspected
|
||||||
|
+$ item
|
||||||
|
$%
|
||||||
|
:: overview of a type
|
||||||
|
::
|
||||||
|
[%view items=overview]
|
||||||
|
:: inspecting a full core
|
||||||
|
$: %core
|
||||||
|
name=tape :: arm that built it
|
||||||
|
docs=what ::
|
||||||
|
sut=type :: [%core *]
|
||||||
|
children=(unit item) :: compiled against
|
||||||
|
==
|
||||||
|
:: inspecting a single arm on a core
|
||||||
|
$: %arm
|
||||||
|
name=tape :: arm name
|
||||||
|
adoc=what :: arm doc
|
||||||
|
pdoc=what :: product doc
|
||||||
|
cdoc=what :: $ arm/prod doc
|
||||||
|
gen=hoon :: arm hoon AST
|
||||||
|
sut=type :: subject of arm
|
||||||
|
==
|
||||||
|
:: inspecting a face and what's behind it
|
||||||
|
$: %face
|
||||||
|
name=tape :: name of face
|
||||||
|
docs=what ::
|
||||||
|
children=(unit item) :: face referent
|
||||||
|
==
|
||||||
|
:: inspecting a single chapter on a core
|
||||||
|
$: %chapter
|
||||||
|
name=tape :: name of chapter
|
||||||
|
docs=what ::
|
||||||
|
sut=type :: [%core *]
|
||||||
|
tom=tome :: tome of chapter
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
--
|
||||||
|
:: dprint
|
||||||
|
::
|
||||||
|
:: core containing doccords search and printing utilities
|
||||||
|
|%
|
||||||
|
:: contains arms used for looking for docs inside of a type
|
||||||
|
::
|
||||||
|
:: the entrypoint for finding docs within a type is +find-item-in-type.
|
||||||
|
+| %searching
|
||||||
|
:: +find-item-in-type: returns the item to print while searching through topic
|
||||||
|
::
|
||||||
|
:: this gate is a thin wrapper around _hunt for usability, since the only entry
|
||||||
|
:: point most users should care about is find-item:hunt
|
||||||
|
::
|
||||||
|
++ find-item-in-type
|
||||||
|
|= [topics=(list term) sut=type]
|
||||||
|
?~ topics !!
|
||||||
|
=/ top=(lest term) topics
|
||||||
|
~(find-item hunt [top sut])
|
||||||
|
::
|
||||||
|
:: +hunt: door used for refining the type while searching for doccords
|
||||||
|
::
|
||||||
|
++ hunt
|
||||||
|
|_ [topics=(lest term) sut=type]
|
||||||
|
+* this .
|
||||||
|
::
|
||||||
|
+| %find
|
||||||
|
::
|
||||||
|
++ find-item
|
||||||
|
~? >> debug %find-item
|
||||||
|
^- (unit item)
|
||||||
|
?- sut
|
||||||
|
%noun ~
|
||||||
|
%void ~
|
||||||
|
[%atom *] ~
|
||||||
|
[%cell *] find-cell
|
||||||
|
[%core *] find-core
|
||||||
|
[%face *] find-face
|
||||||
|
[%fork *] find-fork
|
||||||
|
[%hint *] find-hint
|
||||||
|
[%hold *] find-item:this(sut (~(play ut p.sut) q.sut))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ find-cell
|
||||||
|
~? >> debug %find-cell
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%cell *] sut)
|
||||||
|
=/ lhs find-item:this(sut p.sut)
|
||||||
|
?~ lhs
|
||||||
|
find-item:this(sut q.sut)
|
||||||
|
lhs
|
||||||
|
::
|
||||||
|
++ find-core
|
||||||
|
~? >> debug %find-core
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
?: check-arm
|
||||||
|
?: check-search
|
||||||
|
?: check-arm-core
|
||||||
|
return-arm-core
|
||||||
|
return-arm
|
||||||
|
recurse-arm-core
|
||||||
|
?: check-chap
|
||||||
|
?: check-search
|
||||||
|
return-chap
|
||||||
|
recurse-chap
|
||||||
|
recurse-core
|
||||||
|
::
|
||||||
|
++ find-face
|
||||||
|
~? >> debug %find-face
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%face *] sut)
|
||||||
|
?. ?=(term p.sut)
|
||||||
|
::TODO: handle $tune case
|
||||||
|
find-item:this(sut q.sut)
|
||||||
|
?. =(i.topics p.sut)
|
||||||
|
~
|
||||||
|
?~ t.topics
|
||||||
|
return-face
|
||||||
|
find-item:this(sut q.sut, topics t.topics)
|
||||||
|
::
|
||||||
|
++ find-fork
|
||||||
|
~? >> debug %find-fork
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%fork *] sut)
|
||||||
|
=/ types=(list type) ~(tap in p.sut)
|
||||||
|
|-
|
||||||
|
?~ types ~
|
||||||
|
=+ res=find-item:this(sut i.types)
|
||||||
|
?~ res
|
||||||
|
$(types t.types)
|
||||||
|
res
|
||||||
|
::
|
||||||
|
++ find-hint
|
||||||
|
~? >> debug %find-hint
|
||||||
|
^- (unit item)
|
||||||
|
|^
|
||||||
|
?> ?=([%hint *] sut)
|
||||||
|
?. ?=([%help *] q.p.sut)
|
||||||
|
find-item:this(sut q.sut)
|
||||||
|
?+ q.sut ~
|
||||||
|
[%cell *] find-cell:this(sut q.sut)
|
||||||
|
[%core *] find-hint-core
|
||||||
|
[%face *] find-hint-face
|
||||||
|
[%fork *] find-fork:this(sut q.sut)
|
||||||
|
[%hint *] find-hint:this(sut q.sut)
|
||||||
|
[%hold *] find-hint:this(q.sut (~(play ut p.q.sut) q.q.sut))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ find-hint-core
|
||||||
|
~? >> debug %find-hint-core
|
||||||
|
^- (unit item)
|
||||||
|
?> &(?=([%hint *] sut) ?=([%help *] q.p.sut) ?=([%core *] q.sut))
|
||||||
|
::
|
||||||
|
?. ?& ((sane %tas) summary.crib.p.q.p.sut)
|
||||||
|
=(summary.crib.p.q.p.sut i.topics)
|
||||||
|
==
|
||||||
|
find-core:this(sut q.sut)
|
||||||
|
?~ t.topics
|
||||||
|
return-hint-core
|
||||||
|
find-item:this(sut q.sut, topics t.topics)
|
||||||
|
::
|
||||||
|
++ find-hint-face
|
||||||
|
~? >> debug %find-hint-face
|
||||||
|
^- (unit item)
|
||||||
|
?> &(?=([%hint *] sut) ?=([%help *] q.p.sut) ?=([%face *] q.sut))
|
||||||
|
?: check-face:this(sut q.sut)
|
||||||
|
?~ t.topics
|
||||||
|
return-hint-face
|
||||||
|
find-item:this(sut q.q.sut, topics t.topics)
|
||||||
|
find-item:this(sut q.q.sut)
|
||||||
|
--
|
||||||
|
::
|
||||||
|
::+| %recurse
|
||||||
|
++ recurse-core
|
||||||
|
~? >> debug %recurse-core
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
find-item:this(sut p.sut)
|
||||||
|
++ recurse-chap
|
||||||
|
~? >> debug %recurse-chap
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
?~ t.topics !!
|
||||||
|
find-item:this(topics t.topics)
|
||||||
|
++ recurse-arm-core
|
||||||
|
~? >> debug %recurse-arm-core
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
?~ t.topics !!
|
||||||
|
find-item:this(sut arm-type, topics t.topics)
|
||||||
|
::
|
||||||
|
+| %check
|
||||||
|
::
|
||||||
|
++ check-arm
|
||||||
|
~? >> debug %recurse-core
|
||||||
|
^- ?
|
||||||
|
!=(~ (find ~[i.topics] (sloe sut)))
|
||||||
|
++ check-chap
|
||||||
|
~? >> debug %check-chap
|
||||||
|
^- ?
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
(~(has by q.r.q.sut) i.topics)
|
||||||
|
++ check-face
|
||||||
|
~? >> debug %check-face
|
||||||
|
^- ?
|
||||||
|
?> ?=([%face *] sut)
|
||||||
|
?. ?=(term p.sut)
|
||||||
|
::TODO: handle $tune case
|
||||||
|
%.n
|
||||||
|
=(p.sut i.topics)
|
||||||
|
++ check-search
|
||||||
|
~? >> debug %check-search
|
||||||
|
^- ?
|
||||||
|
=(~ t.topics)
|
||||||
|
++ check-arm-core
|
||||||
|
~? >> debug %check-arm-core
|
||||||
|
^- ?
|
||||||
|
=+ arm-list=(sloe (~(play ut sut) arm-hoon))
|
||||||
|
&(!=(arm-list ~) !=(arm-list ~[%$]) ?=([%core *] arm-type))
|
||||||
|
::
|
||||||
|
+| %return
|
||||||
|
::
|
||||||
|
++ return-cell
|
||||||
|
~? >>> debug %return-cell
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%cell *] sut)
|
||||||
|
(join-items return-item:this(sut p.sut) return-item:this(sut q.sut))
|
||||||
|
::
|
||||||
|
++ return-core
|
||||||
|
~? >>> debug %return-core
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
=* compiled-against return-item:this(sut p.sut)
|
||||||
|
`[%core (trip i.topics) *what sut compiled-against]
|
||||||
|
::
|
||||||
|
++ return-face
|
||||||
|
~? >>> debug %return-face
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%face *] sut)
|
||||||
|
:: TODO: handle tune case
|
||||||
|
?> ?=(term p.sut)
|
||||||
|
=* compiled-against return-item:this(sut q.sut)
|
||||||
|
`[%face (trip p.sut) *what compiled-against]
|
||||||
|
::
|
||||||
|
++ return-fork
|
||||||
|
~? >>> debug %return-fork
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%fork *] sut)
|
||||||
|
=* types ~(tap in p.sut)
|
||||||
|
=* items (turn types |=(a=type return-item:this(sut a)))
|
||||||
|
(roll items join-items)
|
||||||
|
::
|
||||||
|
++ return-hint
|
||||||
|
~? >>> debug %return-hint
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%hint *] sut)
|
||||||
|
=* res return-item:this(sut q.sut)
|
||||||
|
?. ?=([%help *] q.p.sut)
|
||||||
|
~
|
||||||
|
?: ?=([%core *] q.sut)
|
||||||
|
return-hint-core
|
||||||
|
?: ?=([%face *] q.sut)
|
||||||
|
return-hint-face
|
||||||
|
`[%view [%header `crib.p.q.p.sut (item-as-overview res)]~]
|
||||||
|
::
|
||||||
|
++ return-arm
|
||||||
|
~? >>> debug %return-arm
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
=+ [adoc pdoc cdoc]=(arm-docs i.topics sut)
|
||||||
|
::TODO: should this p.sut be sut? or the compiled type of the arm?
|
||||||
|
`[%arm (trip i.topics) adoc pdoc cdoc arm-hoon sut]
|
||||||
|
::
|
||||||
|
++ return-chap
|
||||||
|
~? >>> debug %return-chap
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
=/ tom=tome (~(got by q.r.q.sut) i.topics)
|
||||||
|
`[%chapter (trip i.topics) p.tom sut (~(got by q.r.q.sut) i.topics)]
|
||||||
|
::
|
||||||
|
++ return-arm-core
|
||||||
|
~? >>> debug %return-arm-core
|
||||||
|
^- (unit item)
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
=+ [adoc pdoc cdoc]=(arm-docs i.topics sut)
|
||||||
|
=/ dox=what ?~(adoc ?~(pdoc ~ pdoc) adoc)
|
||||||
|
=/ at arm-type
|
||||||
|
?> ?=([%core *] at)
|
||||||
|
=* compiled-against return-item:this(sut p.sut)
|
||||||
|
`[%core (trip i.topics) dox at compiled-against]
|
||||||
|
::
|
||||||
|
++ return-item
|
||||||
|
~? >>> debug %return-item
|
||||||
|
^- (unit item)
|
||||||
|
?- sut
|
||||||
|
%noun ~
|
||||||
|
%void ~
|
||||||
|
[%atom *] ~
|
||||||
|
[%cell *] return-cell
|
||||||
|
[%core *] return-core
|
||||||
|
[%face *] return-face
|
||||||
|
[%fork *] return-fork
|
||||||
|
[%hint *] return-hint
|
||||||
|
[%hold *] return-item:this(sut (~(play ut p.sut) q.sut))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ return-hint-core
|
||||||
|
~? >>> debug %return-hint-core
|
||||||
|
^- (unit item)
|
||||||
|
?> &(?=([%hint *] sut) ?=([%core *] q.sut))
|
||||||
|
(apply-hint return-core:this(sut q.sut))
|
||||||
|
::
|
||||||
|
++ return-hint-face
|
||||||
|
~? >>> debug %return-hint-face
|
||||||
|
^- (unit item)
|
||||||
|
?> &(?=([%hint *] sut) ?=([%face *] q.sut))
|
||||||
|
(apply-hint return-face:this(sut q.sut))
|
||||||
|
::
|
||||||
|
++ apply-hint
|
||||||
|
~? >> debug %apply-hint
|
||||||
|
|= uit=(unit item)
|
||||||
|
^- (unit item)
|
||||||
|
?~ uit ~
|
||||||
|
?> &(?=([%hint *] sut) ?=([%help *] q.p.sut))
|
||||||
|
?+ u.uit ~
|
||||||
|
?([%core *] [%face *]) (some u.uit(docs `crib.p.q.p.sut))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+| %misc
|
||||||
|
++ arm-hoon
|
||||||
|
^- hoon
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
(^arm-hoon i.topics sut)
|
||||||
|
::
|
||||||
|
++ arm-type
|
||||||
|
^- type
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
(^arm-type i.topics sut)
|
||||||
|
--
|
||||||
|
::
|
||||||
|
:: +arm-hoon: looks for an arm in a core type and returns its hoon
|
||||||
|
++ arm-hoon
|
||||||
|
|= [nom=term sut=type]
|
||||||
|
^- hoon
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
=/ tomes=(list [p=term q=tome]) ~(tap by q.r.q.sut)
|
||||||
|
|-
|
||||||
|
?~ tomes !!
|
||||||
|
=+ gen=(~(get by q.q.i.tomes) nom)
|
||||||
|
?~ gen
|
||||||
|
$(tomes t.tomes)
|
||||||
|
u.gen
|
||||||
|
::
|
||||||
|
:: +arm-type: looks for an arm in a core type and returns its type
|
||||||
|
++ arm-type
|
||||||
|
|= [nom=term sut=type]
|
||||||
|
^- type
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
(~(play ut sut) (arm-hoon nom sut))
|
||||||
|
::
|
||||||
|
:: +hint-doc: returns docs if type is %help $hint w/ matching cuff
|
||||||
|
++ hint-doc
|
||||||
|
|= [=cuff sut=type]
|
||||||
|
^- what
|
||||||
|
?. &(?=([%hint *] sut) ?=([%help *] q.p.sut) =(cuff cuff.p.q.p.sut))
|
||||||
|
~
|
||||||
|
`crib.p.q.p.sut
|
||||||
|
::
|
||||||
|
:: +arm-doc: returns arm doc of an arm
|
||||||
|
::
|
||||||
|
:: we just check if the $cuff is from a ++ or +$ arm but this will
|
||||||
|
:: probably need to be revisited once more sophisticated cuffs are used
|
||||||
|
++ arm-doc
|
||||||
|
|= [nom=term sut=type]
|
||||||
|
^- what
|
||||||
|
?~ (hint-doc [%funk nom]~ sut)
|
||||||
|
(hint-doc [%plan nom]~ sut)
|
||||||
|
(hint-doc [%funk nom]~ sut)
|
||||||
|
::
|
||||||
|
:: +prod-doc: wrapper for +hint-doc with empty cuff
|
||||||
|
++ prod-doc
|
||||||
|
|= sut=type
|
||||||
|
^- what
|
||||||
|
(hint-doc ~ sut)
|
||||||
|
::
|
||||||
|
:: +buc-doc: checks if type is core and returns docs on $ arm if it exists
|
||||||
|
++ buc-doc
|
||||||
|
|= sut=type
|
||||||
|
^- what
|
||||||
|
?. ?=([%core *] sut)
|
||||||
|
~
|
||||||
|
?~ (find [%$]~ (sloe sut))
|
||||||
|
~
|
||||||
|
=/ sat=type (arm-type %$ sut)
|
||||||
|
?~ (arm-doc %$ sat)
|
||||||
|
(prod-doc sat)
|
||||||
|
(arm-doc %$ sat)
|
||||||
|
::
|
||||||
|
:: +arm-docs: grabs the docs for an arm.
|
||||||
|
::
|
||||||
|
:: there are three possible places with relevant docs for an arm:
|
||||||
|
:: docs for the arm itself, docs for the product of the arm, and
|
||||||
|
:: if the arm builds a core, docs for the default arm of that core.
|
||||||
|
::
|
||||||
|
:: .adoc: docs written above the the arm
|
||||||
|
:: .pdoc: docs for the product of the arm
|
||||||
|
:: .cdoc: docs for the default arm of the core produced by the arm
|
||||||
|
++ arm-docs
|
||||||
|
|= [nom=term sut=type]
|
||||||
|
^- [what what what]
|
||||||
|
?> ?=([%core *] sut)
|
||||||
|
=/ sat=type (~(play ut sut) (arm-hoon nom sut))
|
||||||
|
=/ adoc=what (arm-doc nom sat)
|
||||||
|
=/ pdoc=what
|
||||||
|
?~ adoc
|
||||||
|
(prod-doc sat)
|
||||||
|
?> ?=([%hint *] sat)
|
||||||
|
(prod-doc q.sat)
|
||||||
|
=/ cdoc=what
|
||||||
|
?~ adoc
|
||||||
|
?~ pdoc
|
||||||
|
(buc-doc sat)
|
||||||
|
?> ?=([%hint *] sat)
|
||||||
|
(buc-doc q.sat)
|
||||||
|
?~ pdoc
|
||||||
|
?> ?=([%hint *] sat)
|
||||||
|
(buc-doc q.sat)
|
||||||
|
?> &(?=([%hint *] sat) ?=([%hint *] q.sat))
|
||||||
|
(buc-doc q.q.sat)
|
||||||
|
[adoc pdoc cdoc]
|
||||||
|
::
|
||||||
|
:: +arm-and-chapter-overviews: returns an overview of a core's contents
|
||||||
|
::
|
||||||
|
:: returns an overview for arms which are part of unnamed chapters, and
|
||||||
|
:: an overview of the named chapters
|
||||||
|
::
|
||||||
|
++ arm-and-chapter-overviews
|
||||||
|
|= =item
|
||||||
|
^- [overview overview]
|
||||||
|
?> &(?=([%core *] item) ?=([%core *] sut.item))
|
||||||
|
=| [adocs=overview cdocs=overview]
|
||||||
|
=/ tomes ~(tap by q.r.q.sut.item)
|
||||||
|
|-
|
||||||
|
?~ tomes
|
||||||
|
[(sort-overview adocs) (sort-overview cdocs)]
|
||||||
|
?~ p.i.tomes
|
||||||
|
:: chapter has no name. add documentation for its arms to arm-docs
|
||||||
|
=. adocs (weld adocs (tome-as-overview q.i.tomes sut.item))
|
||||||
|
$(tomes t.tomes)
|
||||||
|
:: chapter has a name. add to list of chapters
|
||||||
|
=. cdocs
|
||||||
|
%+ weld cdocs
|
||||||
|
^- overview
|
||||||
|
[%item :(weld "^" name.item "|" (trip -.i.tomes)) p.q.i.tomes]~
|
||||||
|
$(tomes t.tomes)
|
||||||
|
::
|
||||||
|
:: +arms-in-chapter: returns an overview of the arms in a specific chapter
|
||||||
|
++ arms-in-chapter
|
||||||
|
|= [sut=type tom=tome]
|
||||||
|
^- overview
|
||||||
|
(sort-overview (tome-as-overview tom sut))
|
||||||
|
::
|
||||||
|
:: +sort-overview: sort items in an overview in alphabetical order
|
||||||
|
++ sort-overview
|
||||||
|
|= ovr=overview
|
||||||
|
^- overview
|
||||||
|
%+ sort ovr
|
||||||
|
|= [lhs=overview-item rhs=overview-item]
|
||||||
|
(aor (get-overview-name lhs) (get-overview-name rhs))
|
||||||
|
::
|
||||||
|
:: +get-overview-name: returns the name of an overview
|
||||||
|
++ get-overview-name
|
||||||
|
|= ovr=overview-item
|
||||||
|
?- ovr
|
||||||
|
[%header *] ""
|
||||||
|
[%item *] name.ovr
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +tome-as-overview: translate a tome into an overview
|
||||||
|
++ tome-as-overview
|
||||||
|
|= [tom=tome sut=type]
|
||||||
|
^- overview
|
||||||
|
%+ turn ~(tap by q.tom)
|
||||||
|
|= ar=(pair term hoon)
|
||||||
|
:* %item
|
||||||
|
::TODO make this distinguish between ++ and +$ arms
|
||||||
|
(weld "+" (trip p.ar))
|
||||||
|
=/ adoc (arm-doc p.ar (~(play ut sut) q.ar))
|
||||||
|
=/ pdoc (prod-doc (~(play ut sut) q.ar))
|
||||||
|
?~ adoc
|
||||||
|
pdoc
|
||||||
|
adoc
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +item-as-overview: changes an item into an overview
|
||||||
|
++ item-as-overview
|
||||||
|
|= uit=(unit item)
|
||||||
|
~? >> debug %item-as-overview
|
||||||
|
^- overview
|
||||||
|
?~ uit ~
|
||||||
|
=+ itm=(need uit)
|
||||||
|
?- itm
|
||||||
|
[%view *] items.itm
|
||||||
|
::
|
||||||
|
[%core *]
|
||||||
|
?~ name.itm
|
||||||
|
(item-as-overview children.itm)
|
||||||
|
:- [%item (weld "^" name.itm) docs.itm]
|
||||||
|
(item-as-overview children.itm)
|
||||||
|
::
|
||||||
|
[%arm *]
|
||||||
|
:_ ~
|
||||||
|
::TODO make this distinguish between ++ and +$ arms
|
||||||
|
:* %item (weld "+" name.itm)
|
||||||
|
?~ adoc.itm
|
||||||
|
?~ pdoc.itm
|
||||||
|
cdoc.itm
|
||||||
|
pdoc.itm
|
||||||
|
adoc.itm
|
||||||
|
==
|
||||||
|
::
|
||||||
|
[%chapter *]
|
||||||
|
[%item (weld "|" name.itm) docs.itm]~
|
||||||
|
::
|
||||||
|
[%face *]
|
||||||
|
?~ name.itm
|
||||||
|
~
|
||||||
|
[%item (weld "." name.itm) docs.itm]~
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +join-items: combines two (unit items) together
|
||||||
|
++ join-items
|
||||||
|
|= [lhs=(unit item) rhs=(unit item)]
|
||||||
|
^- (unit item)
|
||||||
|
?~ lhs rhs
|
||||||
|
?~ rhs lhs
|
||||||
|
`[%view (weld (item-as-overview lhs) (item-as-overview rhs))]
|
||||||
|
::
|
||||||
|
:: contains arms using for printing doccords items
|
||||||
|
+| %printing
|
||||||
|
:: +print-item: prints a doccords item
|
||||||
|
++ print-item
|
||||||
|
|= =item
|
||||||
|
~? >> debug %print-item
|
||||||
|
^- (list sole-effect)
|
||||||
|
?- item
|
||||||
|
[%view *] (print-overview item *(pair styl styl))
|
||||||
|
[%core *] (print-core item)
|
||||||
|
[%arm *] (print-arm item)
|
||||||
|
[%chapter *] (print-chapter item)
|
||||||
|
[%face *] (print-face item)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +print-core: renders documentation for a full core
|
||||||
|
++ print-core
|
||||||
|
|= =item
|
||||||
|
^- (list sole-effect)
|
||||||
|
?> ?=([%core *] item)
|
||||||
|
=+ [arms chapters]=(arm-and-chapter-overviews item)
|
||||||
|
=/ styles=(pair styl styl) [[`%br ~ `%b] [`%br ~ `%m]]
|
||||||
|
;: weld
|
||||||
|
(print-header (weld "^" name.item) docs.item)
|
||||||
|
::
|
||||||
|
[%txt ""]~
|
||||||
|
::
|
||||||
|
(print-signature ~(duck easy-print sut.item))
|
||||||
|
::
|
||||||
|
[%txt ""]~
|
||||||
|
::
|
||||||
|
?~ arms
|
||||||
|
~
|
||||||
|
(print-overview [%view [%header `['arms:' ~] arms]~] styles)
|
||||||
|
::
|
||||||
|
?~ chapters
|
||||||
|
~
|
||||||
|
(print-overview [%view [%header `['chapters:' ~] chapters]~] styles)
|
||||||
|
::
|
||||||
|
?~ children.item
|
||||||
|
~
|
||||||
|
=/ child ?: ?=([%core *] u.children.item)
|
||||||
|
u.children.item(children ~)
|
||||||
|
?: ?=([%face *] u.children.item)
|
||||||
|
u.children.item(children ~)
|
||||||
|
u.children.item
|
||||||
|
=+ compiled=(item-as-overview `child)
|
||||||
|
?~ compiled
|
||||||
|
~
|
||||||
|
(print-overview [%view [%header `['compiled against: ' ~] [i.compiled]~]~] styles)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +print-chapter: renders documentation for a single chapter
|
||||||
|
++ print-chapter
|
||||||
|
|= =item
|
||||||
|
^- (list sole-effect)
|
||||||
|
?> ?=([%chapter *] item)
|
||||||
|
~? > debug %print-chapter
|
||||||
|
=/ styles=(pair styl styl) [[`%br ~ `%b] [`%br ~ `%m]]
|
||||||
|
;: weld
|
||||||
|
(print-header (weld "|" name.item) docs.item)
|
||||||
|
::
|
||||||
|
=+ arms=(arms-in-chapter sut.item tom.item)
|
||||||
|
?~ arms
|
||||||
|
~
|
||||||
|
(print-overview [%view [%header `['arms:' ~] arms]~] styles)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +print-signature: turns product of duck:easy-print into a (list sole-effect)
|
||||||
|
++ print-signature
|
||||||
|
|= =tank
|
||||||
|
^- (list sole-effect)
|
||||||
|
=/ tan (wash [3 80] tank)
|
||||||
|
?. (gte (lent tan) 3)
|
||||||
|
(turn tan |=(a=tape [%txt a]))
|
||||||
|
%+ weld
|
||||||
|
(turn (scag 3 tan) |=(a=tape [%txt a]))
|
||||||
|
(styled [[`%br ~ `%g] ' ...']~)
|
||||||
|
::
|
||||||
|
:: +print-arm: renders documentation for a single arm in a core
|
||||||
|
++ print-arm
|
||||||
|
|= =item
|
||||||
|
^- (list sole-effect)
|
||||||
|
?> ?=([%arm *] item)
|
||||||
|
~? >> debug %print-arm
|
||||||
|
;: weld
|
||||||
|
(print-header (weld "+" name.item) adoc.item)
|
||||||
|
[%txt ""]~
|
||||||
|
::
|
||||||
|
(print-signature ~(duck easy-print (~(play ut sut.item) gen.item)))
|
||||||
|
::
|
||||||
|
[%txt ""]~
|
||||||
|
::
|
||||||
|
?~ pdoc.item
|
||||||
|
*(list sole-effect)
|
||||||
|
%- zing :~ (styled [[`%br ~ `%b] 'product:']~)
|
||||||
|
(print-header "" pdoc.item)
|
||||||
|
[%txt ""]~
|
||||||
|
==
|
||||||
|
::
|
||||||
|
?~ cdoc.item
|
||||||
|
*(list sole-effect)
|
||||||
|
%- zing :~ (styled [[`%br ~ `%b] '$:']~)
|
||||||
|
(print-header "" cdoc.item)
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +print-face: renders documentation for a face
|
||||||
|
++ print-face
|
||||||
|
|= =item
|
||||||
|
^- (list sole-effect)
|
||||||
|
?> ?=([%face *] item)
|
||||||
|
~? >> debug %print-face
|
||||||
|
;: weld
|
||||||
|
(print-header (weld "." name.item) docs.item)
|
||||||
|
[%txt ""]~
|
||||||
|
::
|
||||||
|
?~ children.item
|
||||||
|
~
|
||||||
|
(print-item u.children.item)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +print-header: prints name and docs only
|
||||||
|
++ print-header
|
||||||
|
|= [name=tape doc=what]
|
||||||
|
^- (list sole-effect)
|
||||||
|
~? >> debug %print-header
|
||||||
|
;: weld
|
||||||
|
(styled [[`%br ~ `%g] (crip name)]~)
|
||||||
|
?~ doc *(list sole-effect)
|
||||||
|
:: (styled [[`%br ~ `%r] '(undocumented)']~)
|
||||||
|
:~ :- %tan
|
||||||
|
%- flop
|
||||||
|
;: weld
|
||||||
|
[%leaf "{(trip p.u.doc)}"]~
|
||||||
|
(print-sections q.u.doc)
|
||||||
|
== ==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +print-overview: prints summaries of several items
|
||||||
|
::
|
||||||
|
:: the (pair styl styl) provides styles for each generation of child items
|
||||||
|
++ print-overview
|
||||||
|
|= [view=item styles=(pair styl styl)]
|
||||||
|
?> ?=([%view *] view)
|
||||||
|
~? >> debug %print-overview
|
||||||
|
=| out=(list sole-effect)
|
||||||
|
|- ^- (list sole-effect)
|
||||||
|
?~ items.view out
|
||||||
|
=/ oitem i.items.view
|
||||||
|
?- oitem
|
||||||
|
[%header *]
|
||||||
|
%= $
|
||||||
|
items.view t.items.view
|
||||||
|
out ;: weld
|
||||||
|
out
|
||||||
|
?~ doc.oitem ~
|
||||||
|
(styled [p.styles (crip "{(trip p.u.doc.oitem)}")]~)
|
||||||
|
^$(view [%view children.oitem])
|
||||||
|
== ==
|
||||||
|
::
|
||||||
|
[%item *]
|
||||||
|
%= $
|
||||||
|
items.view t.items.view
|
||||||
|
out ;: weld
|
||||||
|
out
|
||||||
|
(styled [q.styles (crip name.oitem)]~)
|
||||||
|
?~ doc.oitem
|
||||||
|
%- styled
|
||||||
|
:~ [[`%br ~ `%r] '(undocumented)']
|
||||||
|
[[~ ~ ~] '']
|
||||||
|
==
|
||||||
|
^- (list sole-effect)
|
||||||
|
[%tan [[%leaf ""] [%leaf "{(trip p.u.doc.oitem)}"] ~]]~
|
||||||
|
== ==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: +print-sections: renders a list of sections as tang
|
||||||
|
::
|
||||||
|
:: prints the longform documentation
|
||||||
|
++ print-sections
|
||||||
|
|= sections=(list sect)
|
||||||
|
^- tang
|
||||||
|
=| out=tang
|
||||||
|
|-
|
||||||
|
?~ sections out
|
||||||
|
=. out
|
||||||
|
;: weld
|
||||||
|
out
|
||||||
|
`tang`[%leaf ""]~
|
||||||
|
(print-section i.sections)
|
||||||
|
==
|
||||||
|
$(sections t.sections)
|
||||||
|
::
|
||||||
|
:: +print-section: renders a sect as a tang
|
||||||
|
++ print-section
|
||||||
|
|= section=sect
|
||||||
|
^- tang
|
||||||
|
%+ turn section
|
||||||
|
|= =pica
|
||||||
|
^- tank
|
||||||
|
?: p.pica
|
||||||
|
[%leaf (trip q.pica)]
|
||||||
|
[%leaf " {(trip q.pica)}"]
|
||||||
|
::
|
||||||
|
:: +styled: makes $sole-effects out of $styls and $cords
|
||||||
|
++ styled
|
||||||
|
|= [in=(list (pair styl cord))]
|
||||||
|
^- (list sole-effect)
|
||||||
|
=| out=(list sole-effect)
|
||||||
|
|-
|
||||||
|
?~ in out
|
||||||
|
=/ eff=styx [p.i.in [q.i.in]~]~
|
||||||
|
%= $
|
||||||
|
in t.in
|
||||||
|
out (snoc out [%klr eff])
|
||||||
|
==
|
||||||
|
--
|
@ -1,34 +1,66 @@
|
|||||||
/- *sole
|
/- *sole
|
||||||
/+ sole
|
/+ sole
|
||||||
|%
|
|%
|
||||||
+$ state state-4
|
+$ state state-5
|
||||||
+$ any-state
|
+$ any-state
|
||||||
$~ *state
|
$~ *state
|
||||||
$% state-4
|
$% state-5
|
||||||
|
state-4
|
||||||
state-3
|
state-3
|
||||||
state-2
|
state-2
|
||||||
==
|
==
|
||||||
|
+$ state-5 [%5 pith-5]
|
||||||
+$ state-4 [%4 pith-4]
|
+$ state-4 [%4 pith-4]
|
||||||
+$ state-3 [%3 pith-3]
|
+$ state-3 [%3 pith-3]
|
||||||
+$ state-2 [%2 pith-2]
|
+$ state-2 [%2 pith-2]
|
||||||
::
|
::
|
||||||
|
+$ pith-5
|
||||||
|
$: bin=(map @ source) :: terminals
|
||||||
|
==
|
||||||
|
::
|
||||||
+$ pith-4
|
+$ pith-4
|
||||||
$: eel=(set gill:gall) :: connect to
|
$: eel=(set gill:gall) :: connect to
|
||||||
bin=(map bone source) :: terminals
|
bin=(map bone source-4) :: terminals
|
||||||
== ::
|
== ::
|
||||||
::
|
::
|
||||||
|
+$ source-4
|
||||||
|
$: edg=_80
|
||||||
|
off=@ud
|
||||||
|
kil=kill
|
||||||
|
inx=@ud
|
||||||
|
fug=(map gill:gall (unit target-4))
|
||||||
|
mir=(pair @ud stub)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ target-4
|
||||||
|
$: $= blt
|
||||||
|
%+ pair
|
||||||
|
(unit dill-belt-4)
|
||||||
|
(unit dill-belt-4)
|
||||||
|
ris=(unit search)
|
||||||
|
hit=history
|
||||||
|
pom=sole-prompt
|
||||||
|
inp=sole-command
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ dill-belt-4
|
||||||
|
$% [%ctl p=@c]
|
||||||
|
[%met p=@c]
|
||||||
|
dill-belt:dill
|
||||||
|
==
|
||||||
|
::
|
||||||
++ pith-3 ::
|
++ pith-3 ::
|
||||||
$: eel=(set gill:gall) :: connect to
|
$: eel=(set gill:gall) :: connect to
|
||||||
ray=(map dude:gall desk) ::
|
ray=(map dude:gall desk) ::
|
||||||
fur=(map dude:gall (unit *)) :: servers
|
fur=(map dude:gall (unit *)) :: servers
|
||||||
bin=(map bone source) :: terminals
|
bin=(map bone source-4) :: terminals
|
||||||
== ::
|
== ::
|
||||||
:: ::
|
:: ::
|
||||||
++ pith-2 ::
|
++ pith-2 ::
|
||||||
$: eel=(set gill:gall) :: connect to
|
$: eel=(set gill:gall) :: connect to
|
||||||
ray=(set well:gall) ::
|
ray=(set well:gall) ::
|
||||||
fur=(map dude:gall (unit *)) :: servers
|
fur=(map dude:gall (unit *)) :: servers
|
||||||
bin=(map bone source) :: terminals
|
bin=(map bone source-4) :: terminals
|
||||||
== ::
|
== ::
|
||||||
:: ::
|
:: ::
|
||||||
++ kill :: kill ring
|
++ kill :: kill ring
|
||||||
@ -42,6 +74,7 @@
|
|||||||
off=@ud :: window offset
|
off=@ud :: window offset
|
||||||
kil=kill :: kill buffer
|
kil=kill :: kill buffer
|
||||||
inx=@ud :: ring index
|
inx=@ud :: ring index
|
||||||
|
eel=(set gill:gall) :: connect to
|
||||||
fug=(map gill:gall (unit target)) :: connections
|
fug=(map gill:gall (unit target)) :: connections
|
||||||
mir=(pair @ud stub) :: mirrored terminal
|
mir=(pair @ud stub) :: mirrored terminal
|
||||||
== ::
|
== ::
|
||||||
@ -65,52 +98,74 @@
|
|||||||
pom=sole-prompt :: static prompt
|
pom=sole-prompt :: static prompt
|
||||||
inp=sole-command :: input state
|
inp=sole-command :: input state
|
||||||
== ::
|
== ::
|
||||||
|
::
|
||||||
--
|
--
|
||||||
:: :: ::
|
:: :: ::
|
||||||
:::: :: ::
|
:::: :: ::
|
||||||
:: :: ::
|
:: :: ::
|
||||||
|%
|
|%
|
||||||
++ en-gill :: gill to wire
|
++ en-gill :: gill to wire
|
||||||
|= gyl=gill:gall
|
|= [ses=@tas gyl=gill:gall]
|
||||||
^- wire
|
^- wire
|
||||||
[%drum %phat (scot %p p.gyl) q.gyl ~]
|
[%drum %phat (scot %p p.gyl) q.gyl ?:(=(%$ ses) ~ [ses ~])]
|
||||||
::
|
::
|
||||||
++ de-gill :: gill from wire
|
++ de-gill :: gill from wire
|
||||||
|= way=wire ^- gill:gall
|
|= way=wire
|
||||||
~| way
|
^- [@tas gill:gall]
|
||||||
?>(?=([@ @ *] way) [(slav %p i.way) i.t.way])
|
~| wire=way
|
||||||
|
?> ?=([@ @ ?(~ [@ ~])] way)
|
||||||
|
:- ?~(t.t.way %$ i.t.t.way)
|
||||||
|
[(slav %p i.way) i.t.way]
|
||||||
--
|
--
|
||||||
:: TODO: remove .ost
|
|
||||||
::
|
::
|
||||||
|= [hid=bowl:gall state]
|
|= [hid=bowl:gall state]
|
||||||
=* sat +<+
|
=* sat +<+
|
||||||
=/ ost 0
|
=/ ses=@tas %$
|
||||||
=+ (~(gut by bin) ost *source)
|
=+ (~(gut by bin) ses *source)
|
||||||
=* dev -
|
=* dev -
|
||||||
=| moz=(list card:agent:gall)
|
=| moz=(list card:agent:gall)
|
||||||
=| biz=(list dill-blit:dill)
|
=| biz=(list blit:dill) ::TODO should be per-session
|
||||||
|%
|
|%
|
||||||
++ this .
|
++ this .
|
||||||
|
++ klr klr:format
|
||||||
+$ state ^state :: proxy
|
+$ state ^state :: proxy
|
||||||
+$ any-state ^any-state :: proxy
|
+$ any-state ^any-state :: proxy
|
||||||
++ on-init (poke-link our.hid %dojo)
|
++ on-init (poke-link %$ our.hid %dojo)
|
||||||
|
::
|
||||||
|
++ prep
|
||||||
|
|= s=@tas
|
||||||
|
=. ses s
|
||||||
|
=. dev (~(gut by bin) ses *source)
|
||||||
|
this
|
||||||
|
::
|
||||||
|
++ open
|
||||||
|
%+ cork de-gill
|
||||||
|
|= [s=@tas g=gill:gall]
|
||||||
|
[g (prep s)]
|
||||||
|
::
|
||||||
++ diff-sole-effect-phat :: app event
|
++ diff-sole-effect-phat :: app event
|
||||||
|= [way=wire fec=sole-effect]
|
|= [way=wire fec=sole-effect]
|
||||||
=< se-abet =< se-view
|
=< se-abet
|
||||||
=+ gyl=(de-gill way)
|
=^ gyl this (open way)
|
||||||
?: (se-aint gyl) +>.$
|
?: (se-aint gyl) +>.$
|
||||||
(se-diff gyl fec)
|
(se-diff gyl fec)
|
||||||
::
|
::
|
||||||
++ peer ::
|
++ peer ::
|
||||||
|= pax=path
|
|= pax=path
|
||||||
|
=? this ?=([%dill @ ~] pax)
|
||||||
|
(prep i.t.pax)
|
||||||
~| [%drum-unauthorized our+our.hid src+src.hid] :: ourself
|
~| [%drum-unauthorized our+our.hid src+src.hid] :: ourself
|
||||||
?> (team:title our.hid src.hid) :: or our own moon
|
?> (team:title our.hid src.hid) :: or our own moon
|
||||||
=< se-abet =< se-view
|
=< se-abet
|
||||||
(se-text "[{<src.hid>}, driving {<our.hid>}]")
|
(se-text "[{<src.hid>}, driving {<our.hid>}]")
|
||||||
::
|
::
|
||||||
|
++ poke-dill
|
||||||
|
|= [ses=@tas bet=dill-belt:dill]
|
||||||
|
(poke-dill-belt:(prep ses) bet)
|
||||||
|
::
|
||||||
++ poke-dill-belt :: terminal event
|
++ poke-dill-belt :: terminal event
|
||||||
|= bet=dill-belt:dill
|
|= bet=dill-belt:dill
|
||||||
=< se-abet =< se-view
|
=< se-abet
|
||||||
(se-belt bet)
|
(se-belt bet)
|
||||||
::
|
::
|
||||||
++ poke-dill-blit :: terminal output
|
++ poke-dill-blit :: terminal output
|
||||||
@ -118,29 +173,29 @@
|
|||||||
se-abet:(se-blit-sys bit)
|
se-abet:(se-blit-sys bit)
|
||||||
::
|
::
|
||||||
++ poke-link :: connect app
|
++ poke-link :: connect app
|
||||||
|= gyl=gill:gall
|
|= [ses=@tas gyl=gill:gall]
|
||||||
=< se-abet =< se-view
|
=< se-abet
|
||||||
(se-link gyl)
|
(se-link:(prep ses) gyl)
|
||||||
::
|
::
|
||||||
++ poke-unlink :: disconnect app
|
++ poke-unlink :: disconnect app
|
||||||
|= gyl=gill:gall
|
|= [ses=@ta gyl=gill:gall]
|
||||||
=< se-abet =< se-view
|
=< se-abet
|
||||||
(se-drop:(se-pull gyl) & gyl)
|
(se-drop:(se-pull:(prep ses) gyl) & gyl)
|
||||||
::
|
::
|
||||||
++ poke-exit :: shutdown
|
++ poke-exit :: shutdown
|
||||||
|= ~
|
|= ~
|
||||||
se-abet:(se-blit-sys `dill-blit:dill`[%qit ~])
|
se-abet:(se-blit-sys `dill-blit:dill`[%qit ~])
|
||||||
::
|
::
|
||||||
++ poke-put :: write file
|
++ poke-put :: write file
|
||||||
|= [pax=path txt=@]
|
|= [pax=path arg=$@(@ [@tas @])]
|
||||||
|
=^ txt +> ?@(arg [arg +>] [+.arg (prep -.arg)])
|
||||||
se-abet:(se-blit-sys [%sav pax txt]) ::
|
se-abet:(se-blit-sys [%sav pax txt]) ::
|
||||||
::
|
::
|
||||||
++ poke
|
++ poke
|
||||||
|= [=mark =vase]
|
|= [=mark =vase]
|
||||||
?> =(our src):hid
|
?> =(our src):hid
|
||||||
?+ mark ~|([%poke-drum-bad-mark mark] !!)
|
?+ mark ~|([%poke-drum-bad-mark mark] !!)
|
||||||
%drum-dill-belt =;(f (f !<(_+<.f vase)) poke-dill-belt)
|
%dill-poke =;(f (f !<(_+<.f vase)) poke-dill)
|
||||||
%drum-dill-blit =;(f (f !<(_+<.f vase)) poke-dill-blit)
|
|
||||||
%drum-exit =;(f (f !<(_+<.f vase)) poke-exit)
|
%drum-exit =;(f (f !<(_+<.f vase)) poke-exit)
|
||||||
%drum-link =;(f (f !<(_+<.f vase)) poke-link)
|
%drum-link =;(f (f !<(_+<.f vase)) poke-link)
|
||||||
%drum-put =;(f (f !<(_+<.f vase)) poke-put)
|
%drum-put =;(f (f !<(_+<.f vase)) poke-put)
|
||||||
@ -149,19 +204,40 @@
|
|||||||
::
|
::
|
||||||
++ on-load
|
++ on-load
|
||||||
|= [hood-version=@ud old=any-state]
|
|= [hood-version=@ud old=any-state]
|
||||||
=< se-abet =< se-view
|
=< se-abet
|
||||||
=? old ?=(%2 -.old) [%4 [eel bin]:old]
|
=? old ?=(%2 -.old) [%4 [eel bin]:old]
|
||||||
=? old ?=(%3 -.old) [%4 [eel bin]:old]
|
=? old ?=(%3 -.old) [%4 [eel bin]:old]
|
||||||
|
=? old ?=(%4 -.old)
|
||||||
|
|^ 5+(~(run by bin.old) source-4-to-5)
|
||||||
|
++ source-4-to-5
|
||||||
|
|= source-4
|
||||||
|
^- source
|
||||||
|
=; fug [edg off kil inx eel.old fug mir]
|
||||||
|
(~(run by fug) |=(t=(unit target-4) (bind t target-4-to-5)))
|
||||||
|
::
|
||||||
|
++ target-4-to-5
|
||||||
|
|= t=target-4
|
||||||
|
^- target
|
||||||
|
:_ +.t
|
||||||
|
:- (bind p.blt.t belt-4-to-5)
|
||||||
|
(bind q.blt.t belt-4-to-5)
|
||||||
|
::
|
||||||
|
++ belt-4-to-5
|
||||||
|
|= b=dill-belt-4
|
||||||
|
^- dill-belt:dill
|
||||||
|
?. ?=(?(%ctl %met) -.b) b
|
||||||
|
[%mod -.b p.b]
|
||||||
|
--
|
||||||
::
|
::
|
||||||
?> ?=(%4 -.old)
|
?> ?=(%5 -.old)
|
||||||
=. sat old
|
=. sat old
|
||||||
=. dev (~(gut by bin) ost *source)
|
=. dev (~(gut by bin) ses *source)
|
||||||
this
|
this
|
||||||
::
|
::
|
||||||
++ reap-phat :: ack connect
|
++ reap-phat :: ack connect
|
||||||
|= [way=wire saw=(unit tang)]
|
|= [way=wire saw=(unit tang)]
|
||||||
=< se-abet =< se-view
|
=< se-abet
|
||||||
=+ gyl=(de-gill way)
|
=^ gyl this (open way)
|
||||||
?~ saw
|
?~ saw
|
||||||
(se-join gyl)
|
(se-join gyl)
|
||||||
:: Don't print stack trace because we probably just crashed to
|
:: Don't print stack trace because we probably just crashed to
|
||||||
@ -171,9 +247,9 @@
|
|||||||
::
|
::
|
||||||
++ take-coup-phat :: ack poke
|
++ take-coup-phat :: ack poke
|
||||||
|= [way=wire saw=(unit tang)]
|
|= [way=wire saw=(unit tang)]
|
||||||
=< se-abet =< se-view
|
=< se-abet
|
||||||
?~ saw +>
|
?~ saw +>
|
||||||
=+ gyl=(de-gill way)
|
=^ gyl this (open way)
|
||||||
?: (se-aint gyl) +>.$
|
?: (se-aint gyl) +>.$
|
||||||
%- se-dump:(se-drop:(se-pull gyl) & gyl)
|
%- se-dump:(se-drop:(se-pull gyl) & gyl)
|
||||||
:_ u.saw
|
:_ u.saw
|
||||||
@ -196,8 +272,8 @@
|
|||||||
::
|
::
|
||||||
++ quit-phat ::
|
++ quit-phat ::
|
||||||
|= way=wire
|
|= way=wire
|
||||||
=< se-abet =< se-view
|
=< se-abet
|
||||||
=+ gyl=(de-gill way)
|
=^ gyl this (open way)
|
||||||
~& [%drum-quit src.hid gyl]
|
~& [%drum-quit src.hid gyl]
|
||||||
(se-drop %| gyl)
|
(se-drop %| gyl)
|
||||||
:: :: ::
|
:: :: ::
|
||||||
@ -205,13 +281,18 @@
|
|||||||
:: :: ::
|
:: :: ::
|
||||||
++ se-abet :: resolve
|
++ se-abet :: resolve
|
||||||
^- (quip card:agent:gall state)
|
^- (quip card:agent:gall state)
|
||||||
=. . se-subze:se-adze
|
=. . se-view:se-subze:se-adze
|
||||||
:_ sat(bin (~(put by bin) ost dev))
|
:_ sat(bin (~(put by bin) ses dev))
|
||||||
^- (list card:agent:gall)
|
^- (list card:agent:gall)
|
||||||
?~ biz (flop moz)
|
?~ biz (flop moz)
|
||||||
:_ (flop moz)
|
:_ (flop moz)
|
||||||
=/ =dill-blit:dill ?~(t.biz i.biz [%mor (flop biz)])
|
=/ =blit:dill ?~(t.biz i.biz [%mor (flop biz)])
|
||||||
[%give %fact ~[/drum] %dill-blit !>(dill-blit)]
|
::TODO remove /drum after dill cleans up
|
||||||
|
::TODO but once we remove it, the empty trailing segment of
|
||||||
|
:: /dill/[ses] would prevent outsiders from subscribing
|
||||||
|
:: to the default session...
|
||||||
|
=/ to=(list path) [/dill/[ses] ?~(ses ~[/drum] ~)]
|
||||||
|
[%give %fact to %dill-blit !>(blit)]
|
||||||
::
|
::
|
||||||
++ se-adze :: update connections
|
++ se-adze :: update connections
|
||||||
^+ .
|
^+ .
|
||||||
@ -230,14 +311,14 @@
|
|||||||
(se-peer gil)
|
(se-peer gil)
|
||||||
::
|
::
|
||||||
++ se-subze :: downdate connections
|
++ se-subze :: downdate connections
|
||||||
=< .(dev (~(got by bin) ost))
|
=< .(dev (~(got by bin) ses))
|
||||||
=. bin (~(put by bin) ost dev)
|
=. bin (~(put by bin) ses dev)
|
||||||
^+ .
|
^+ .
|
||||||
%- ~(rep by bin)
|
%- ~(rep by bin)
|
||||||
=< .(con +>)
|
=< .(con +>)
|
||||||
|: $:,[[ost=bone dev=source] con=_.] ^+ con
|
|: $:,[[ses=@tas dev=source] con=_.] ^+ con
|
||||||
=+ xeno=se-subze-local:%_(con ost ost, dev dev)
|
=+ xeno=se-subze-local:%_(con ses ses, dev dev)
|
||||||
xeno(ost ost.con, dev dev.con, bin (~(put by bin) ost dev.xeno))
|
xeno(ses ses.con, dev dev.con, bin (~(put by bin.xeno) ses dev.xeno))
|
||||||
::
|
::
|
||||||
++ se-subze-local
|
++ se-subze-local
|
||||||
^+ .
|
^+ .
|
||||||
@ -252,7 +333,7 @@
|
|||||||
++ se-aint :: ignore result
|
++ se-aint :: ignore result
|
||||||
|= gyl=gill:gall
|
|= gyl=gill:gall
|
||||||
^- ?
|
^- ?
|
||||||
?. (~(has by bin) ost) &
|
?. (~(has by bin) ses) &
|
||||||
=+ gyr=(~(get by fug) gyl)
|
=+ gyr=(~(get by fug) gyl)
|
||||||
|(?=(~ gyr) ?=(~ u.gyr))
|
|(?=(~ gyr) ?=(~ u.gyr))
|
||||||
::
|
::
|
||||||
@ -290,7 +371,7 @@
|
|||||||
[%cru *] (se-dump:(se-text (trip p.bet)) q.bet)
|
[%cru *] (se-dump:(se-text (trip p.bet)) q.bet)
|
||||||
[%hey *] +>(mir [0 ~]) :: refresh
|
[%hey *] +>(mir [0 ~]) :: refresh
|
||||||
[%rez *] +>(edg (dec p.bet)) :: resize window
|
[%rez *] +>(edg (dec p.bet)) :: resize window
|
||||||
[%yow *] ~&([%no-yow -.bet] +>)
|
[%yow *] (se-link p.bet)
|
||||||
==
|
==
|
||||||
=+ gul=se-agon
|
=+ gul=se-agon
|
||||||
?: |(?=(~ gul) (se-aint u.gul))
|
?: |(?=(~ gul) (se-aint u.gul))
|
||||||
@ -341,6 +422,21 @@
|
|||||||
leaf+(weld (scag (sub edg 3) tape) "...")
|
leaf+(weld (scag (sub edg 3) tape) "...")
|
||||||
leaf+tape
|
leaf+tape
|
||||||
::
|
::
|
||||||
|
++ se-blin :: print and newline
|
||||||
|
|= $= lin
|
||||||
|
$~ [%put ~]
|
||||||
|
$>(?(%put %klr) dill-blit:dill)
|
||||||
|
^+ +>
|
||||||
|
:: newline means we need to redraw the prompt,
|
||||||
|
:: so update the prompt mirror accordingly.
|
||||||
|
::
|
||||||
|
=. mir [0 ~]
|
||||||
|
::TODO doing hops and wyps conditionally based on the mirror state seems
|
||||||
|
:: better, but doesn't cover edge cases. results in dojo's ">=" being
|
||||||
|
:: rendered alongside the prompt in scrollback, for example.
|
||||||
|
:: figure out a way to make that work!
|
||||||
|
(se-blit %mor [%hop 0] [%wyp ~] lin [%nel ~] ~)
|
||||||
|
::
|
||||||
++ se-dump :: print tanks
|
++ se-dump :: print tanks
|
||||||
|= tac=(list tank)
|
|= tac=(list tank)
|
||||||
^+ +>
|
^+ +>
|
||||||
@ -351,7 +447,7 @@
|
|||||||
?. ((sane %t) (crip i.wol)) :: XX upstream validation
|
?. ((sane %t) (crip i.wol)) :: XX upstream validation
|
||||||
~& bad-text+<`*`i.wol>
|
~& bad-text+<`*`i.wol>
|
||||||
$(wol t.wol)
|
$(wol t.wol)
|
||||||
$(wol t.wol, +>.^$ (se-blit %out (tuba i.wol)))
|
$(wol t.wol, +>.^$ (se-blin %put (tuba i.wol)))
|
||||||
::
|
::
|
||||||
++ se-join :: confirm connection
|
++ se-join :: confirm connection
|
||||||
|= gyl=gill:gall
|
|= gyl=gill:gall
|
||||||
@ -379,20 +475,21 @@
|
|||||||
+>(eel (~(put in eel) gyl))
|
+>(eel (~(put in eel) gyl))
|
||||||
::
|
::
|
||||||
++ se-blit :: give output
|
++ se-blit :: give output
|
||||||
|= bil=dill-blit:dill
|
|= bil=blit:dill
|
||||||
+>(biz [bil biz])
|
+>(biz [bil biz])
|
||||||
::
|
::
|
||||||
++ se-blit-sys :: output to system
|
++ se-blit-sys :: output to system
|
||||||
|= bil=dill-blit:dill ^+ +>
|
|= bil=dill-blit:dill ^+ +>
|
||||||
(se-emit %give %fact ~[/drum] %dill-blit !>(bil))
|
::TODO remove /drum after dill cleans up
|
||||||
|
(se-emit %give %fact ~[/drum /dill/[ses]] %dill-blit !>(bil))
|
||||||
::
|
::
|
||||||
++ se-show :: show buffer, raw
|
++ se-show :: show buffer, raw
|
||||||
|= lin=(pair @ud stub)
|
|= lin=(pair @ud stub)
|
||||||
^+ +>
|
^+ +>
|
||||||
?: =(mir lin) +>
|
?: =(mir lin) +>
|
||||||
=. +> ?:(=(p.mir p.lin) +> (se-blit %hop p.lin))
|
%- se-blit(mir lin)
|
||||||
=. +> ?:(=(q.mir q.lin) +> (se-blit %pom q.lin))
|
?: =(q.mir q.lin) [%hop p.lin]
|
||||||
+>(mir lin)
|
mor+[[%hop 0] [%wyp ~] [%klr q.lin] [%hop p.lin] ~]
|
||||||
::
|
::
|
||||||
++ se-just :: adjusted buffer
|
++ se-just :: adjusted buffer
|
||||||
|= [pom=stub lin=(pair @ud (list @c))]
|
|= [pom=stub lin=(pair @ud (list @c))]
|
||||||
@ -430,22 +527,22 @@
|
|||||||
?. ((sane %t) (crip txt)) :: XX upstream validation
|
?. ((sane %t) (crip txt)) :: XX upstream validation
|
||||||
~& bad-text+<`*`txt>
|
~& bad-text+<`*`txt>
|
||||||
+>
|
+>
|
||||||
(se-blit %out (tuba txt))
|
(se-blin %put (tuba txt))
|
||||||
::
|
::
|
||||||
++ se-poke :: send a poke
|
++ se-poke :: send a poke
|
||||||
|= [gyl=gill:gall par=cage]
|
|= [gyl=gill:gall par=cage]
|
||||||
(se-emit %pass (en-gill gyl) %agent gyl %poke par)
|
(se-emit %pass (en-gill ses gyl) %agent gyl %poke par)
|
||||||
::
|
::
|
||||||
++ se-peer :: send a peer
|
++ se-peer :: send a peer
|
||||||
|= gyl=gill:gall
|
|= gyl=gill:gall
|
||||||
~> %slog.0^leaf/"drum: link {<[p q]:gyl>}"
|
~> %slog.0^leaf/"drum: link {<[p q]:gyl>}"
|
||||||
=/ =path /sole/(cat 3 'drum_' (scot %p our.hid))
|
=/ =path (id-to-path:sole our.hid ses)
|
||||||
%- se-emit(fug (~(put by fug) gyl ~))
|
%- se-emit(fug (~(put by fug) gyl ~))
|
||||||
[%pass (en-gill gyl) %agent gyl %watch path]
|
[%pass (en-gill ses gyl) %agent gyl %watch path]
|
||||||
::
|
::
|
||||||
++ se-pull :: cancel subscription
|
++ se-pull :: cancel subscription
|
||||||
|= gyl=gill:gall
|
|= gyl=gill:gall
|
||||||
(se-emit %pass (en-gill gyl) %agent gyl %leave ~)
|
(se-emit %pass (en-gill ses gyl) %agent gyl %leave ~)
|
||||||
::
|
::
|
||||||
++ se-tame :: switch connection
|
++ se-tame :: switch connection
|
||||||
|= gyl=gill:gall
|
|= gyl=gill:gall
|
||||||
@ -470,7 +567,7 @@
|
|||||||
^+ +>
|
^+ +>
|
||||||
(ta-poke %sole-action !>(act))
|
(ta-poke %sole-action !>(act))
|
||||||
::
|
::
|
||||||
++ ta-id (cat 3 'drum_' (scot %p our.hid)) :: per-ship duct id
|
++ ta-id [our.hid ses] :: per-ship-session id
|
||||||
::
|
::
|
||||||
++ ta-aro :: hear arrow
|
++ ta-aro :: hear arrow
|
||||||
|= key=?(%d %l %r %u)
|
|= key=?(%d %l %r %u)
|
||||||
@ -499,13 +596,19 @@
|
|||||||
?< ?=([?(%cru %hey %rez %yow) *] bet) :: target-specific
|
?< ?=([?(%cru %hey %rez %yow) *] bet) :: target-specific
|
||||||
=. blt [q.blt `bet] :: remember belt
|
=. blt [q.blt `bet] :: remember belt
|
||||||
?- bet
|
?- bet
|
||||||
|
@ (ta-txt bet ~)
|
||||||
[%aro *] (ta-aro p.bet)
|
[%aro *] (ta-aro p.bet)
|
||||||
[%bac *] ta-bac
|
[%bac *] ta-bac
|
||||||
[%ctl *] (ta-ctl p.bet)
|
|
||||||
[%del *] ta-del
|
[%del *] ta-del
|
||||||
[%met *] (ta-met p.bet)
|
[%hit *] (ta-hit +.bet)
|
||||||
[%ret *] ta-ret
|
[%ret *] ta-ret
|
||||||
[%txt *] (ta-txt p.bet)
|
[%txt *] (ta-txt p.bet)
|
||||||
|
::
|
||||||
|
[%mod *]
|
||||||
|
?+ mod.bet $(bet key.bet)
|
||||||
|
%ctl (ta-ctl key.bet)
|
||||||
|
%met (ta-met key.bet)
|
||||||
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ ta-det :: send edit
|
++ ta-det :: send edit
|
||||||
@ -529,7 +632,7 @@
|
|||||||
(ta-hom %del (dec pos.inp))
|
(ta-hom %del (dec pos.inp))
|
||||||
::
|
::
|
||||||
++ ta-ctl :: hear control
|
++ ta-ctl :: hear control
|
||||||
|= key=@ud
|
|= key=bolt:dill
|
||||||
^+ +>
|
^+ +>
|
||||||
=. ris ?.(?=(?(%g %r) key) ~ ris)
|
=. ris ?.(?=(?(%g %r) key) ~ ris)
|
||||||
?+ key ta-bel
|
?+ key ta-bel
|
||||||
@ -539,7 +642,7 @@
|
|||||||
%d ?^ buf.say.inp
|
%d ?^ buf.say.inp
|
||||||
ta-del
|
ta-del
|
||||||
?: =([our.hid %dojo] gyl)
|
?: =([our.hid %dojo] gyl)
|
||||||
+>(..ta (se-blit qit+~)) :: quit pier
|
+>(..ta (se-blit-sys %qit ~)) :: quit pier
|
||||||
+>(..ta (se-klin gyl)) :: unlink app
|
+>(..ta (se-klin gyl)) :: unlink app
|
||||||
%e +>(pos.inp (lent buf.say.inp))
|
%e +>(pos.inp (lent buf.say.inp))
|
||||||
%f (ta-aro %r)
|
%f (ta-aro %r)
|
||||||
@ -550,7 +653,7 @@
|
|||||||
?: =(pos.inp len)
|
?: =(pos.inp len)
|
||||||
ta-bel
|
ta-bel
|
||||||
(ta-kil %r [pos.inp (sub len pos.inp)])
|
(ta-kil %r [pos.inp (sub len pos.inp)])
|
||||||
%l +>(..ta (se-blit %clr ~))
|
%l +>(..ta (se-blit(q.mir ~) %clr ~))
|
||||||
%n (ta-aro %d)
|
%n (ta-aro %d)
|
||||||
%p (ta-aro %u)
|
%p (ta-aro %u)
|
||||||
%r ?~ ris
|
%r ?~ ris
|
||||||
@ -583,6 +686,14 @@
|
|||||||
ta-bel
|
ta-bel
|
||||||
(ta-hom %del pos.inp)
|
(ta-hom %del pos.inp)
|
||||||
::
|
::
|
||||||
|
++ ta-hit :: hear click
|
||||||
|
|= [x=@ud y=@ud]
|
||||||
|
^+ +>
|
||||||
|
=/ pol=@ud
|
||||||
|
(lent-char:klr (make:klr cad.pom))
|
||||||
|
=? x (lth x pol) pol
|
||||||
|
+>.$(pos.inp (min (sub x pol) (lent buf.say.inp)))
|
||||||
|
::
|
||||||
++ ta-erl :: hear local error
|
++ ta-erl :: hear local error
|
||||||
|= pos=@ud
|
|= pos=@ud
|
||||||
ta-bel(pos.inp (min pos (lent buf.say.inp)))
|
ta-bel(pos.inp (min pos (lent buf.say.inp)))
|
||||||
@ -594,14 +705,13 @@
|
|||||||
++ ta-fec :: apply effect
|
++ ta-fec :: apply effect
|
||||||
|= fec=sole-effect
|
|= fec=sole-effect
|
||||||
^+ +>
|
^+ +>
|
||||||
?- fec
|
?+ fec +>(..ta (se-blit fec))
|
||||||
[%bel *] ta-bel
|
[%bel *] ta-bel
|
||||||
[%blk *] +>
|
[%blk *] +>
|
||||||
[%bye *] +>(..ta (se-klin gyl))
|
[%bye *] +>(..ta (se-klin gyl))
|
||||||
[%clr *] +>(..ta (se-blit fec))
|
|
||||||
[%det *] (ta-got +.fec)
|
[%det *] (ta-got +.fec)
|
||||||
[%err *] (ta-err p.fec)
|
[%err *] (ta-err p.fec)
|
||||||
[%klr *] +>(..ta (se-blit %klr (make:klr p.fec)))
|
[%klr *] +>(..ta (se-blin %klr (make:klr p.fec)))
|
||||||
[%mor *] |- ^+ +>.^$
|
[%mor *] |- ^+ +>.^$
|
||||||
?~ p.fec +>.^$
|
?~ p.fec +>.^$
|
||||||
$(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec))
|
$(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec))
|
||||||
@ -609,10 +719,8 @@
|
|||||||
[%pro *] (ta-pro +.fec)
|
[%pro *] (ta-pro +.fec)
|
||||||
[%tab *] +>(..ta (se-tab p.fec))
|
[%tab *] +>(..ta (se-tab p.fec))
|
||||||
[%tan *] +>(..ta (se-dump p.fec))
|
[%tan *] +>(..ta (se-dump p.fec))
|
||||||
[%sag *] +>(..ta (se-blit fec))
|
|
||||||
[%sav *] +>(..ta (se-blit fec))
|
|
||||||
[%txt *] +>(..ta (se-text p.fec))
|
[%txt *] +>(..ta (se-text p.fec))
|
||||||
[%url *] +>(..ta (se-blit fec))
|
[%url *] +>(..ta (se-text:(se-blit fec) (trip p.fec)))
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ ta-dog :: change cursor
|
++ ta-dog :: change cursor
|
||||||
@ -664,8 +772,8 @@
|
|||||||
kil
|
kil
|
||||||
?. ?& ?=(^ old.kil)
|
?. ?& ?=(^ old.kil)
|
||||||
?=(^ p.blt)
|
?=(^ p.blt)
|
||||||
?| ?=([%ctl ?(%k %u %w)] u.p.blt)
|
?| ?=([%mod %ctl ?(%k %u %w)] u.p.blt)
|
||||||
?=([%met ?(%d %bac)] u.p.blt)
|
?=([%mod %met ?(%d [%bac ~])] u.p.blt)
|
||||||
== ==
|
== ==
|
||||||
%= kil :: prepend
|
%= kil :: prepend
|
||||||
num +(num.kil)
|
num +(num.kil)
|
||||||
@ -682,17 +790,18 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ ta-met :: meta key
|
++ ta-met :: meta key
|
||||||
|= key=@ud
|
|= key=bolt:dill
|
||||||
^+ +>
|
^+ +>
|
||||||
=. ris ~
|
=. ris ~
|
||||||
?+ key ta-bel
|
?+ key ta-bel
|
||||||
%dot ?. &(?=(^ old.hit) ?=(^ i.old.hit)) :: last "arg" from hist
|
%'.' ?. &(?=(^ old.hit) ?=(^ i.old.hit)) :: last "arg" from hist
|
||||||
ta-bel
|
ta-bel
|
||||||
=+ old=`(list @c)`i.old.hit
|
=+ old=`(list @c)`i.old.hit
|
||||||
=+ sop=(ta-jump(buf.say.inp old) %l %ace (lent old))
|
=+ sop=(ta-jump(buf.say.inp old) %l %ace (lent old))
|
||||||
(ta-hom (cat:edit pos.inp (slag sop old)))
|
(ta-hom (cat:edit pos.inp (slag sop old)))
|
||||||
::
|
::
|
||||||
%bac ?: =(0 pos.inp) :: kill left-word
|
[%bac ~]
|
||||||
|
?: =(0 pos.inp) :: kill left-word
|
||||||
ta-bel
|
ta-bel
|
||||||
=+ sop=(ta-pos %l %edg pos.inp)
|
=+ sop=(ta-pos %l %edg pos.inp)
|
||||||
(ta-kil %l [(sub pos.inp sop) sop])
|
(ta-kil %l [(sub pos.inp sop) sop])
|
||||||
@ -748,8 +857,8 @@
|
|||||||
::
|
::
|
||||||
%y ?. ?& ?=(^ old.kil) :: rotate & yank
|
%y ?. ?& ?=(^ old.kil) :: rotate & yank
|
||||||
?=(^ p.blt)
|
?=(^ p.blt)
|
||||||
?| ?=([%ctl %y] u.p.blt)
|
?| ?=([%mod %ctl %y] u.p.blt)
|
||||||
?=([%met %y] u.p.blt)
|
?=([%mod %met %y] u.p.blt)
|
||||||
== ==
|
== ==
|
||||||
ta-bel
|
ta-bel
|
||||||
=+ las=(lent ta-yan)
|
=+ las=(lent ta-yan)
|
||||||
@ -927,82 +1036,4 @@
|
|||||||
?: |(?=(~ a) (alnm i.a)) i
|
?: |(?=(~ a) (alnm i.a)) i
|
||||||
$(i +(i), a t.a)
|
$(i +(i), a t.a)
|
||||||
--
|
--
|
||||||
::
|
|
||||||
++ klr :: styx/stub engine
|
|
||||||
=, dill
|
|
||||||
|%
|
|
||||||
++ make :: stub from styx
|
|
||||||
|= a=styx ^- stub
|
|
||||||
=| b=stye
|
|
||||||
%+ reel
|
|
||||||
|- ^- stub
|
|
||||||
%- zing %+ turn a
|
|
||||||
|= a=$@(@t (pair styl styx))
|
|
||||||
?@ a [b (tuba (trip a))]~
|
|
||||||
^$(a q.a, b (styd p.a b))
|
|
||||||
::
|
|
||||||
|= [a=(pair stye (list @c)) b=stub]
|
|
||||||
?~ b [a ~]
|
|
||||||
?. =(p.a p.i.b) [a b]
|
|
||||||
[[p.a (weld q.a q.i.b)] t.b]
|
|
||||||
::
|
|
||||||
++ styd :: stye from styl
|
|
||||||
|= [a=styl b=stye] ^+ b :: with inheritance
|
|
||||||
:+ ?~ p.a p.b
|
|
||||||
?~ u.p.a ~
|
|
||||||
(~(put in p.b) u.p.a)
|
|
||||||
(fall p.q.a p.q.b)
|
|
||||||
(fall q.q.a q.q.b)
|
|
||||||
::
|
|
||||||
++ lent-char
|
|
||||||
|= a=stub ^- @
|
|
||||||
(roll (lnts-char a) add)
|
|
||||||
::
|
|
||||||
++ lnts-char :: stub pair tail lengths
|
|
||||||
|= a=stub ^- (list @)
|
|
||||||
%+ turn a
|
|
||||||
|= a=(pair stye (list @c))
|
|
||||||
(lent q.a)
|
|
||||||
::
|
|
||||||
++ brek :: index + incl-len of
|
|
||||||
|= [a=@ b=(list @)] :: stub pair w= idx a
|
|
||||||
=| [c=@ i=@]
|
|
||||||
|- ^- (unit (pair @ @))
|
|
||||||
?~ b ~
|
|
||||||
=. c (add c i.b)
|
|
||||||
?: (gte c a)
|
|
||||||
`[i c]
|
|
||||||
$(i +(i), b t.b)
|
|
||||||
::
|
|
||||||
++ slag :: slag stub, keep stye
|
|
||||||
|= [a=@ b=stub]
|
|
||||||
^- stub
|
|
||||||
=+ c=(lnts-char b)
|
|
||||||
=+ i=(brek a c)
|
|
||||||
?~ i b
|
|
||||||
=+ r=(^slag +(p.u.i) b)
|
|
||||||
?: =(a q.u.i)
|
|
||||||
r
|
|
||||||
=+ n=(snag p.u.i b)
|
|
||||||
:_ r :- p.n
|
|
||||||
(^slag (sub (snag p.u.i c) (sub q.u.i a)) q.n)
|
|
||||||
::
|
|
||||||
++ scag :: scag stub, keep stye
|
|
||||||
|= [a=@ b=stub]
|
|
||||||
^- stub
|
|
||||||
=+ c=(lnts-char b)
|
|
||||||
=+ i=(brek a c)
|
|
||||||
?~ i b
|
|
||||||
?: =(a q.u.i)
|
|
||||||
(^scag +(p.u.i) b)
|
|
||||||
%+ welp
|
|
||||||
(^scag p.u.i b)
|
|
||||||
=+ n=(snag p.u.i b)
|
|
||||||
:_ ~ :- p.n
|
|
||||||
(^scag (sub (snag p.u.i c) (sub q.u.i a)) q.n)
|
|
||||||
::
|
|
||||||
++ swag :: swag stub, keep stye
|
|
||||||
|= [[a=@ b=@] c=stub]
|
|
||||||
(scag b (slag a c))
|
|
||||||
--
|
|
||||||
--
|
--
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/+ pill
|
|
||||||
=* card card:agent:gall
|
=* card card:agent:gall
|
||||||
|%
|
|%
|
||||||
+$ state state-2
|
+$ state state-2
|
||||||
@ -202,6 +201,10 @@
|
|||||||
|= ships=(list ship)
|
|= ships=(list ship)
|
||||||
abet:(emit %pass /helm/prod %arvo %a %prod ships)
|
abet:(emit %pass /helm/prod %arvo %a %prod ships)
|
||||||
::
|
::
|
||||||
|
++ poke-ames-snub
|
||||||
|
|= ships=(list ship)
|
||||||
|
abet:(emit %pass /helm/snub %arvo %a %snub ships)
|
||||||
|
::
|
||||||
++ poke-atom
|
++ poke-atom
|
||||||
|= ato=@
|
|= ato=@
|
||||||
=+ len=(scow %ud (met 3 ato))
|
=+ len=(scow %ud (met 3 ato))
|
||||||
@ -242,6 +245,10 @@
|
|||||||
|= ~ =< abet
|
|= ~ =< abet
|
||||||
(emit %pass /helm %arvo %a %stir '')
|
(emit %pass /helm %arvo %a %stir '')
|
||||||
::
|
::
|
||||||
|
++ poke-kroc
|
||||||
|
|= dry=? =< abet
|
||||||
|
(emit [%pass /helm/kroc %arvo %a %kroc dry])
|
||||||
|
::
|
||||||
++ poke-knob
|
++ poke-knob
|
||||||
|= [error-tag=@tas level=?(%hush %soft %loud)] =< abet
|
|= [error-tag=@tas level=?(%hush %soft %loud)] =< abet
|
||||||
(emit %pass /helm %arvo %d %knob error-tag level)
|
(emit %pass /helm %arvo %d %knob error-tag level)
|
||||||
@ -273,9 +280,11 @@
|
|||||||
==
|
==
|
||||||
?+ mark ~|([%poke-helm-bad-mark mark] !!)
|
?+ mark ~|([%poke-helm-bad-mark mark] !!)
|
||||||
%helm-ames-prod =;(f (f !<(_+<.f vase)) poke-ames-prod)
|
%helm-ames-prod =;(f (f !<(_+<.f vase)) poke-ames-prod)
|
||||||
|
%helm-ames-snub =;(f (f !<(_+<.f vase)) poke-ames-snub)
|
||||||
%helm-ames-sift =;(f (f !<(_+<.f vase)) poke-ames-sift)
|
%helm-ames-sift =;(f (f !<(_+<.f vase)) poke-ames-sift)
|
||||||
%helm-ames-verb =;(f (f !<(_+<.f vase)) poke-ames-verb)
|
%helm-ames-verb =;(f (f !<(_+<.f vase)) poke-ames-verb)
|
||||||
%helm-ames-wake =;(f (f !<(_+<.f vase)) poke-ames-wake)
|
%helm-ames-wake =;(f (f !<(_+<.f vase)) poke-ames-wake)
|
||||||
|
%helm-kroc =;(f (f !<(_+<.f vase)) poke-kroc)
|
||||||
%helm-atom =;(f (f !<(_+<.f vase)) poke-atom)
|
%helm-atom =;(f (f !<(_+<.f vase)) poke-atom)
|
||||||
%helm-automass =;(f (f !<(_+<.f vase)) poke-automass)
|
%helm-automass =;(f (f !<(_+<.f vase)) poke-automass)
|
||||||
%helm-cancel-automass =;(f (f !<(_+<.f vase)) poke-cancel-automass)
|
%helm-cancel-automass =;(f (f !<(_+<.f vase)) poke-cancel-automass)
|
||||||
|
@ -504,7 +504,7 @@
|
|||||||
[%x %kiln %pikes ~]
|
[%x %kiln %pikes ~]
|
||||||
=+ .^(=rock:tire %cx /(scot %p our)//(scot %da now)/tire)
|
=+ .^(=rock:tire %cx /(scot %p our)//(scot %da now)/tire)
|
||||||
:^ ~ ~ %kiln-pikes
|
:^ ~ ~ %kiln-pikes
|
||||||
!> ^- pikes
|
!> ^- pikes
|
||||||
%- ~(rut by rock)
|
%- ~(rut by rock)
|
||||||
|= [=desk =zest wic=(set weft)]
|
|= [=desk =zest wic=(set weft)]
|
||||||
^- pike
|
^- pike
|
||||||
@ -764,11 +764,19 @@
|
|||||||
::
|
::
|
||||||
++ poke-rm
|
++ poke-rm
|
||||||
|= a=path
|
|= a=path
|
||||||
|
=| c=(list (unit toro))
|
||||||
|
%+ poke-info "removed: {<a>}"
|
||||||
|
=- %+ roll -
|
||||||
|
|= [a=(unit toro) b=(unit toro)]
|
||||||
|
(clap a b furl)
|
||||||
|
|- ^- (list (unit toro))
|
||||||
=+ b=.^(arch %cy a)
|
=+ b=.^(arch %cy a)
|
||||||
?~ fil.b
|
?: ?=([^ ~] b) (snoc c `(fray a))
|
||||||
=+ ~[leaf+"No such file:" leaf+"{<a>}"]
|
=? c ?=(^ fil.b) (snoc c `(fray a))
|
||||||
abet:(spam -)
|
%- zing
|
||||||
(poke-info "removed" `(fray a))
|
%+ turn ~(tap by dir.b)
|
||||||
|
|= [kid=@ta ~]
|
||||||
|
^$(a (weld a /[kid]))
|
||||||
::
|
::
|
||||||
++ poke-schedule
|
++ poke-schedule
|
||||||
|= [where=path tym=@da eve=@t]
|
|= [where=path tym=@da eve=@t]
|
||||||
@ -1147,11 +1155,18 @@
|
|||||||
::
|
::
|
||||||
~> %slog.(fmt "finished downloading update for {here}")
|
~> %slog.(fmt "finished downloading update for {here}")
|
||||||
=. let +(let)
|
=. let +(let)
|
||||||
:: If nothing changed, just advance
|
:: If nothing changed, just ensure %kids is up-to-date and advance
|
||||||
::
|
::
|
||||||
?. (get-remote-diff our syd now [her sud (dec let)])
|
?. (get-remote-diff our syd now [her sud (dec let)])
|
||||||
~> %slog.(fmt "remote is identical to {here}, skipping")
|
=< next
|
||||||
next
|
?~ kid
|
||||||
|
~> %slog.(fmt "remote is identical to {here}, skipping")
|
||||||
|
..abet
|
||||||
|
?. (get-remote-diff our u.kid now [her sud (dec let)])
|
||||||
|
~> %slog.(fmt "remote is identical to {here}, skipping")
|
||||||
|
..abet
|
||||||
|
~> %slog.(fmt "remote is identical to {here}, merging into {<u.kid>}")
|
||||||
|
(merg /kids u.kid)
|
||||||
:: Else start merging, but also immediately start listening to
|
:: Else start merging, but also immediately start listening to
|
||||||
:: the next revision. Now, all errors should no-op -- we're
|
:: the next revision. Now, all errors should no-op -- we're
|
||||||
:: already waiting for the next revision.
|
:: already waiting for the next revision.
|
||||||
@ -1178,7 +1193,7 @@
|
|||||||
::
|
::
|
||||||
?~ kid
|
?~ kid
|
||||||
..abet
|
..abet
|
||||||
~> %slog.(fmt "kids merge into {<kid>}")
|
~> %slog.(fmt "kids merge into {<u.kid>}")
|
||||||
(merg /kids u.kid)
|
(merg /kids u.kid)
|
||||||
::
|
::
|
||||||
%kids
|
%kids
|
||||||
|
@ -632,6 +632,7 @@
|
|||||||
[%atom *] (cat 3 '@' p.p.spec)
|
[%atom *] (cat 3 '@' p.p.spec)
|
||||||
==
|
==
|
||||||
%dbug $(spec q.spec)
|
%dbug $(spec q.spec)
|
||||||
|
%gist $(spec q.spec)
|
||||||
%leaf =+((scot p.spec q.spec) ?:(=('~' -) - (cat 3 '%' -)))
|
%leaf =+((scot p.spec q.spec) ?:(=('~' -) - (cat 3 '%' -)))
|
||||||
%like tree/[[`[':' ~] ~] (turn `(list wing)`+.spec wing-to-plum)]
|
%like tree/[[`[':' ~] ~] (turn `(list wing)`+.spec wing-to-plum)]
|
||||||
%loop (cat 3 '$' p.spec)
|
%loop (cat 3 '$' p.spec)
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
=+ cha=(tuba (trip q.kev))
|
=+ cha=(tuba (trip q.kev))
|
||||||
?> ?=([@ ~] cha) :: of a single character
|
?> ?=([@ ~] cha) :: of a single character
|
||||||
?+ mod !! :: modified by one buckykey
|
?+ mod !! :: modified by one buckykey
|
||||||
[%ctrl ~ ~] [%ctl i.cha]
|
[%ctrl ~ ~] [%mod %ctl i.cha]
|
||||||
[%alt ~ ~] [%met i.cha]
|
[%alt ~ ~] [%mod %met i.cha]
|
||||||
==
|
==
|
||||||
?@ q.kev
|
?@ q.kev
|
||||||
[%txt (tuba (trip q.kev))]
|
[%txt (tuba (trip q.kev))]
|
||||||
|
@ -19,8 +19,10 @@
|
|||||||
^- ^json
|
^- ^json
|
||||||
?+ -.dib ~|(unsupported-blit+-.dib !!)
|
?+ -.dib ~|(unsupported-blit+-.dib !!)
|
||||||
%mor [%a (turn p.dib |=(a=dill-blit:dill json(dib a)))]
|
%mor [%a (turn p.dib |=(a=dill-blit:dill json(dib a)))]
|
||||||
%hop (frond %hop (numb p.dib))
|
%hop %+ frond %hop
|
||||||
?(%pro %out) (frond -.dib (tape (tufa p.dib)))
|
?@ p.dib (numb p.dib)
|
||||||
|
(pairs 'x'^(numb x.p.dib) 'y'^(numb y.p.dib) ~)
|
||||||
|
%put (frond -.dib (tape (tufa p.dib)))
|
||||||
?(%bel %clr) (frond %act %s -.dib)
|
?(%bel %clr) (frond %act %s -.dib)
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
|
:: %drum-put: download into host system
|
||||||
::
|
::
|
||||||
:::: /hoon/do-claim/womb/mar
|
|
||||||
::
|
|
||||||
/? 310
|
/? 310
|
||||||
|_ [path @]
|
|_ [path $@(@ [@ta @])]
|
||||||
::
|
::
|
||||||
++ grad %noun
|
++ grad %noun
|
||||||
++ grow
|
++ grow
|
||||||
@ -11,6 +10,6 @@
|
|||||||
--
|
--
|
||||||
++ grab :: convert from
|
++ grab :: convert from
|
||||||
|%
|
|%
|
||||||
+$ noun [path @] :: clam from %noun
|
+$ noun [path $@(@ [@ta @])] :: clam from %noun
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
46
pkg/arvo/mar/herm/task.hoon
Normal file
46
pkg/arvo/mar/herm/task.hoon
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
:: task: herm task for passthrough to dill
|
||||||
|
::
|
||||||
|
/- herm
|
||||||
|
/+ dill
|
||||||
|
::
|
||||||
|
|_ =task:herm
|
||||||
|
++ grad %noun
|
||||||
|
:: +grab: convert from
|
||||||
|
::
|
||||||
|
++ grab
|
||||||
|
|%
|
||||||
|
++ noun task:herm
|
||||||
|
::
|
||||||
|
++ json
|
||||||
|
|= jon=^json
|
||||||
|
^+ task
|
||||||
|
~| jon
|
||||||
|
?> ?=([%o *] jon)
|
||||||
|
=+ ses=(~(got by p.jon) 'session')
|
||||||
|
?> ?=([%s *] ses)
|
||||||
|
:- ?: =('' p.ses) %$
|
||||||
|
(slav %tas p.ses)
|
||||||
|
=. p.jon (~(del by p.jon) 'session')
|
||||||
|
%. jon
|
||||||
|
=, dejs:format
|
||||||
|
|^ task
|
||||||
|
++ task
|
||||||
|
%- of
|
||||||
|
:~ belt+belt:dejs:^dill
|
||||||
|
blew+(ot 'w'^ni 'h'^ni ~)
|
||||||
|
hail+ul
|
||||||
|
open+(ot 'term'^(se %tas) 'apps'^(ar gill) ~)
|
||||||
|
shut+ul
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ gill
|
||||||
|
(ot 'who'^(se %p) 'app'^(se %tas) ~)
|
||||||
|
--
|
||||||
|
--
|
||||||
|
:: +grow: convert to
|
||||||
|
::
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ noun task
|
||||||
|
--
|
||||||
|
--
|
9
pkg/arvo/sur/herm.hoon
Normal file
9
pkg/arvo/sur/herm.hoon
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
:: herm: stand-in for term.c with http interface
|
||||||
|
::
|
||||||
|
|%
|
||||||
|
+$ task
|
||||||
|
$~ [%$ %hail ~]
|
||||||
|
$: session=@tas
|
||||||
|
task=$>(?(%open %shut %belt %blew %hail) session-task:dill)
|
||||||
|
==
|
||||||
|
--
|
@ -1 +1 @@
|
|||||||
[%zuse 417]
|
[%zuse 415]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|%
|
|%
|
||||||
+| %global
|
+| %global
|
||||||
::
|
::
|
||||||
++ arvo %240
|
++ arvo %239
|
||||||
::
|
::
|
||||||
:: $arch: node identity
|
:: $arch: node identity
|
||||||
:: $axal: fundamental node, recursive (trie)
|
:: $axal: fundamental node, recursive (trie)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
|||||||
!:
|
!:
|
||||||
=> ..part
|
=> ..part
|
||||||
|%
|
|%
|
||||||
++ lull %328
|
++ lull %326
|
||||||
:: :: ::
|
:: :: ::
|
||||||
:::: :: :: (1) models
|
:::: :: :: (1) models
|
||||||
:: :: ::
|
:: :: ::
|
||||||
@ -352,6 +352,7 @@
|
|||||||
:: %heed: track peer's responsiveness; gives %clog if slow
|
:: %heed: track peer's responsiveness; gives %clog if slow
|
||||||
:: %jilt: stop tracking peer's responsiveness
|
:: %jilt: stop tracking peer's responsiveness
|
||||||
:: %cork: request to delete message flow
|
:: %cork: request to delete message flow
|
||||||
|
:: %kroc: request to delete stale message flows
|
||||||
:: %plea: request to send message
|
:: %plea: request to send message
|
||||||
::
|
::
|
||||||
:: System and Lifecycle Tasks
|
:: System and Lifecycle Tasks
|
||||||
@ -360,6 +361,7 @@
|
|||||||
:: %init: vane boot
|
:: %init: vane boot
|
||||||
:: %prod: re-send a packet per flow, to all peers if .ships is ~
|
:: %prod: re-send a packet per flow, to all peers if .ships is ~
|
||||||
:: %sift: limit verbosity to .ships
|
:: %sift: limit verbosity to .ships
|
||||||
|
:: %snub: set packet blacklist to .ships
|
||||||
:: %spew: set verbosity toggles
|
:: %spew: set verbosity toggles
|
||||||
:: %trim: release memory
|
:: %trim: release memory
|
||||||
:: %vega: kernel reload notification
|
:: %vega: kernel reload notification
|
||||||
@ -369,12 +371,14 @@
|
|||||||
[%heed =ship]
|
[%heed =ship]
|
||||||
[%jilt =ship]
|
[%jilt =ship]
|
||||||
[%cork =ship]
|
[%cork =ship]
|
||||||
|
[%kroc dry=?]
|
||||||
$>(%plea vane-task)
|
$>(%plea vane-task)
|
||||||
::
|
::
|
||||||
$>(%born vane-task)
|
$>(%born vane-task)
|
||||||
$>(%init vane-task)
|
$>(%init vane-task)
|
||||||
[%prod ships=(list ship)]
|
[%prod ships=(list ship)]
|
||||||
[%sift ships=(list ship)]
|
[%sift ships=(list ship)]
|
||||||
|
[%snub ships=(list ship)]
|
||||||
[%spew veb=(list verb)]
|
[%spew veb=(list verb)]
|
||||||
[%stir arg=@t]
|
[%stir arg=@t]
|
||||||
$>(%trim vane-task)
|
$>(%trim vane-task)
|
||||||
@ -434,7 +438,7 @@
|
|||||||
+$ address @uxaddress
|
+$ address @uxaddress
|
||||||
:: $verb: verbosity flag for ames
|
:: $verb: verbosity flag for ames
|
||||||
::
|
::
|
||||||
+$ verb ?(%snd %rcv %odd %msg %ges %for %rot)
|
+$ verb ?(%snd %rcv %odd %msg %ges %for %rot %kay)
|
||||||
:: $blob: raw atom to or from unix, representing a packet
|
:: $blob: raw atom to or from unix, representing a packet
|
||||||
::
|
::
|
||||||
+$ blob @uxblob
|
+$ blob @uxblob
|
||||||
@ -752,7 +756,6 @@
|
|||||||
[%hill p=(list @tas)] :: mount points
|
[%hill p=(list @tas)] :: mount points
|
||||||
[%done error=(unit error:ames)] :: ames message (n)ack
|
[%done error=(unit error:ames)] :: ames message (n)ack
|
||||||
[%mere p=(each (set path) (pair term tang))] :: merge result
|
[%mere p=(each (set path) (pair term tang))] :: merge result
|
||||||
[%note p=@tD q=tank] :: debug message
|
|
||||||
[%ogre p=@tas] :: delete mount point
|
[%ogre p=@tas] :: delete mount point
|
||||||
[%rule red=dict wit=dict] :: node r+w permissions
|
[%rule red=dict wit=dict] :: node r+w permissions
|
||||||
[%tire p=(each rock:tire wave:tire)] :: app state
|
[%tire p=(each rock:tire wave:tire)] :: app state
|
||||||
@ -785,6 +788,7 @@
|
|||||||
[%park des=desk yok=yoki ran=rang] :: synchronous commit
|
[%park des=desk yok=yoki ran=rang] :: synchronous commit
|
||||||
[%perm des=desk pax=path rit=rite] :: change permissions
|
[%perm des=desk pax=path rit=rite] :: change permissions
|
||||||
[%pork ~] :: resume commit
|
[%pork ~] :: resume commit
|
||||||
|
[%prep lat=(map lobe page)] :: prime clay store
|
||||||
[%rein des=desk ren=rein] :: extra apps
|
[%rein des=desk ren=rein] :: extra apps
|
||||||
[%stir arg=*] :: debug
|
[%stir arg=*] :: debug
|
||||||
[%tire p=(unit ~)] :: app state subscribe
|
[%tire p=(unit ~)] :: app state subscribe
|
||||||
@ -884,6 +888,17 @@
|
|||||||
+$ norm (axal ?) :: tombstone policy
|
+$ norm (axal ?) :: tombstone policy
|
||||||
+$ open $-(path vase) :: get prelude
|
+$ open $-(path vase) :: get prelude
|
||||||
+$ page ^page :: export for compat
|
+$ page ^page :: export for compat
|
||||||
|
+$ pour :: ford build w/content
|
||||||
|
$% [%file =path]
|
||||||
|
[%nave =mark]
|
||||||
|
[%dais =mark]
|
||||||
|
[%cast =mars]
|
||||||
|
[%tube =mars]
|
||||||
|
:: leafs
|
||||||
|
::
|
||||||
|
[%vale =path =lobe]
|
||||||
|
[%arch =path =(map path lobe)]
|
||||||
|
==
|
||||||
+$ rang :: repository
|
+$ rang :: repository
|
||||||
$: hut=(map tako yaki) :: changes
|
$: hut=(map tako yaki) :: changes
|
||||||
lat=(map lobe page) :: data
|
lat=(map lobe page) :: data
|
||||||
@ -918,6 +933,13 @@
|
|||||||
+$ rule [mod=?(%black %white) who=(set whom)] :: node permission
|
+$ rule [mod=?(%black %white) who=(set whom)] :: node permission
|
||||||
+$ rump [p=care q=case r=@tas s=path] :: relative path
|
+$ rump [p=care q=case r=@tas s=path] :: relative path
|
||||||
+$ saba [p=ship q=@tas r=moar s=dome] :: patch+merge
|
+$ saba [p=ship q=@tas r=moar s=dome] :: patch+merge
|
||||||
|
+$ soak :: ford result
|
||||||
|
$% [%cage =cage]
|
||||||
|
[%vase =vase]
|
||||||
|
[%arch dir=(map @ta vase)]
|
||||||
|
[%dais =dais]
|
||||||
|
[%tube =tube]
|
||||||
|
==
|
||||||
+$ soba (list [p=path q=miso]) :: delta
|
+$ soba (list [p=path q=miso]) :: delta
|
||||||
+$ suba (list [p=path q=misu]) :: delta
|
+$ suba (list [p=path q=misu]) :: delta
|
||||||
+$ tako @uvI :: yaki ref
|
+$ tako @uvI :: yaki ref
|
||||||
@ -1057,6 +1079,31 @@
|
|||||||
%^ cat 7 (sham [%yaki (roll p add) q t])
|
%^ cat 7 (sham [%yaki (roll p add) q t])
|
||||||
(sham [%tako (roll p add) q t])
|
(sham [%tako (roll p add) q t])
|
||||||
[p q has t]
|
[p q has t]
|
||||||
|
::
|
||||||
|
:: $leak: ford cache key
|
||||||
|
::
|
||||||
|
:: This includes all build inputs, including transitive dependencies,
|
||||||
|
:: recursively.
|
||||||
|
::
|
||||||
|
+$ leak
|
||||||
|
$~ [*pour ~]
|
||||||
|
$: =pour
|
||||||
|
deps=(set leak)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
:: $flow: global ford cache
|
||||||
|
::
|
||||||
|
:: Refcount includes references from other items in the cache, and
|
||||||
|
:: from spills in each desk
|
||||||
|
::
|
||||||
|
:: This is optimized for minimizing the number of rebuilds, and given
|
||||||
|
:: that, minimizing the amount of memory used. It is relatively slow
|
||||||
|
:: to lookup, because generating a cache key can be fairly slow (for
|
||||||
|
:: files, it requires parsing; for tubes, it even requires building
|
||||||
|
:: the marks).
|
||||||
|
::
|
||||||
|
+$ flow (map leak [refs=@ud =soak])
|
||||||
|
::
|
||||||
:: $pile: preprocessed hoon source file
|
:: $pile: preprocessed hoon source file
|
||||||
::
|
::
|
||||||
:: /- sur-file :: surface imports from /sur
|
:: /- sur-file :: surface imports from /sur
|
||||||
@ -1160,9 +1207,7 @@
|
|||||||
++ dill ^?
|
++ dill ^?
|
||||||
|%
|
|%
|
||||||
+$ gift :: out result <-$
|
+$ gift :: out result <-$
|
||||||
$% [%bbye ~] :: reset prompt
|
$% [%blit p=(list blit)] :: terminal output
|
||||||
[%blit p=(list blit)] :: terminal output
|
|
||||||
[%burl p=@t] :: activate url
|
|
||||||
[%logo ~] :: logout
|
[%logo ~] :: logout
|
||||||
[%meld ~] :: unify memory
|
[%meld ~] :: unify memory
|
||||||
[%pack ~] :: compact memory
|
[%pack ~] :: compact memory
|
||||||
@ -1170,29 +1215,33 @@
|
|||||||
== ::
|
== ::
|
||||||
+$ task :: in request ->$
|
+$ task :: in request ->$
|
||||||
$~ [%vega ~] ::
|
$~ [%vega ~] ::
|
||||||
$% [%belt p=belt] :: terminal input
|
$% [%boot lit=? p=*] :: weird %dill boot
|
||||||
[%blew p=blew] :: terminal config
|
|
||||||
[%boot lit=? p=*] :: weird %dill boot
|
|
||||||
[%crop p=@ud] :: trim kernel state
|
[%crop p=@ud] :: trim kernel state
|
||||||
[%crud p=@tas q=(list tank)] :: print error
|
[%crud p=@tas q=(list tank)] :: print error
|
||||||
[%flee session=~] :: unwatch session
|
|
||||||
[%flog p=flog] :: wrapped error
|
[%flog p=flog] :: wrapped error
|
||||||
[%flow p=@tas q=(list gill:gall)] :: terminal config
|
|
||||||
[%hail ~] :: terminal refresh
|
|
||||||
[%heft ~] :: memory report
|
[%heft ~] :: memory report
|
||||||
[%hook ~] :: this term hung up
|
|
||||||
[%harm ~] :: all terms hung up
|
|
||||||
$>(%init vane-task) :: after gall ready
|
$>(%init vane-task) :: after gall ready
|
||||||
[%meld ~] :: unify memory
|
[%meld ~] :: unify memory
|
||||||
[%noop ~] :: no operation
|
|
||||||
[%pack ~] :: compact memory
|
[%pack ~] :: compact memory
|
||||||
[%talk p=tank] ::
|
[%seat =desk] :: install desk
|
||||||
[%text p=tape] ::
|
[%shot ses=@tas task=session-task] :: task for session
|
||||||
[%view session=~] :: watch session blits
|
[%talk p=(list tank)] :: print tanks
|
||||||
|
[%text p=tape] :: print tape
|
||||||
$>(%trim vane-task) :: trim state
|
$>(%trim vane-task) :: trim state
|
||||||
$>(%vega vane-task) :: report upgrade
|
$>(%vega vane-task) :: report upgrade
|
||||||
[%verb ~] :: verbose mode
|
[%verb ~] :: verbose mode
|
||||||
[%knob tag=term level=?(%hush %soft %loud)] :: error verbosity
|
[%knob tag=term level=?(%hush %soft %loud)] :: error verbosity
|
||||||
|
session-task :: for default session
|
||||||
|
== ::
|
||||||
|
:: ::
|
||||||
|
+$ session-task :: session request
|
||||||
|
$% [%belt p=belt] :: terminal input
|
||||||
|
[%blew p=blew] :: terminal config
|
||||||
|
[%flee ~] :: unwatch session
|
||||||
|
[%hail ~] :: terminal refresh
|
||||||
|
[%open p=dude:gall q=(list gill:gall)] :: setup session
|
||||||
|
[%shut ~] :: close session
|
||||||
|
[%view ~] :: watch session blits
|
||||||
== ::
|
== ::
|
||||||
::
|
::
|
||||||
:::: :: (1d2)
|
:::: :: (1d2)
|
||||||
@ -1200,59 +1249,41 @@
|
|||||||
+$ blew [p=@ud q=@ud] :: columns rows
|
+$ blew [p=@ud q=@ud] :: columns rows
|
||||||
+$ belt :: client input
|
+$ belt :: client input
|
||||||
$? bolt :: simple input
|
$? bolt :: simple input
|
||||||
$% [%mod mod=?(%ctl %met %hyp) key=bolt] :: w/ modifier
|
[%mod mod=?(%ctl %met %hyp) key=bolt] :: w/ modifier
|
||||||
[%txt p=(list @c)] :: utf32 text
|
[%txt p=(list @c)] :: utf32 text
|
||||||
::TODO consider moving %hey, %rez, %yow here ::
|
::TODO consider moving %hey, %rez, %yow here ::
|
||||||
::TMP forward backwards-compatibility ::
|
== ::
|
||||||
:: ::
|
|
||||||
[%ctl p=@c] ::
|
|
||||||
[%met p=@c] ::
|
|
||||||
== == ::
|
|
||||||
+$ bolt :: simple input
|
+$ bolt :: simple input
|
||||||
$@ @c :: simple keystroke
|
$@ @c :: simple keystroke
|
||||||
$% [%aro p=?(%d %l %r %u)] :: arrow key
|
$% [%aro p=?(%d %l %r %u)] :: arrow key
|
||||||
[%bac ~] :: true backspace
|
[%bac ~] :: true backspace
|
||||||
[%del ~] :: true delete
|
[%del ~] :: true delete
|
||||||
[%hit r=@ud c=@ud] :: mouse click
|
[%hit x=@ud y=@ud] :: mouse click
|
||||||
[%ret ~] :: return
|
[%ret ~] :: return
|
||||||
== ::
|
== ::
|
||||||
+$ blit :: old blit
|
+$ blit :: client output
|
||||||
$% [%bel ~] :: make a noise
|
$% [%bel ~] :: make a noise
|
||||||
[%clr ~] :: clear the screen
|
[%clr ~] :: clear the screen
|
||||||
[%hop p=@ud] :: set cursor position
|
[%hop p=$@(@ud [x=@ud y=@ud])] :: set cursor col/pos
|
||||||
[%klr p=stub] :: set styled line
|
[%klr p=stub] :: put styled
|
||||||
[%lin p=(list @c)] :: set current line
|
[%mor p=(list blit)] :: multiple blits
|
||||||
[%mor ~] :: newline
|
[%nel ~] :: newline
|
||||||
|
[%put p=(list @c)] :: put text at cursor
|
||||||
[%sag p=path q=*] :: save to jamfile
|
[%sag p=path q=*] :: save to jamfile
|
||||||
[%sav p=path q=@] :: save to file
|
[%sav p=path q=@] :: save to file
|
||||||
[%url p=@t] :: activate url
|
[%url p=@t] :: activate url
|
||||||
|
[%wyp ~] :: wipe cursor line
|
||||||
== ::
|
== ::
|
||||||
+$ dill-belt :: new belt
|
+$ dill-belt :: arvo input
|
||||||
$% [%aro p=?(%d %l %r %u)] :: arrow key
|
$% belt :: client input
|
||||||
[%bac ~] :: true backspace
|
|
||||||
[%cru p=@tas q=(list tank)] :: echo error
|
[%cru p=@tas q=(list tank)] :: echo error
|
||||||
[%ctl p=@] :: control-key
|
|
||||||
[%del ~] :: true delete
|
|
||||||
[%hey ~] :: refresh
|
[%hey ~] :: refresh
|
||||||
[%met p=@] :: meta-key
|
|
||||||
[%ret ~] :: return
|
|
||||||
[%rez p=@ud q=@ud] :: resize, cols, rows
|
[%rez p=@ud q=@ud] :: resize, cols, rows
|
||||||
[%txt p=(list @c)] :: utf32 text
|
|
||||||
[%yow p=gill:gall] :: connect to app
|
[%yow p=gill:gall] :: connect to app
|
||||||
== ::
|
== ::
|
||||||
+$ dill-blit :: new blit
|
+$ dill-blit :: arvo output
|
||||||
$% [%bel ~] :: make a noise
|
$% blit :: client output
|
||||||
[%clr ~] :: clear the screen
|
|
||||||
[%hop p=@ud] :: set cursor position
|
|
||||||
[%klr p=stub] :: styled text
|
|
||||||
[%mor p=(list dill-blit)] :: multiple blits
|
|
||||||
[%pom p=stub] :: styled prompt
|
|
||||||
[%pro p=(list @c)] :: show as cursor+line
|
|
||||||
[%qit ~] :: close console
|
[%qit ~] :: close console
|
||||||
[%out p=(list @c)] :: send output line
|
|
||||||
[%sag p=path q=*] :: save to jamfile
|
|
||||||
[%sav p=path q=@] :: save to file
|
|
||||||
[%url p=@t] :: activate url
|
|
||||||
== ::
|
== ::
|
||||||
+$ flog :: sent to %dill
|
+$ flog :: sent to %dill
|
||||||
$% [%crop p=@ud] :: trim kernel state
|
$% [%crop p=@ud] :: trim kernel state
|
||||||
@ -1263,6 +1294,11 @@
|
|||||||
[%text p=tape] ::
|
[%text p=tape] ::
|
||||||
[%verb ~] :: verbose mode
|
[%verb ~] :: verbose mode
|
||||||
== ::
|
== ::
|
||||||
|
:: ::
|
||||||
|
+$ poke :: dill to userspace
|
||||||
|
$: ses=@tas :: target session
|
||||||
|
dill-belt :: input
|
||||||
|
== ::
|
||||||
-- ::dill
|
-- ::dill
|
||||||
:: ::::
|
:: ::::
|
||||||
:::: ++eyre :: (1e) http-server
|
:::: ++eyre :: (1e) http-server
|
||||||
@ -1763,7 +1799,6 @@
|
|||||||
+$ gift :: outgoing result
|
+$ gift :: outgoing result
|
||||||
$% [%boon payload=*] :: ames response
|
$% [%boon payload=*] :: ames response
|
||||||
[%done error=(unit error:ames)] :: ames message (n)ack
|
[%done error=(unit error:ames)] :: ames message (n)ack
|
||||||
[%onto p=(each suss tang)] :: about agent
|
|
||||||
[%unto p=unto] ::
|
[%unto p=unto] ::
|
||||||
== ::
|
== ::
|
||||||
+$ task :: incoming request
|
+$ task :: incoming request
|
||||||
@ -2531,9 +2566,6 @@
|
|||||||
:: %ames: hear packet
|
:: %ames: hear packet
|
||||||
::
|
::
|
||||||
$>(%hear task:ames)
|
$>(%hear task:ames)
|
||||||
:: %dill: hangup
|
|
||||||
::
|
|
||||||
$>(%hook task:dill)
|
|
||||||
:: %clay: external edit
|
:: %clay: external edit
|
||||||
::
|
::
|
||||||
$>(%into task:clay)
|
$>(%into task:clay)
|
||||||
@ -2542,6 +2574,9 @@
|
|||||||
:: TODO: make $yuki an option for %into?
|
:: TODO: make $yuki an option for %into?
|
||||||
::
|
::
|
||||||
$>(%park task:clay)
|
$>(%park task:clay)
|
||||||
|
:: %clay: load blob store
|
||||||
|
::
|
||||||
|
$>(%prep task:clay)
|
||||||
:: %eyre: learn ports of live http servers
|
:: %eyre: learn ports of live http servers
|
||||||
::
|
::
|
||||||
$>(%live task:eyre)
|
$>(%live task:eyre)
|
||||||
@ -2554,6 +2589,9 @@
|
|||||||
:: %eyre: starts handling an backdoor http request
|
:: %eyre: starts handling an backdoor http request
|
||||||
::
|
::
|
||||||
$>(%request-local task:eyre)
|
$>(%request-local task:eyre)
|
||||||
|
:: %dill: close session
|
||||||
|
::
|
||||||
|
$>(%shut task:dill)
|
||||||
:: %behn: wakeup
|
:: %behn: wakeup
|
||||||
::
|
::
|
||||||
$>(%wake task:behn)
|
$>(%wake task:behn)
|
||||||
|
@ -102,6 +102,7 @@
|
|||||||
ges=`?`%.n :: congestion control
|
ges=`?`%.n :: congestion control
|
||||||
for=`?`%.n :: packet forwarding
|
for=`?`%.n :: packet forwarding
|
||||||
rot=`?`%.n :: routing attempts
|
rot=`?`%.n :: routing attempts
|
||||||
|
kay=`?`%.n :: is ok/not responding
|
||||||
==
|
==
|
||||||
=>
|
=>
|
||||||
~% %ames ..part ~
|
~% %ames ..part ~
|
||||||
@ -121,14 +122,14 @@
|
|||||||
:: +qos-update-text: notice text for if connection state changes
|
:: +qos-update-text: notice text for if connection state changes
|
||||||
::
|
::
|
||||||
++ qos-update-text
|
++ qos-update-text
|
||||||
|= [=ship old=qos new=qos]
|
|= [=ship old=qos new=qos k=? ships=(set ship)]
|
||||||
^- (unit tape)
|
^- (unit tape)
|
||||||
::
|
::
|
||||||
?+ [-.old -.new] ~
|
?+ [-.old -.new] ~
|
||||||
[%unborn %live] `"; {(scow %p ship)} is your neighbor"
|
[%unborn %live] `"; {(scow %p ship)} is your neighbor"
|
||||||
[%dead %live] `"; {(scow %p ship)} is ok"
|
[%dead %live] ((trace k ship ships |.("is ok")) ~)
|
||||||
[%live %dead] `"; {(scow %p ship)} not responding still trying"
|
[%live %dead] ((trace k ship ships |.("not responding still trying")) ~)
|
||||||
[%unborn %dead] `"; {(scow %p ship)} not responding still trying"
|
[%unborn %dead] ((trace k ship ships |.("not responding still trying")) ~)
|
||||||
[%live %unborn] `"; {(scow %p ship)} has sunk"
|
[%live %unborn] `"; {(scow %p ship)} has sunk"
|
||||||
[%dead %unborn] `"; {(scow %p ship)} has sunk"
|
[%dead %unborn] `"; {(scow %p ship)} has sunk"
|
||||||
==
|
==
|
||||||
@ -607,26 +608,27 @@
|
|||||||
:: life: our $life; how many times we've rekeyed
|
:: life: our $life; how many times we've rekeyed
|
||||||
:: crypto-core: interface for encryption and signing
|
:: crypto-core: interface for encryption and signing
|
||||||
:: bug: debug printing configuration
|
:: bug: debug printing configuration
|
||||||
:: corks(STALE):wires for cork flows pending publisher update
|
:: snub: blocklist for incoming packets
|
||||||
::
|
::
|
||||||
:: Note: .corks is only still present for unreleased migration reasons
|
:: Note: .corks is only still present for unreleased migration reasons
|
||||||
::
|
::
|
||||||
|
::
|
||||||
+$ ames-state
|
+$ ames-state
|
||||||
$: peers=(map ship ship-state)
|
$: peers=(map ship ship-state)
|
||||||
=unix=duct
|
=unix=duct
|
||||||
=life
|
=life
|
||||||
crypto-core=acru:ames
|
crypto-core=acru:ames
|
||||||
=bug
|
=bug
|
||||||
corks=(set wire) ::TODO unused, remove in next version of state
|
corks=(set wire)
|
||||||
|
snub=(set ship)
|
||||||
==
|
==
|
||||||
::
|
|
||||||
+$ ames-state-4 ames-state-5
|
+$ ames-state-4 ames-state-5
|
||||||
+$ ames-state-5
|
+$ ames-state-5
|
||||||
$: peers=(map ship ship-state-5)
|
$: peers=(map ship ship-state-5)
|
||||||
=unix=duct
|
=unix=duct
|
||||||
=life
|
=life
|
||||||
crypto-core=acru:ames
|
crypto-core=acru:ames
|
||||||
=bug
|
bug=bug-9
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ ship-state-4 ship-state-5
|
+$ ship-state-4 ship-state-5
|
||||||
@ -655,7 +657,7 @@
|
|||||||
=unix=duct
|
=unix=duct
|
||||||
=life
|
=life
|
||||||
crypto-core=acru:ames
|
crypto-core=acru:ames
|
||||||
=bug
|
bug=bug-9
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ ship-state-6
|
+$ ship-state-6
|
||||||
@ -684,8 +686,33 @@
|
|||||||
=unix=duct
|
=unix=duct
|
||||||
=life
|
=life
|
||||||
crypto-core=acru:ames
|
crypto-core=acru:ames
|
||||||
=bug
|
bug=bug-9
|
||||||
==
|
==
|
||||||
|
::
|
||||||
|
+$ ames-state-8
|
||||||
|
$: peers=(map ship ship-state)
|
||||||
|
=unix=duct
|
||||||
|
=life
|
||||||
|
crypto-core=acru:ames
|
||||||
|
bug=bug-9
|
||||||
|
corks=(set wire)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ bug-9
|
||||||
|
$: veb=_[`?`%.n `?`%.n `?`%.n `?`%.n `?`%.n `?`%.n `?`%.n]
|
||||||
|
ships=(set ship)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ ames-state-9
|
||||||
|
$: peers=(map ship ship-state)
|
||||||
|
=unix=duct
|
||||||
|
=life
|
||||||
|
crypto-core=acru:ames
|
||||||
|
bug=bug-9
|
||||||
|
corks=(set wire)
|
||||||
|
snub=(set ship)
|
||||||
|
==
|
||||||
|
::
|
||||||
:: $bug: debug printing configuration
|
:: $bug: debug printing configuration
|
||||||
::
|
::
|
||||||
:: veb: verbosity toggles
|
:: veb: verbosity toggles
|
||||||
@ -842,7 +869,15 @@
|
|||||||
::
|
::
|
||||||
=< =* adult-gate .
|
=< =* adult-gate .
|
||||||
=| queued-events=(qeu queued-event)
|
=| queued-events=(qeu queued-event)
|
||||||
=| cached-state=(unit $%([%5 ames-state-5] [%6 ames-state-6] [%7 ames-state-7] [%8 ^ames-state]))
|
=| $= cached-state
|
||||||
|
%- unit
|
||||||
|
$% [%5 ames-state-5]
|
||||||
|
[%6 ames-state-6]
|
||||||
|
[%7 ames-state-7]
|
||||||
|
[%8 ames-state-8]
|
||||||
|
[%9 ames-state-9]
|
||||||
|
[%10 ^ames-state]
|
||||||
|
==
|
||||||
::
|
::
|
||||||
|= [now=@da eny=@ rof=roof]
|
|= [now=@da eny=@ rof=roof]
|
||||||
=* larval-gate .
|
=* larval-gate .
|
||||||
@ -964,7 +999,7 @@
|
|||||||
:: lifecycle arms; mostly pass-throughs to the contained adult ames
|
:: lifecycle arms; mostly pass-throughs to the contained adult ames
|
||||||
::
|
::
|
||||||
++ scry scry:adult-core
|
++ scry scry:adult-core
|
||||||
++ stay [%8 %larva queued-events ames-state.adult-gate]
|
++ stay [%10 %larva queued-events ames-state.adult-gate]
|
||||||
++ load
|
++ load
|
||||||
|= $= old
|
|= $= old
|
||||||
$% $: %4
|
$% $: %4
|
||||||
@ -996,6 +1031,20 @@
|
|||||||
[%adult state=ames-state-7]
|
[%adult state=ames-state-7]
|
||||||
== ==
|
== ==
|
||||||
$: %8
|
$: %8
|
||||||
|
$% $: %larva
|
||||||
|
events=(qeu queued-event)
|
||||||
|
state=ames-state-8
|
||||||
|
==
|
||||||
|
[%adult state=ames-state-8]
|
||||||
|
== ==
|
||||||
|
$: %9
|
||||||
|
$% $: %larva
|
||||||
|
events=(qeu queued-event)
|
||||||
|
state=ames-state-9
|
||||||
|
==
|
||||||
|
[%adult state=ames-state-9]
|
||||||
|
== ==
|
||||||
|
$: %10
|
||||||
$% $: %larva
|
$% $: %larva
|
||||||
events=(qeu queued-event)
|
events=(qeu queued-event)
|
||||||
state=_ames-state.adult-gate
|
state=_ames-state.adult-gate
|
||||||
@ -1040,12 +1089,32 @@
|
|||||||
=. queued-events events.old
|
=. queued-events events.old
|
||||||
larval-gate
|
larval-gate
|
||||||
::
|
::
|
||||||
[%8 %adult *] (load:adult-core %8 state.old)
|
[%8 %adult *]
|
||||||
|
=. cached-state `[%8 state.old]
|
||||||
|
~> %slog.0^leaf/"ames: larva reload"
|
||||||
|
larval-gate
|
||||||
::
|
::
|
||||||
[%8 %larva *]
|
[%8 %larva *]
|
||||||
|
~> %slog.0^leaf/"ames: larva: load"
|
||||||
|
=. queued-events events.old
|
||||||
|
larval-gate
|
||||||
|
::
|
||||||
|
[%9 %adult *]
|
||||||
|
=. cached-state `[%9 state.old]
|
||||||
|
~> %slog.0^leaf/"ames: larva reload"
|
||||||
|
larval-gate
|
||||||
|
::
|
||||||
|
[%9 %larva *]
|
||||||
|
~> %slog.0^leaf/"ames: larva: load"
|
||||||
|
=. queued-events events.old
|
||||||
|
larval-gate
|
||||||
|
::
|
||||||
|
[%10 %adult *] (load:adult-core %10 state.old)
|
||||||
|
::
|
||||||
|
[%10 %larva *]
|
||||||
~> %slog.1^leaf/"ames: larva: load"
|
~> %slog.1^leaf/"ames: larva: load"
|
||||||
=. queued-events events.old
|
=. queued-events events.old
|
||||||
=. adult-gate (load:adult-core %8 state.old)
|
=. adult-gate (load:adult-core %10 state.old)
|
||||||
larval-gate
|
larval-gate
|
||||||
::
|
::
|
||||||
==
|
==
|
||||||
@ -1064,7 +1133,11 @@
|
|||||||
~> %slog.0^leaf/"ames: init daily recork timer"
|
~> %slog.0^leaf/"ames: init daily recork timer"
|
||||||
:- [[/ames]~ %pass /recork %b %wait `@da`(add now ~d1)]~
|
:- [[/ames]~ %pass /recork %b %wait `@da`(add now ~d1)]~
|
||||||
8+(state-7-to-8:load:adult-core +.u.cached-state)
|
8+(state-7-to-8:load:adult-core +.u.cached-state)
|
||||||
?> ?=(%8 -.u.cached-state)
|
=? u.cached-state ?=(%8 -.u.cached-state)
|
||||||
|
9+(state-8-to-9:load:adult-core +.u.cached-state)
|
||||||
|
=? u.cached-state ?=(%9 -.u.cached-state)
|
||||||
|
10+(state-9-to-10:load:adult-core +.u.cached-state)
|
||||||
|
?> ?=(%10 -.u.cached-state)
|
||||||
=. ames-state.adult-gate +.u.cached-state
|
=. ames-state.adult-gate +.u.cached-state
|
||||||
[moz larval-core(cached-state ~)]
|
[moz larval-core(cached-state ~)]
|
||||||
--
|
--
|
||||||
@ -1103,12 +1176,14 @@
|
|||||||
%jilt (on-jilt:event-core ship.task)
|
%jilt (on-jilt:event-core ship.task)
|
||||||
%prod (on-prod:event-core ships.task)
|
%prod (on-prod:event-core ships.task)
|
||||||
%sift (on-sift:event-core ships.task)
|
%sift (on-sift:event-core ships.task)
|
||||||
|
%snub (on-snub:event-core ships.task)
|
||||||
%spew (on-spew:event-core veb.task)
|
%spew (on-spew:event-core veb.task)
|
||||||
%stir (on-stir:event-core arg.task)
|
%stir (on-stir:event-core arg.task)
|
||||||
%trim on-trim:event-core
|
%trim on-trim:event-core
|
||||||
%vega on-vega:event-core
|
%vega on-vega:event-core
|
||||||
%plea (on-plea:event-core [ship plea]:task)
|
%plea (on-plea:event-core [ship plea]:task)
|
||||||
%cork (on-cork:event-core ship.task)
|
%cork (on-cork:event-core ship.task)
|
||||||
|
%kroc (on-kroc:event-core dry.task)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
[moves ames-gate]
|
[moves ames-gate]
|
||||||
@ -1139,15 +1214,15 @@
|
|||||||
[moves ames-gate]
|
[moves ames-gate]
|
||||||
:: +stay: extract state before reload
|
:: +stay: extract state before reload
|
||||||
::
|
::
|
||||||
++ stay [%8 %adult ames-state]
|
++ stay [%10 %adult ames-state]
|
||||||
:: +load: load in old state after reload
|
:: +load: load in old state after reload
|
||||||
::
|
::
|
||||||
++ load
|
++ load
|
||||||
=< |= $= old-state
|
=< |= $= old-state
|
||||||
$% [%8 ^ames-state]
|
$% [%10 ^ames-state]
|
||||||
==
|
==
|
||||||
^+ ames-gate
|
^+ ames-gate
|
||||||
?> ?=(%8 -.old-state)
|
?> ?=(%10 -.old-state)
|
||||||
ames-gate(ames-state +.old-state)
|
ames-gate(ames-state +.old-state)
|
||||||
::
|
::
|
||||||
|%
|
|%
|
||||||
@ -1211,7 +1286,7 @@
|
|||||||
::
|
::
|
||||||
++ state-7-to-8
|
++ state-7-to-8
|
||||||
|= ames-state=ames-state-7
|
|= ames-state=ames-state-7
|
||||||
^- ^^ames-state
|
^- ames-state-8
|
||||||
:* peers.ames-state
|
:* peers.ames-state
|
||||||
unix-duct.ames-state
|
unix-duct.ames-state
|
||||||
life.ames-state
|
life.ames-state
|
||||||
@ -1219,6 +1294,30 @@
|
|||||||
bug.ames-state
|
bug.ames-state
|
||||||
*(set wire)
|
*(set wire)
|
||||||
==
|
==
|
||||||
|
++ state-8-to-9
|
||||||
|
|= ames-state=ames-state-8
|
||||||
|
^- ames-state-9
|
||||||
|
:* peers.ames-state
|
||||||
|
unix-duct.ames-state
|
||||||
|
life.ames-state
|
||||||
|
crypto-core.ames-state
|
||||||
|
bug.ames-state
|
||||||
|
corks.ames-state
|
||||||
|
*(set ship)
|
||||||
|
==
|
||||||
|
++ state-9-to-10
|
||||||
|
|= ames-state=ames-state-9
|
||||||
|
^- ^^ames-state
|
||||||
|
:* peers.ames-state
|
||||||
|
unix-duct.ames-state
|
||||||
|
life.ames-state
|
||||||
|
crypto-core.ames-state
|
||||||
|
%= bug.ames-state
|
||||||
|
veb [&1 &2 &3 &4 &5 &6 |6 %.n]:veb.bug.ames-state
|
||||||
|
==
|
||||||
|
corks.ames-state
|
||||||
|
snub.ames-state
|
||||||
|
==
|
||||||
--
|
--
|
||||||
:: +scry: dereference namespace
|
:: +scry: dereference namespace
|
||||||
::
|
::
|
||||||
@ -1350,6 +1449,7 @@
|
|||||||
~% %event-gate ..per-event ~
|
~% %event-gate ..per-event ~
|
||||||
|= [[now=@da eny=@ rof=roof] =duct =ames-state]
|
|= [[now=@da eny=@ rof=roof] =duct =ames-state]
|
||||||
=* veb veb.bug.ames-state
|
=* veb veb.bug.ames-state
|
||||||
|
=| cork-bone=(unit bone) :: modified by +on-kroc
|
||||||
~% %event-core ..$ ~
|
~% %event-core ..$ ~
|
||||||
|%
|
|%
|
||||||
++ event-core .
|
++ event-core .
|
||||||
@ -1431,6 +1531,13 @@
|
|||||||
^+ event-core
|
^+ event-core
|
||||||
=. ships.bug.ames-state (sy ships)
|
=. ships.bug.ames-state (sy ships)
|
||||||
event-core
|
event-core
|
||||||
|
:: +on-snub: handle request to change ship blacklist
|
||||||
|
::
|
||||||
|
++ on-snub
|
||||||
|
|= ships=(list ship)
|
||||||
|
^+ event-core
|
||||||
|
=. snub.ames-state (sy ships)
|
||||||
|
event-core
|
||||||
:: +on-spew: handle request to set verbosity toggles on debug output
|
:: +on-spew: handle request to set verbosity toggles on debug output
|
||||||
::
|
::
|
||||||
++ on-spew
|
++ on-spew
|
||||||
@ -1450,6 +1557,7 @@
|
|||||||
%ges acc(ges %.y)
|
%ges acc(ges %.y)
|
||||||
%for acc(for %.y)
|
%for acc(for %.y)
|
||||||
%rot acc(rot %.y)
|
%rot acc(rot %.y)
|
||||||
|
%kay acc(kay %.y)
|
||||||
==
|
==
|
||||||
event-core
|
event-core
|
||||||
:: +on-prod: re-send a packet per flow to each of .ships
|
:: +on-prod: re-send a packet per flow to each of .ships
|
||||||
@ -1562,11 +1670,13 @@
|
|||||||
~/ %on-hear-packet
|
~/ %on-hear-packet
|
||||||
|= [=lane =packet dud=(unit goof)]
|
|= [=lane =packet dud=(unit goof)]
|
||||||
^+ event-core
|
^+ event-core
|
||||||
%- %^ trace odd.veb sndr.packet
|
%- (trace odd.veb sndr.packet |.("received packet"))
|
||||||
|.("received packet")
|
|
||||||
::
|
::
|
||||||
?: =(our sndr.packet)
|
?: =(our sndr.packet)
|
||||||
event-core
|
event-core
|
||||||
|
?: (~(has in snub.ames-state) sndr.packet)
|
||||||
|
%- (trace rcv.veb sndr.packet |.("snubbed"))
|
||||||
|
event-core
|
||||||
::
|
::
|
||||||
%. +<
|
%. +<
|
||||||
::
|
::
|
||||||
@ -1791,7 +1901,15 @@
|
|||||||
=/ =peer-state +.u.ship-state
|
=/ =peer-state +.u.ship-state
|
||||||
=/ =channel [[our ship] now channel-state -.peer-state]
|
=/ =channel [[our ship] now channel-state -.peer-state]
|
||||||
::
|
::
|
||||||
=^ =bone ossuary.peer-state (bind-duct ossuary.peer-state duct)
|
=/ [=bone ossuary=_ossuary.peer-state]
|
||||||
|
?^ cork-bone [u.cork-bone ossuary.peer-state]
|
||||||
|
(bind-duct ossuary.peer-state duct)
|
||||||
|
=. ossuary.peer-state ossuary
|
||||||
|
::
|
||||||
|
?. (~(has by by-bone.ossuary.peer-state) bone)
|
||||||
|
%. event-core
|
||||||
|
%^ trace odd.veb ship
|
||||||
|
|.("trying to cork {<bone=bone>}, not in the ossuary, ignoring")
|
||||||
::
|
::
|
||||||
=. closing.peer-state (~(put in closing.peer-state) bone)
|
=. closing.peer-state (~(put in closing.peer-state) bone)
|
||||||
%- %^ trace msg.veb ship
|
%- %^ trace msg.veb ship
|
||||||
@ -1800,6 +1918,68 @@
|
|||||||
=/ rcvr [ship her-life.channel]
|
=/ rcvr [ship her-life.channel]
|
||||||
"cork plea {<sndr rcvr bone=bone vane.plea path.plea>}"
|
"cork plea {<sndr rcvr bone=bone vane.plea path.plea>}"
|
||||||
abet:(on-memo:(make-peer-core peer-state channel) bone plea %plea)
|
abet:(on-memo:(make-peer-core peer-state channel) bone plea %plea)
|
||||||
|
:: +on-kroc: cork all flows from failed subscriptions
|
||||||
|
::
|
||||||
|
++ on-kroc
|
||||||
|
|= dry=?
|
||||||
|
^+ event-core
|
||||||
|
::
|
||||||
|
=; [corks=@ core=_event-core]
|
||||||
|
?. dry core
|
||||||
|
%.(core (slog leaf/"ames: #{<corks>} flows can be corked" ~))
|
||||||
|
::
|
||||||
|
%+ roll ~(tap by peers.ames-state)
|
||||||
|
|= [[=ship =ship-state] corks=@ core=_event-core]
|
||||||
|
?. ?=(%known -.ship-state)
|
||||||
|
corks^core
|
||||||
|
=/ =peer-state:ames ?>(?=(%known -.ship-state) +.ship-state)
|
||||||
|
=/ subs=(jar path [bone sub-nonce=@])
|
||||||
|
%+ roll ~(tap by snd.peer-state)
|
||||||
|
|= [[=forward=bone *] subs=(jar path [bone sub-nonce=@])]
|
||||||
|
?: (~(has in closing.peer-state) forward-bone)
|
||||||
|
subs
|
||||||
|
?~ duct=(~(get by by-bone.ossuary.peer-state) forward-bone)
|
||||||
|
subs
|
||||||
|
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
|
||||||
|
subs
|
||||||
|
=/ =wire i.t.u.duct
|
||||||
|
=/ nonce=(unit @) (rush (snag 7 wire) dem)
|
||||||
|
%- ~(add ja subs)
|
||||||
|
:: 0 for old pre-nonce subscriptions
|
||||||
|
::
|
||||||
|
:_ [forward-bone ?~(nonce 0 u.nonce)]
|
||||||
|
?~ nonce wire
|
||||||
|
:: don't include the sub-nonce in the key
|
||||||
|
::
|
||||||
|
(weld (scag 7 wire) (slag 8 wire))
|
||||||
|
%+ roll ~(tap by subs)
|
||||||
|
|= [[=wire flows=(list [bone sub-nonce=@])] corks=_corks core=_core]
|
||||||
|
::
|
||||||
|
%- tail
|
||||||
|
%+ roll (sort flows |=([[@ n=@] [@ m=@]] (lte n m)))
|
||||||
|
|= [[=bone nonce=@] resubs=_(lent flows) corks=_corks core=_core]
|
||||||
|
=/ app=term ?>(?=([%gall %use sub=@ *] wire) i.t.t.wire)
|
||||||
|
=/ =path (slag 7 wire)
|
||||||
|
=/ log=tape "[bone={<bone>} agent={<app>} nonce={<nonce>}] {<path>}"
|
||||||
|
=; corkable=?
|
||||||
|
=? corks corkable +(corks)
|
||||||
|
=? core &(corkable !dry) (%*(on-cork core cork-bone `bone) ship)
|
||||||
|
(dec resubs)^corks^core
|
||||||
|
:: checks if this is a stale re-subscription
|
||||||
|
::
|
||||||
|
?. =(resubs 1)
|
||||||
|
%. &
|
||||||
|
(trace &(dry odd.veb) ship |.((weld "stale %watch plea " log)))
|
||||||
|
:: the current subscription can be safely corked if there
|
||||||
|
:: is a flow with a naxplanation ack on a backward bone
|
||||||
|
::
|
||||||
|
=+ backward-bone=(mix 0b10 bone)
|
||||||
|
?. =(2 (mod backward-bone 4))
|
||||||
|
|
|
||||||
|
?~ (~(get by rcv.peer-state) backward-bone)
|
||||||
|
|
|
||||||
|
%. &
|
||||||
|
(trace &(dry odd.veb) ship |.((weld "failed %watch plea " log)))
|
||||||
:: +on-take-wake: receive wakeup or error notification from behn
|
:: +on-take-wake: receive wakeup or error notification from behn
|
||||||
::
|
::
|
||||||
++ on-take-wake
|
++ on-take-wake
|
||||||
@ -1957,7 +2137,9 @@
|
|||||||
=. +.peer-state +:*^peer-state
|
=. +.peer-state +:*^peer-state
|
||||||
:: print change to quality of service, if any
|
:: print change to quality of service, if any
|
||||||
::
|
::
|
||||||
=/ text=(unit tape) (qos-update-text ship old-qos qos.peer-state)
|
=/ text=(unit tape)
|
||||||
|
%^ qos-update-text ship old-qos
|
||||||
|
[qos.peer-state kay.veb ships.bug.ames-state]
|
||||||
::
|
::
|
||||||
=? event-core ?=(^ text)
|
=? event-core ?=(^ text)
|
||||||
(emit duct %pass /qos %d %flog %text u.text)
|
(emit duct %pass /qos %d %flog %text u.text)
|
||||||
@ -2362,7 +2544,10 @@
|
|||||||
=^ old-qos qos.peer-state [qos.peer-state new-qos]
|
=^ old-qos qos.peer-state [qos.peer-state new-qos]
|
||||||
:: if no update worth reporting, we're done
|
:: if no update worth reporting, we're done
|
||||||
::
|
::
|
||||||
?~ text=(qos-update-text her.channel old-qos new-qos)
|
=/ text
|
||||||
|
%^ qos-update-text her.channel old-qos
|
||||||
|
[new-qos kay.veb ships.bug.ames-state]
|
||||||
|
?~ text
|
||||||
peer-core
|
peer-core
|
||||||
:: print message
|
:: print message
|
||||||
::
|
::
|
||||||
|
@ -191,19 +191,6 @@
|
|||||||
[%1 peg=(unit page)]
|
[%1 peg=(unit page)]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: Global ford cache
|
|
||||||
::
|
|
||||||
:: Refcount includes references from other items in the cache, and
|
|
||||||
:: from spills in each desk
|
|
||||||
::
|
|
||||||
:: This is optimized for minimizing the number of rebuilds, and given
|
|
||||||
:: that, minimizing the amount of memory used. It is relatively slow
|
|
||||||
:: to lookup, because generating a cache key can be fairly slow (for
|
|
||||||
:: files, it requires parsing; for tubes, it even requires building
|
|
||||||
:: the marks).
|
|
||||||
::
|
|
||||||
+$ flow (map leak [refs=@ud =soak])
|
|
||||||
::
|
|
||||||
:: Per-desk ford cache
|
:: Per-desk ford cache
|
||||||
::
|
::
|
||||||
:: Spill is the set of "roots" we have into the global ford cache.
|
:: Spill is the set of "roots" we have into the global ford cache.
|
||||||
@ -228,41 +215,6 @@
|
|||||||
[%arch =path]
|
[%arch =path]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: Ford build with content.
|
|
||||||
::
|
|
||||||
+$ pour
|
|
||||||
$% [%file =path]
|
|
||||||
[%nave =mark]
|
|
||||||
[%dais =mark]
|
|
||||||
[%cast =mars]
|
|
||||||
[%tube =mars]
|
|
||||||
:: leafs
|
|
||||||
::
|
|
||||||
[%vale =path =lobe]
|
|
||||||
[%arch =path =(map path lobe)]
|
|
||||||
==
|
|
||||||
::
|
|
||||||
:: Ford result.
|
|
||||||
::
|
|
||||||
+$ soak
|
|
||||||
$% [%cage =cage]
|
|
||||||
[%vase =vase]
|
|
||||||
[%arch dir=(map @ta vase)]
|
|
||||||
[%dais =dais]
|
|
||||||
[%tube =tube]
|
|
||||||
==
|
|
||||||
::
|
|
||||||
:: Ford cache key
|
|
||||||
::
|
|
||||||
:: This includes all build inputs, including transitive dependencies,
|
|
||||||
:: recursively.
|
|
||||||
::
|
|
||||||
+$ leak
|
|
||||||
$~ [*pour ~]
|
|
||||||
$: =pour
|
|
||||||
deps=(set leak)
|
|
||||||
==
|
|
||||||
::
|
|
||||||
:: New desk data.
|
:: New desk data.
|
||||||
::
|
::
|
||||||
:: Sent to other ships to update them about a particular desk.
|
:: Sent to other ships to update them about a particular desk.
|
||||||
@ -432,7 +384,10 @@
|
|||||||
task ::
|
task ::
|
||||||
== ::
|
== ::
|
||||||
$: %d :: to %dill
|
$: %d :: to %dill
|
||||||
$>(%flog task:dill) ::
|
$> $? %flog ::
|
||||||
|
%text ::
|
||||||
|
== ::
|
||||||
|
task:dill ::
|
||||||
== ::
|
== ::
|
||||||
$: %g :: to %gall
|
$: %g :: to %gall
|
||||||
$> $? %deal
|
$> $? %deal
|
||||||
@ -460,14 +415,13 @@
|
|||||||
== == ::
|
== == ::
|
||||||
$: %clay ::
|
$: %clay ::
|
||||||
$> $? %mere ::
|
$> $? %mere ::
|
||||||
%note ::
|
|
||||||
%writ ::
|
%writ ::
|
||||||
|
%wris ::
|
||||||
== ::
|
== ::
|
||||||
gift ::
|
gift ::
|
||||||
== ::
|
== ::
|
||||||
$: %gall
|
$: %gall
|
||||||
$> $? %onto
|
$> $? %unto
|
||||||
%unto
|
|
||||||
==
|
==
|
||||||
gift:gall
|
gift:gall
|
||||||
==
|
==
|
||||||
@ -2209,7 +2163,8 @@
|
|||||||
|= [prefix=@tD paths=(set path)]
|
|= [prefix=@tD paths=(set path)]
|
||||||
%+ turn ~(tap in paths)
|
%+ turn ~(tap in paths)
|
||||||
|= =path
|
|= =path
|
||||||
[u.hun %give %note prefix (path-to-tank path)]
|
^- move
|
||||||
|
[u.hun %pass /note %d %text prefix ' ' ~(ram re (path-to-tank path))]
|
||||||
::
|
::
|
||||||
++ path-to-tank
|
++ path-to-tank
|
||||||
|= =path
|
|= =path
|
||||||
@ -4205,8 +4160,36 @@
|
|||||||
:: +read-s: produce miscellaneous
|
:: +read-s: produce miscellaneous
|
||||||
::
|
::
|
||||||
++ read-s
|
++ read-s
|
||||||
|= [yon=aeon pax=path]
|
|= [yon=aeon pax=path =case]
|
||||||
^- (unit (unit cage))
|
^- (unit (unit cage))
|
||||||
|
?: ?=([%subs ~] pax)
|
||||||
|
?. =([%da now] case) ~
|
||||||
|
=| sus=(set ship)
|
||||||
|
=/ doj=(unit dojo) (~(get by dos.rom) syd)
|
||||||
|
?~ doj
|
||||||
|
``noun+!>(sus)
|
||||||
|
=/ wos ~(tap in ~(key by qyx.u.doj))
|
||||||
|
|-
|
||||||
|
?~ wos
|
||||||
|
``noun+!>(sus)
|
||||||
|
?~ for.i.wos
|
||||||
|
$(wos t.wos)
|
||||||
|
%= $
|
||||||
|
wos t.wos
|
||||||
|
sus (~(put in sus) ship.u.for.i.wos)
|
||||||
|
==
|
||||||
|
?: ?=([%bloc ~] pax)
|
||||||
|
:^ ~ ~ %noun
|
||||||
|
:- -:!>(*(map lobe page))
|
||||||
|
^- (map lobe page)
|
||||||
|
%- %~ rep in
|
||||||
|
%- reachable-takos
|
||||||
|
(~(got by hit.dom) let.dom)
|
||||||
|
|= [t=tako o=(map lobe page)]
|
||||||
|
%- ~(gas by o)
|
||||||
|
%+ turn
|
||||||
|
~(val by q:(~(got by hut.ran) t))
|
||||||
|
|=(l=lobe [l (~(got by lat.ran) l)])
|
||||||
?. ?=([@ * *] pax)
|
?. ?=([@ * *] pax)
|
||||||
`~
|
`~
|
||||||
?+ i.pax `~
|
?+ i.pax `~
|
||||||
@ -4460,7 +4443,7 @@
|
|||||||
%f (read-f yon path.mun)
|
%f (read-f yon path.mun)
|
||||||
%p [(read-p path.mun) ..park]
|
%p [(read-p path.mun) ..park]
|
||||||
%r (read-r yon path.mun)
|
%r (read-r yon path.mun)
|
||||||
%s [(read-s yon path.mun) ..park]
|
%s [(read-s yon path.mun case.mun) ..park]
|
||||||
%t [(read-t yon path.mun) ..park]
|
%t [(read-t yon path.mun) ..park]
|
||||||
%u [(read-u yon path.mun) ..park]
|
%u [(read-u yon path.mun) ..park]
|
||||||
%v [(read-v yon path.mun) ..park]
|
%v [(read-v yon path.mun) ..park]
|
||||||
@ -4910,6 +4893,9 @@
|
|||||||
=/ den ((de now rof hen ruf) our syd)
|
=/ den ((de now rof hen ruf) our syd)
|
||||||
abet:(park:den & & yoki *rang)
|
abet:(park:den & & yoki *rang)
|
||||||
[mos ..^$]
|
[mos ..^$]
|
||||||
|
::
|
||||||
|
%prep
|
||||||
|
[~ ..^$(lat.ran.ruf (~(uni by lat.req) lat.ran.ruf))]
|
||||||
::
|
::
|
||||||
%perm
|
%perm
|
||||||
=^ mos ruf
|
=^ mos ruf
|
||||||
@ -5644,6 +5630,8 @@
|
|||||||
%sweep ``[%sweep !>(sweep)]
|
%sweep ``[%sweep !>(sweep)]
|
||||||
%rang ``[%rang !>(ran.ruf)]
|
%rang ``[%rang !>(ran.ruf)]
|
||||||
%tomb ``[%flag !>((tomb t.path))]
|
%tomb ``[%flag !>((tomb t.path))]
|
||||||
|
%cult ``[%cult !>((cult t.path))]
|
||||||
|
%flow ``[%flow !>(fad.ruf)]
|
||||||
%domes domes
|
%domes domes
|
||||||
%tire ``[%tire !>(tore:(lu now rof *duct ruf))]
|
%tire ``[%tire !>(tore:(lu now rof *duct ruf))]
|
||||||
%tyre ``[%tyre !>(tyr.ruf)]
|
%tyre ``[%tyre !>(tyr.ruf)]
|
||||||
@ -5669,6 +5657,22 @@
|
|||||||
[[ship desk] [[let hit lab] tom nor liv ren]:dom.rede]
|
[[ship desk] [[let hit lab] tom nor liv ren]:dom.rede]
|
||||||
``[%domes !>(`cone`domes)]
|
``[%domes !>(`cone`domes)]
|
||||||
::
|
::
|
||||||
|
++ cult
|
||||||
|
|= =path
|
||||||
|
^- (set [@p rave])
|
||||||
|
%- %~ run in
|
||||||
|
%~ key by
|
||||||
|
?~ path *^cult
|
||||||
|
qyx:(~(gut by dos.rom.ruf) i.path *dojo)
|
||||||
|
|= wove
|
||||||
|
:- ship:(fall for [ship=our @ud])
|
||||||
|
?- -.rove
|
||||||
|
%sing rove
|
||||||
|
%next [%next mood.rove]
|
||||||
|
%mult [%mult mool.rove]
|
||||||
|
%many [%many [track moat]:rove]
|
||||||
|
==
|
||||||
|
::
|
||||||
:: True if file is accessible
|
:: True if file is accessible
|
||||||
::
|
::
|
||||||
++ tomb
|
++ tomb
|
||||||
@ -5774,8 +5778,6 @@
|
|||||||
?^ dud
|
?^ dud
|
||||||
~|(%clay-take-dud (mean tang.u.dud))
|
~|(%clay-take-dud (mean tang.u.dud))
|
||||||
?: ?=([%lu %load *] tea)
|
?: ?=([%lu %load *] tea)
|
||||||
?: ?=(%onto +<.hin)
|
|
||||||
[~ ..^$]
|
|
||||||
?> ?=(%unto +<.hin)
|
?> ?=(%unto +<.hin)
|
||||||
?> ?=(%poke-ack -.p.hin)
|
?> ?=(%poke-ack -.p.hin)
|
||||||
?~ p.p.hin
|
?~ p.p.hin
|
||||||
@ -5822,6 +5824,7 @@
|
|||||||
[mos ..^$]
|
[mos ..^$]
|
||||||
::
|
::
|
||||||
?: ?=([%foreign-warp *] tea)
|
?: ?=([%foreign-warp *] tea)
|
||||||
|
?: ?=(%wris +<.hin) ~& %dropping-wris `..^$
|
||||||
?> ?=(%writ +<.hin)
|
?> ?=(%writ +<.hin)
|
||||||
:_ ..^$
|
:_ ..^$
|
||||||
[hen %give %boon `(unit rand)`(bind `riot`p.hin rant-to-rand)]~
|
[hen %give %boon `(unit rand)`(bind `riot`p.hin rant-to-rand)]~
|
||||||
@ -5950,7 +5953,6 @@
|
|||||||
q.p.p.+.hin
|
q.p.p.+.hin
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
::
|
::
|
||||||
%note [[hen %give +.hin]~ ..^$]
|
|
||||||
%wake
|
%wake
|
||||||
:: TODO: handle behn errors
|
:: TODO: handle behn errors
|
||||||
::
|
::
|
||||||
@ -5973,8 +5975,8 @@
|
|||||||
::
|
::
|
||||||
%boon !!
|
%boon !!
|
||||||
%lost !!
|
%lost !!
|
||||||
%onto !!
|
|
||||||
%unto !!
|
%unto !!
|
||||||
|
%wris ~& %strange-wris !!
|
||||||
%writ
|
%writ
|
||||||
%- (slog leaf+"clay: strange writ (expected on upgrade to Fusion)" ~)
|
%- (slog leaf+"clay: strange writ (expected on upgrade to Fusion)" ~)
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
|
@ -8,27 +8,26 @@
|
|||||||
-- ::
|
-- ::
|
||||||
=> |% :: console protocol
|
=> |% :: console protocol
|
||||||
+$ axle ::
|
+$ axle ::
|
||||||
$: %4 ::TODO replace ducts with session ids ::
|
$: %6 ::
|
||||||
hey=(unit duct) :: default duct
|
hey=(unit duct) :: default duct
|
||||||
dug=(map duct axon) :: conversations
|
dug=(map @tas axon) :: conversations
|
||||||
eye=(jug duct duct) :: outside listeners
|
eye=(jug @tas duct) :: outside listeners
|
||||||
lit=? :: boot in lite mode
|
lit=? :: boot in lite mode
|
||||||
$= veb :: vane verbosities
|
$= veb :: vane verbosities
|
||||||
$~ (~(put by *(map @tas log-level)) %hole %soft) :: quiet packet crashes
|
$~ (~(put by *(map @tas log-level)) %hole %soft) :: quiet packet crashes
|
||||||
(map @tas log-level) ::
|
(map @tas log-level) ::
|
||||||
|
egg=_| :: see +take, removeme
|
||||||
== ::
|
== ::
|
||||||
+$ axon :: dill per duct
|
+$ axon :: dill session
|
||||||
$: ram=term :: console program
|
$: ram=term :: console program
|
||||||
tem=(unit (list dill-belt)) :: pending, reverse
|
tem=(unit (list dill-belt)) :: pending, reverse
|
||||||
wid=_80 :: terminal width
|
wid=_80 :: terminal width
|
||||||
pos=@ud :: cursor position
|
|
||||||
see=$%([%lin (list @c)] [%klr stub]) :: current line
|
|
||||||
== ::
|
== ::
|
||||||
+$ log-level ?(%hush %soft %loud) :: none, line, full
|
+$ log-level ?(%hush %soft %loud) :: none, line, full
|
||||||
-- => ::
|
-- => ::
|
||||||
|% :: protocol outward
|
|% :: protocol outward
|
||||||
+$ mess ::
|
+$ mess ::
|
||||||
$% [%dill-belt p=(hypo dill-belt)] ::
|
$% [%dill-poke p=(hypo poke)] ::
|
||||||
== ::
|
== ::
|
||||||
+$ move [p=duct q=(wind note gift)] :: local move
|
+$ move [p=duct q=(wind note gift)] :: local move
|
||||||
+$ note :: out request $->
|
+$ note :: out request $->
|
||||||
@ -69,7 +68,6 @@
|
|||||||
== == ::
|
== == ::
|
||||||
$: %clay ::
|
$: %clay ::
|
||||||
$> $? %mere ::
|
$> $? %mere ::
|
||||||
%note ::
|
|
||||||
%writ ::
|
%writ ::
|
||||||
== ::
|
== ::
|
||||||
gift:clay ::
|
gift:clay ::
|
||||||
@ -78,10 +76,7 @@
|
|||||||
$>(%blit gift:dill) ::
|
$>(%blit gift:dill) ::
|
||||||
== ::
|
== ::
|
||||||
$: %gall ::
|
$: %gall ::
|
||||||
$> $? %onto ::
|
$>(%unto gift:gall) ::
|
||||||
%unto ::
|
|
||||||
== ::
|
|
||||||
gift:gall ::
|
|
||||||
== == ::
|
== == ::
|
||||||
:::::::: :: dill tiles
|
:::::::: :: dill tiles
|
||||||
--
|
--
|
||||||
@ -91,39 +86,32 @@
|
|||||||
|%
|
|%
|
||||||
++ as :: per cause
|
++ as :: per cause
|
||||||
=| moz=(list move)
|
=| moz=(list move)
|
||||||
|_ [hen=duct axon]
|
|_ [hen=duct ses=@tas axon]
|
||||||
++ abet :: resolve
|
++ abet :: resolve
|
||||||
^- [(list move) axle]
|
^- [(list move) axle]
|
||||||
[(flop moz) all(dug (~(put by dug.all) hen +<+))]
|
[(flop moz) all(dug (~(put by dug.all) ses +<+>))]
|
||||||
::
|
::
|
||||||
++ call :: receive input
|
++ call :: receive input
|
||||||
|= kyz=task
|
|= kyz=task
|
||||||
^+ +>
|
^+ +>
|
||||||
?+ -.kyz ~& [%strange-kiss -.kyz] +>
|
?+ -.kyz ~& [%strange-kiss -.kyz] +>
|
||||||
%flow +>
|
%hail (send %hey ~)
|
||||||
%harm +>
|
%belt (send `dill-belt`p.kyz)
|
||||||
%hail (send %hey ~)
|
%talk (talk p.kyz)
|
||||||
%text (from %out (tuba p.kyz))
|
%text (fore (tuba p.kyz) ~)
|
||||||
%crud :: (send `dill-belt`[%cru p.kyz q.kyz])
|
%crud :: (send `dill-belt`[%cru p.kyz q.kyz])
|
||||||
(crud p.kyz q.kyz)
|
(crud p.kyz q.kyz)
|
||||||
%blew (send %rez p.p.kyz q.p.kyz)
|
%blew (send(wid p.p.kyz) %rez p.p.kyz q.p.kyz)
|
||||||
%heft (pass /whey %$ whey/~)
|
%heft (pass /whey %$ whey/~)
|
||||||
%meld (dump kyz)
|
%meld (dump kyz)
|
||||||
%pack (dump kyz)
|
%pack (dump kyz)
|
||||||
%crop (dump trim+p.kyz)
|
%crop (dump trim+p.kyz)
|
||||||
%verb (pass /verb %$ kyz)
|
%verb (pass /verb %$ kyz)
|
||||||
%noop +>
|
::
|
||||||
%belt
|
%seat
|
||||||
%- send
|
%^ pass /seat %g
|
||||||
::TMP forwards compatibility with next-dill
|
:+ %deal [our our]
|
||||||
::
|
[%hood %poke %kiln-install !>([desk.kyz our desk.kyz])]
|
||||||
?@ p.kyz [%txt p.kyz ~]
|
|
||||||
?: ?=(%hit -.p.kyz) [%txt ~]
|
|
||||||
?. ?=(%mod -.p.kyz) p.kyz
|
|
||||||
=/ =@c
|
|
||||||
?@ key.p.kyz key.p.kyz
|
|
||||||
?:(?=(?(%bac %del %ret) -.key.p.kyz) `@`-.key.p.kyz ~-)
|
|
||||||
?:(?=(%met mod.p.kyz) [%met c] [%ctl c])
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ crud
|
++ crud
|
||||||
@ -133,30 +121,30 @@
|
|||||||
=/ lev=log-level (~(gut by veb.all) err %loud)
|
=/ lev=log-level (~(gut by veb.all) err %loud)
|
||||||
:: apply log level for this error tag
|
:: apply log level for this error tag
|
||||||
::
|
::
|
||||||
=/ =wall
|
?- lev
|
||||||
?- lev
|
%hush +>.$
|
||||||
%hush ~
|
%soft (fore (tuba "crud: %{(trip err)} event failed") ~)
|
||||||
%soft ~["crud: %{(trip err)} event failed"]
|
%loud (talk leaf+"crud: %{(trip err)} event failed" (flop tac))
|
||||||
%loud :- "crud: %{(trip err)} event failed"
|
==
|
||||||
%- zing
|
::
|
||||||
%+ turn (flop tac)
|
++ talk
|
||||||
|=(a=tank (~(win re a) [0 wid]))
|
|= tac=(list tank)
|
||||||
==
|
%- fore
|
||||||
|- ^+ +>.^$
|
%- zing
|
||||||
?~ wall +>.^$
|
%+ turn tac
|
||||||
$(wall t.wall, +>.^$ (from %out (tuba i.wall)))
|
|= a=tank
|
||||||
|
(turn (~(win re a) [0 wid]) tuba)
|
||||||
::
|
::
|
||||||
++ dump :: pass down to hey
|
++ dump :: pass down to hey
|
||||||
|= git=gift
|
|= git=gift
|
||||||
?> ?=(^ hey.all)
|
?> ?=(^ hey.all)
|
||||||
+>(moz [[u.hey.all %give git] moz])
|
+>(moz [[u.hey.all %give git] moz])
|
||||||
::
|
::
|
||||||
++ done :: return gift
|
++ done :: gift to viewers
|
||||||
|= git=gift
|
|= git=gift
|
||||||
=- +>.$(moz (weld - moz))
|
=- +>.$(moz (weld - moz))
|
||||||
%+ turn
|
%+ turn
|
||||||
:- hen
|
~(tap in (~(get ju eye.all) ses))
|
||||||
~(tap in (~(get ju eye.all) hen))
|
|
||||||
|=(=duct [duct %give git])
|
|=(=duct [duct %give git])
|
||||||
::
|
::
|
||||||
++ deal :: pass to %gall
|
++ deal :: pass to %gall
|
||||||
@ -167,44 +155,37 @@
|
|||||||
|= [=wire =note]
|
|= [=wire =note]
|
||||||
+>(moz :_(moz [hen %pass wire note]))
|
+>(moz :_(moz [hen %pass wire note]))
|
||||||
::
|
::
|
||||||
|
++ fore :: send dill output
|
||||||
|
::NOTE there are still implicit assumptions
|
||||||
|
:: about the underlying console app's
|
||||||
|
:: semantics here. specifically, trailing
|
||||||
|
:: newlines are important to not getting
|
||||||
|
:: overwritten by the drum prompt, and a
|
||||||
|
:: bottom-of-screen cursor position gives
|
||||||
|
:: nicest results. a more agnostic solution
|
||||||
|
:: will need to replace this arm, someday.
|
||||||
|
:: perhaps +send this to .ram instead?
|
||||||
|
::
|
||||||
|
|= liz=(list (list @c))
|
||||||
|
~? !=(%$ ses) [%d %foreing-in-session ses]
|
||||||
|
^+ +>
|
||||||
|
=. +>
|
||||||
|
=| biz=(list blit)
|
||||||
|
|- ^+ +>.^$
|
||||||
|
?~ liz (done %blit [%hop 0] [%wyp ~] biz)
|
||||||
|
$(liz t.liz, biz (welp biz [%put i.liz] [%nel ~] ~))
|
||||||
|
:: since dill is acting on its own accord,
|
||||||
|
:: we %hey the term app so it may clean up.
|
||||||
|
::
|
||||||
|
(send %hey ~)
|
||||||
|
::
|
||||||
++ from :: receive blit
|
++ from :: receive blit
|
||||||
|= bit=dill-blit
|
|= bit=dill-blit
|
||||||
^+ +>
|
^+ +>
|
||||||
?: ?=(%mor -.bit)
|
|
||||||
|- ^+ +>.^$
|
|
||||||
?~ p.bit +>.^$
|
|
||||||
$(p.bit t.p.bit, +>.^$ ^$(bit i.p.bit))
|
|
||||||
?: ?=(%out -.bit)
|
|
||||||
%+ done %blit
|
|
||||||
:~ [%lin p.bit]
|
|
||||||
[%mor ~]
|
|
||||||
see
|
|
||||||
[%hop pos]
|
|
||||||
==
|
|
||||||
?: ?=(%klr -.bit)
|
|
||||||
%+ done %blit
|
|
||||||
:~ [%klr p.bit]
|
|
||||||
[%mor ~]
|
|
||||||
see
|
|
||||||
[%hop pos]
|
|
||||||
==
|
|
||||||
?: ?=(%pro -.bit)
|
|
||||||
=. see [%lin p.bit]
|
|
||||||
(done %blit [see [%hop pos] ~])
|
|
||||||
?: ?=(%pom -.bit)
|
|
||||||
::NOTE treat "styled prompt" without style as plain prompt,
|
|
||||||
:: to allow rendering by older runtimes
|
|
||||||
::TODO remove me once v0.10.9+ has high/guaranteed adoption
|
|
||||||
::
|
|
||||||
?: (levy p.bit (cork head |*(s=stye =(*stye s))))
|
|
||||||
$(bit [%pro (zing (turn p.bit tail))])
|
|
||||||
=. see [%klr p.bit]
|
|
||||||
(done %blit [see [%hop pos] ~])
|
|
||||||
?: ?=(%hop -.bit)
|
|
||||||
(done(pos p.bit) %blit [bit ~])
|
|
||||||
?: ?=(%qit -.bit)
|
?: ?=(%qit -.bit)
|
||||||
(dump %logo ~)
|
(dump %logo ~)
|
||||||
(done %blit [bit ~])
|
::TODO so why is this a (list blit) again?
|
||||||
|
(done %blit bit ~)
|
||||||
::
|
::
|
||||||
++ sponsor
|
++ sponsor
|
||||||
^- ship
|
^- ship
|
||||||
@ -221,7 +202,7 @@
|
|||||||
=. tem ~
|
=. tem ~
|
||||||
=. ..mere (pass /zest %c %zest %base %live)
|
=. ..mere (pass /zest %c %zest %base %live)
|
||||||
=. ..mere (show-desk %kids)
|
=. ..mere (show-desk %kids)
|
||||||
=. ..mere drum-watch
|
=. ..mere (open ~)
|
||||||
|- ^+ ..mere
|
|- ^+ ..mere
|
||||||
?~ myt ..mere
|
?~ myt ..mere
|
||||||
$(myt t.myt, ..mere (send i.myt))
|
$(myt t.myt, ..mere (send i.myt))
|
||||||
@ -231,15 +212,27 @@
|
|||||||
=. tem `(turn gyl |=(a=gill [%yow a]))
|
=. tem `(turn gyl |=(a=gill [%yow a]))
|
||||||
(pass / [%c %warp our %base `[%sing %y [%ud 1] /]])
|
(pass / [%c %warp our %base `[%sing %y [%ud 1] /]])
|
||||||
::
|
::
|
||||||
|
++ open
|
||||||
|
|= gyl=(list gill)
|
||||||
|
::TODO should allow handlers from non-base desks
|
||||||
|
::TODO maybe ensure :ram is running?
|
||||||
|
=. +> peer
|
||||||
|
%+ roll gyl
|
||||||
|
|= [g=gill _..open]
|
||||||
|
(send [%yow g])
|
||||||
|
::
|
||||||
++ send :: send action
|
++ send :: send action
|
||||||
|= bet=dill-belt
|
|= bet=dill-belt
|
||||||
^+ +>
|
^+ +>
|
||||||
?^ tem
|
?^ tem
|
||||||
+>(tem `[bet u.tem])
|
+>(tem `[bet u.tem])
|
||||||
(deal / [%poke [%dill-belt -:!>(bet) bet]])
|
(deal /send/[ses] [%poke [%dill-poke !>([ses bet])]])
|
||||||
::
|
::
|
||||||
++ drum-watch
|
++ peer
|
||||||
(deal / [%watch /drum])
|
(deal /peer/[ses] %watch /dill/[ses])
|
||||||
|
::
|
||||||
|
++ pull
|
||||||
|
(deal /peer/[ses] %leave ~)
|
||||||
::
|
::
|
||||||
++ show-desk :: permit reads on desk
|
++ show-desk :: permit reads on desk
|
||||||
|= des=desk
|
|= des=desk
|
||||||
@ -249,21 +242,11 @@
|
|||||||
|= [tea=wire sih=sign]
|
|= [tea=wire sih=sign]
|
||||||
^+ +>
|
^+ +>
|
||||||
?- sih
|
?- sih
|
||||||
[%gall %onto *]
|
|
||||||
:: NOTE effects during initial boot sequence are ignored,
|
|
||||||
:: so :hood compilation errors will not print; slog if desired
|
|
||||||
::
|
|
||||||
:: ~& [%take-gall-onto +>.sih]
|
|
||||||
?- -.+>.sih
|
|
||||||
%| (crud %onto p.p.+>.sih)
|
|
||||||
%& (done %blit [%lin (tuba "{<p.p.sih>}")]~)
|
|
||||||
==
|
|
||||||
::
|
|
||||||
[%gall %unto *]
|
[%gall %unto *]
|
||||||
:: ~& [%take-gall-unto +>.sih]
|
:: ~& [%take-gall-unto +>.sih]
|
||||||
?- -.+>.sih
|
?- -.+>.sih
|
||||||
%raw-fact !!
|
%raw-fact !!
|
||||||
%kick drum-watch
|
%kick peer
|
||||||
%poke-ack ?~(p.p.+>.sih +>.$ (crud %coup u.p.p.+>.sih))
|
%poke-ack ?~(p.p.+>.sih +>.$ (crud %coup u.p.p.+>.sih))
|
||||||
%watch-ack
|
%watch-ack
|
||||||
?~ p.p.+>.sih
|
?~ p.p.+>.sih
|
||||||
@ -275,9 +258,6 @@
|
|||||||
+>.$
|
+>.$
|
||||||
(from ;;(dill-blit q.q.cage.p.+>.sih))
|
(from ;;(dill-blit q.q.cage.p.+>.sih))
|
||||||
==
|
==
|
||||||
::
|
|
||||||
[%clay %note *]
|
|
||||||
(from %out (tuba p.sih ' ' ~(ram re q.sih)))
|
|
||||||
::
|
::
|
||||||
[?(%behn %clay) %writ *]
|
[?(%behn %clay) %writ *]
|
||||||
init
|
init
|
||||||
@ -292,12 +272,20 @@
|
|||||||
==
|
==
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ ax :: make ++as
|
++ ax :: make ++as from name
|
||||||
|= hen=duct
|
|= [hen=duct ses=@tas]
|
||||||
^- (unit _as)
|
^- (unit _as)
|
||||||
=/ nux (~(get by dug.all) hen)
|
=/ nux (~(get by dug.all) ses)
|
||||||
?~ nux ~
|
?~ nux ~
|
||||||
(some ~(. as hen u.nux))
|
(some ~(. as hen ses u.nux))
|
||||||
|
::
|
||||||
|
++ aw :: make ++as from wire
|
||||||
|
|= [hen=duct wir=wire]
|
||||||
|
^- (unit _as)
|
||||||
|
%+ ax hen
|
||||||
|
?+ wir %$
|
||||||
|
[?(%peer %send) @ *] i.t.wir
|
||||||
|
==
|
||||||
--
|
--
|
||||||
|% :: poke+peek pattern
|
|% :: poke+peek pattern
|
||||||
++ call :: handle request
|
++ call :: handle request
|
||||||
@ -308,7 +296,10 @@
|
|||||||
^+ [*(list move) ..^$]
|
^+ [*(list move) ..^$]
|
||||||
~| wrapped-task
|
~| wrapped-task
|
||||||
=/ task=task ((harden task) wrapped-task)
|
=/ task=task ((harden task) wrapped-task)
|
||||||
|
:: unwrap session tasks, default to session %$
|
||||||
::
|
::
|
||||||
|
=^ ses=@tas task
|
||||||
|
?:(?=(%shot -.task) +.task [%$ task])
|
||||||
:: error notifications "downcast" to %crud
|
:: error notifications "downcast" to %crud
|
||||||
::
|
::
|
||||||
=? task ?=(^ dud)
|
=? task ?=(^ dud)
|
||||||
@ -338,10 +329,11 @@
|
|||||||
::
|
::
|
||||||
=* duc (need hey.all)
|
=* duc (need hey.all)
|
||||||
=/ app %hood
|
=/ app %hood
|
||||||
=/ see (tuba "<awaiting {(trip app)}, this may take a minute>")
|
=/ say (tuba "<awaiting {(trip app)}, this may take a minute>")
|
||||||
=/ zon=axon [app input=[~ ~] width=80 cursor=(lent see) lin+see]
|
=/ zon=axon [app input=[~ ~] width=80]
|
||||||
::
|
::
|
||||||
=^ moz all abet:(~(into as duc zon) ~)
|
=^ moz all abet:(~(into as duc %$ zon) ~)
|
||||||
|
=. eye.all (~(put ju eye.all) %$ duc)
|
||||||
[moz ..^$]
|
[moz ..^$]
|
||||||
:: %flog tasks are unwrapped and sent back to us on our default duct
|
:: %flog tasks are unwrapped and sent back to us on our default duct
|
||||||
::
|
::
|
||||||
@ -362,35 +354,60 @@
|
|||||||
?: ?=(%knob -.task)
|
?: ?=(%knob -.task)
|
||||||
=. veb.all (~(put by veb.all) tag.task level.task)
|
=. veb.all (~(put by veb.all) tag.task level.task)
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
|
:: %open opens a new dill session
|
||||||
|
::
|
||||||
|
?: ?=(%open -.task)
|
||||||
|
?: (~(has by dug.all) ses)
|
||||||
|
::TODO should we allow, and just send the %yow blits?
|
||||||
|
~| [%cannot-open-existing ses]
|
||||||
|
!!
|
||||||
|
=/ zon=axon [p.task ~ width=80]
|
||||||
|
=^ moz all abet:(~(open as hen ses zon) q.task)
|
||||||
|
=. eye.all (~(put ju eye.all) ses hen)
|
||||||
|
[moz ..^$]
|
||||||
|
:: %shut closes an existing dill session
|
||||||
|
::
|
||||||
|
?: ?=(%shut -.task)
|
||||||
|
?: =(%$ ses)
|
||||||
|
~| %cannot-shut-default-session
|
||||||
|
!!
|
||||||
|
=/ nus
|
||||||
|
~| [%no-session ses]
|
||||||
|
(need (ax hen ses))
|
||||||
|
::NOTE we do deletion from state outside of the core,
|
||||||
|
:: because +abet would re-insert.
|
||||||
|
::TODO send a %bye blit? xx
|
||||||
|
=^ moz all abet:pull:nus
|
||||||
|
=. dug.all (~(del by dug.all) ses)
|
||||||
|
=. eye.all (~(del by eye.all) ses)
|
||||||
|
[moz ..^$]
|
||||||
|
:: %view opens a subscription to the target session, on the current duct
|
||||||
::
|
::
|
||||||
?: ?=(%view -.task)
|
?: ?=(%view -.task)
|
||||||
:: crash on viewing non-existent session
|
=/ nus
|
||||||
|
:: crash on viewing non-existent session
|
||||||
|
::
|
||||||
|
~| [%no-session ses]
|
||||||
|
(need (ax hen ses))
|
||||||
|
:: register the viewer and send a %hey so they get the full screen
|
||||||
::
|
::
|
||||||
~| [%no-session session.task]
|
=^ moz all
|
||||||
?> =(~ session.task)
|
abet:(send:nus %hey ~)
|
||||||
=/ session (need hey.all)
|
:- moz
|
||||||
=/ =axon (~(got by dug.all) session)
|
..^$(eye.all (~(put ju eye.all) ses hen))
|
||||||
:: register the viewer and send them the prompt line
|
:: %flee closes a subscription to the target session, from the current duct
|
||||||
::
|
|
||||||
:- [hen %give %blit [see.axon]~]~
|
|
||||||
..^$(eye.all (~(put ju eye.all) session hen))
|
|
||||||
::
|
::
|
||||||
?: ?=(%flee -.task)
|
?: ?=(%flee -.task)
|
||||||
:- ~
|
:- ~
|
||||||
~| [%no-session session.task]
|
..^$(eye.all (~(del ju eye.all) ses hen))
|
||||||
?> =(~ session.task)
|
|
||||||
=/ session (need hey.all)
|
|
||||||
..^$(eye.all (~(del ju eye.all) session hen))
|
|
||||||
::
|
::
|
||||||
=/ nus (ax hen)
|
=/ nus
|
||||||
=? nus &(?=(~ nus) ?=(^ hey.all))
|
(ax hen ses)
|
||||||
::TODO allow specifying target session in task
|
|
||||||
(ax u.hey.all)
|
|
||||||
?~ nus
|
?~ nus
|
||||||
:: :hen is an unrecognized duct
|
:: session :ses does not exist
|
||||||
:: could be before %boot (or %boot failed)
|
:: could be before %boot (or %boot failed)
|
||||||
::
|
::
|
||||||
~& [%dill-call-no-flow hen -.task]
|
~& [%dill-call-no-session ses hen -.task]
|
||||||
=/ tan ?:(?=(%crud -.task) q.task ~)
|
=/ tan ?:(?=(%crud -.task) q.task ~)
|
||||||
[((slog (flop tan)) ~) ..^$]
|
[((slog (flop tan)) ~) ..^$]
|
||||||
::
|
::
|
||||||
@ -398,8 +415,79 @@
|
|||||||
[moz ..^$]
|
[moz ..^$]
|
||||||
::
|
::
|
||||||
++ load :: import old state
|
++ load :: import old state
|
||||||
|= old=axle
|
=< |= old=any-axle
|
||||||
..^$(all old)
|
?- -.old
|
||||||
|
%6 ..^$(all old)
|
||||||
|
%5 $(old (axle-5-to-6 old))
|
||||||
|
%4 $(old (axle-4-to-5 old))
|
||||||
|
==
|
||||||
|
|%
|
||||||
|
+$ any-axle $%(axle axle-5 axle-4)
|
||||||
|
::
|
||||||
|
+$ axle-5
|
||||||
|
$: %5
|
||||||
|
hey=(unit duct) :: default duct
|
||||||
|
dug=(map @tas axon) :: conversations
|
||||||
|
eye=(jug @tas duct) :: outside listeners
|
||||||
|
lit=? :: boot in lite mode
|
||||||
|
veb=(map @tas log-level)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ axle-5-to-6
|
||||||
|
|= a=axle-5
|
||||||
|
^- axle
|
||||||
|
:: [%6 hey `(map @tas axon)`dug eye lit veb |]
|
||||||
|
a(- %6, veb [veb.a &])
|
||||||
|
::
|
||||||
|
+$ axle-4
|
||||||
|
$: %4
|
||||||
|
hey=(unit duct)
|
||||||
|
dug=(map duct axon-4)
|
||||||
|
eye=(jug duct duct)
|
||||||
|
lit=?
|
||||||
|
veb=(map @tas log-level)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ axon-4
|
||||||
|
$: ram=term
|
||||||
|
tem=(unit (list dill-belt-4))
|
||||||
|
wid=_80
|
||||||
|
pos=$@(@ud [@ud @ud])
|
||||||
|
see=$%([%lin (list @c)] [%klr stub])
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ dill-belt-4
|
||||||
|
$% [%ctl p=@c]
|
||||||
|
[%met p=@c]
|
||||||
|
dill-belt
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ axle-4-to-5
|
||||||
|
|= axle-4
|
||||||
|
^- axle-5
|
||||||
|
:- %5
|
||||||
|
=- [hey nug nay lit veb]
|
||||||
|
%+ roll ~(tap by dug)
|
||||||
|
|= [[=duct =axon-4] nug=(map @tas axon) nay=(jug @tas duct)]
|
||||||
|
=/ ses=@tas
|
||||||
|
~| [%unexpected-duct duct]
|
||||||
|
?>(=([//term/1]~ duct) %$)
|
||||||
|
:- (~(put by nug) ses (axon-4-to-5 axon-4))
|
||||||
|
%+ ~(put by nay) ses
|
||||||
|
(~(put in (~(get ju eye) duct)) duct)
|
||||||
|
::
|
||||||
|
++ axon-4-to-5
|
||||||
|
|= axon-4
|
||||||
|
^- axon
|
||||||
|
=; tem [ram tem wid]
|
||||||
|
?~ tem ~
|
||||||
|
%- some
|
||||||
|
%+ turn u.tem
|
||||||
|
|= b=dill-belt-4
|
||||||
|
^- dill-belt
|
||||||
|
?. ?=(?(%ctl %met) -.b) b
|
||||||
|
[%mod -.b p.b]
|
||||||
|
--
|
||||||
::
|
::
|
||||||
++ scry
|
++ scry
|
||||||
^- roon
|
^- roon
|
||||||
@ -428,19 +516,12 @@
|
|||||||
=(%$ syd)
|
=(%$ syd)
|
||||||
==
|
==
|
||||||
~
|
~
|
||||||
:: /dx/sessions//line blit current line (prompt) of default session
|
:: /dy/sessions (set @tas) all existing sessions
|
||||||
:: /dx/sessions//cursor @ud current cursor position of default session
|
:: /du/sessions/[ses] ? does session ses exist?
|
||||||
::TODO support asking for specific sessions once session ids are real
|
|
||||||
::
|
::
|
||||||
?. ?=(%x ren) ~
|
?+ [ren tyl] ~
|
||||||
?+ tyl ~
|
[%y %sessions ~] ``noun+!>(~(key by dug.all))
|
||||||
[%sessions %$ *]
|
[%u %sessions @ ~] ``noun+!>((~(has by dug.all) (snag 1 tyl)))
|
||||||
?~ hey.all [~ ~]
|
|
||||||
?~ session=(~(get by dug.all) u.hey.all) [~ ~]
|
|
||||||
?+ t.t.tyl ~
|
|
||||||
[%line ~] ``blit+!>(`blit`see.u.session)
|
|
||||||
[%cursor ~] ``atom+!>(pos.u.session)
|
|
||||||
==
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ stay all
|
++ stay all
|
||||||
@ -451,12 +532,27 @@
|
|||||||
?^ dud
|
?^ dud
|
||||||
~|(%dill-take-dud (mean tang.u.dud))
|
~|(%dill-take-dud (mean tang.u.dud))
|
||||||
::
|
::
|
||||||
=/ nus (ax hen)
|
=; [moz=(list move) lax=_..^$]
|
||||||
|
=? moz egg.all.lax
|
||||||
|
:: dill pre-release (version %5) in some cases ended up in a state
|
||||||
|
:: where it had both an old-style and new-style subscription open
|
||||||
|
:: for the default session. here, we obliterate both and establish
|
||||||
|
:: only the new-style subscription.
|
||||||
|
::
|
||||||
|
=/ hey (need hey.all.lax)
|
||||||
|
:* [hey %pass / %g %deal [our our] %hood %leave ~]
|
||||||
|
[hey %pass [%peer %$ ~] %g %deal [our our] %hood %leave ~]
|
||||||
|
[hey %pass [%peer %$ ~] %g %deal [our our] %hood %watch [%dill %$ ~]]
|
||||||
|
moz
|
||||||
|
==
|
||||||
|
=. egg.all.lax |
|
||||||
|
[moz lax]
|
||||||
|
::
|
||||||
|
=/ nus (aw hen tea)
|
||||||
?~ nus
|
?~ nus
|
||||||
:: :hen is an unrecognized duct
|
:: :tea points to an unrecognized session
|
||||||
:: could be before %boot (or %boot failed)
|
|
||||||
::
|
::
|
||||||
~& [%dill-take-no-flow hen -.hin +<.hin]
|
~& [%dill-take-no-session tea -.hin +<.hin]
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
=^ moz all abet:(take:u.nus tea hin)
|
=^ moz all abet:(take:u.nus tea hin)
|
||||||
[moz ..^$]
|
[moz ..^$]
|
||||||
|
@ -2668,13 +2668,11 @@
|
|||||||
=* domains domains.server-state.ax
|
=* domains domains.server-state.ax
|
||||||
=* ports ports.server-state.ax
|
=* ports ports.server-state.ax
|
||||||
=/ =host:eyre [%& ?^(domains n.domains /localhost)]
|
=/ =host:eyre [%& ?^(domains n.domains /localhost)]
|
||||||
=/ secure=? &(?=(^ secure.ports) !?=(hoke:eyre host))
|
|
||||||
=/ port=(unit @ud)
|
=/ port=(unit @ud)
|
||||||
?. secure
|
?. ?=(^ secure.ports)
|
||||||
?:(=(80 insecure.ports) ~ `insecure.ports)
|
?:(=(80 insecure.ports) ~ `insecure.ports)
|
||||||
?> ?=(^ secure.ports)
|
|
||||||
?:(=(443 u.secure.ports) ~ secure.ports)
|
?:(=(443 u.secure.ports) ~ secure.ports)
|
||||||
``[secure port host]
|
``[?=(^ secure.ports) port host]
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
|
@ -198,11 +198,21 @@
|
|||||||
:: +mo-abet: finalize, reversing moves
|
:: +mo-abet: finalize, reversing moves
|
||||||
:: +mo-pass: prepend a standard %pass to the current list of moves
|
:: +mo-pass: prepend a standard %pass to the current list of moves
|
||||||
:: +mo-give: prepend a standard %give to the current list of moves
|
:: +mo-give: prepend a standard %give to the current list of moves
|
||||||
|
:: +mo-talk: build task to print config report or failure trace
|
||||||
::
|
::
|
||||||
++ mo-core .
|
++ mo-core .
|
||||||
++ mo-abed |=(hun=duct mo-core(hen hun))
|
++ mo-abed |=(hun=duct mo-core(hen hun))
|
||||||
++ mo-abet [(flop moves) gall-payload]
|
++ mo-abet [(flop moves) gall-payload]
|
||||||
++ mo-give |=(g=gift mo-core(moves [[hen give+g] moves]))
|
++ mo-give |=(g=gift mo-core(moves [[hen give+g] moves]))
|
||||||
|
++ mo-talk
|
||||||
|
|= rup=(each suss tang)
|
||||||
|
^- [wire note-arvo]
|
||||||
|
:+ /sys/say %d
|
||||||
|
^- task:dill
|
||||||
|
?- -.rup
|
||||||
|
%& [%text "gall: {(t q)}ed %{(t p)}":[t=trip p.rup]]
|
||||||
|
%| [%talk leaf+"gall: failed" (flop p.rup)]
|
||||||
|
==
|
||||||
++ mo-pass |=(p=[wire note-arvo] mo-core(moves [[hen pass+p] moves]))
|
++ mo-pass |=(p=[wire note-arvo] mo-core(moves [[hen pass+p] moves]))
|
||||||
++ mo-slip |=(p=note-arvo mo-core(moves [[hen slip+p] moves]))
|
++ mo-slip |=(p=note-arvo mo-core(moves [[hen slip+p] moves]))
|
||||||
++ mo-past
|
++ mo-past
|
||||||
@ -303,12 +313,12 @@
|
|||||||
=/ ap-core +.wag
|
=/ ap-core +.wag
|
||||||
?^ maybe-tang
|
?^ maybe-tang
|
||||||
=. mo-core old
|
=. mo-core old
|
||||||
(mo-give %onto %.n u.maybe-tang)
|
(mo-pass (mo-talk %.n u.maybe-tang))
|
||||||
::
|
::
|
||||||
=. mo-core ap-abet:ap-core
|
=. mo-core ap-abet:ap-core
|
||||||
=. mo-core (mo-clear-queue dap)
|
=. mo-core (mo-clear-queue dap)
|
||||||
=/ =suss [dap %boot now]
|
=/ =suss [dap %boot now]
|
||||||
(mo-give %onto [%.y suss])
|
(mo-pass (mo-talk %.y suss))
|
||||||
:: +mo-send-foreign-request: handle local request to .ship
|
:: +mo-send-foreign-request: handle local request to .ship
|
||||||
::
|
::
|
||||||
++ mo-send-foreign-request
|
++ mo-send-foreign-request
|
||||||
@ -904,8 +914,8 @@
|
|||||||
::
|
::
|
||||||
=/ running (~(put by yokes.state) agent-name yoke)
|
=/ running (~(put by yokes.state) agent-name yoke)
|
||||||
=/ moves
|
=/ moves
|
||||||
=/ giver |=(report=(each suss tang) [hen %give %onto report])
|
=/ talker |=(report=(each suss tang) [hen %pass (mo-talk report)])
|
||||||
=/ from-suss (turn agent-config giver)
|
=/ from-suss (turn agent-config talker)
|
||||||
:(weld agent-moves from-suss moves)
|
:(weld agent-moves from-suss moves)
|
||||||
::
|
::
|
||||||
%_ mo-core
|
%_ mo-core
|
||||||
|
@ -105,11 +105,8 @@
|
|||||||
$>(%wake gift:behn) ::
|
$>(%wake gift:behn) ::
|
||||||
== ::
|
== ::
|
||||||
$: %gall ::
|
$: %gall ::
|
||||||
$> $? %onto ::
|
$>(%unto gift:gall) ::
|
||||||
%unto ::
|
== ::
|
||||||
== ::
|
|
||||||
gift:gall ::
|
|
||||||
==
|
|
||||||
== ::
|
== ::
|
||||||
-- ::
|
-- ::
|
||||||
:: ::::
|
:: ::::
|
||||||
@ -507,7 +504,7 @@
|
|||||||
%ruin
|
%ruin
|
||||||
::NOTE we blast this out to _all_ known ducts, because the common
|
::NOTE we blast this out to _all_ known ducts, because the common
|
||||||
:: use case for this is comets, about who nobody cares.
|
:: use case for this is comets, about who nobody cares.
|
||||||
=/ dus ~(key by yen.zim.pki)
|
=/ dus (~(uni in nel.zim.pki) ~(key by yen.zim.pki))
|
||||||
=/ sus ~(. su hen now pki etn)
|
=/ sus ~(. su hen now pki etn)
|
||||||
=/ sis ~(tap in ships.tac)
|
=/ sis ~(tap in ships.tac)
|
||||||
|-
|
|-
|
||||||
@ -550,10 +547,6 @@
|
|||||||
=/ ships (~(get ju ship-sources-reverse.etn) source-id)
|
=/ ships (~(get ju ship-sources-reverse.etn) source-id)
|
||||||
%- curd =< abet
|
%- curd =< abet
|
||||||
(sources:~(feel su hen now pki etn) ships source)
|
(sources:~(feel su hen now pki etn) ships source)
|
||||||
::
|
|
||||||
[%gall %onto *]
|
|
||||||
~& [%jael-onto tea hin]
|
|
||||||
+>.$
|
|
||||||
::
|
::
|
||||||
[%gall %unto *]
|
[%gall %unto *]
|
||||||
?- +>-.hin
|
?- +>-.hin
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
=> ..lull
|
=> ..lull
|
||||||
~% %zuse ..part ~
|
~% %zuse ..part ~
|
||||||
|%
|
|%
|
||||||
++ zuse %417
|
++ zuse %415
|
||||||
:: :: ::
|
:: :: ::
|
||||||
:::: :: :: (2) engines
|
:::: :: :: (2) engines
|
||||||
:: :: ::
|
:: :: ::
|
||||||
@ -3843,6 +3843,102 @@
|
|||||||
~
|
~
|
||||||
(some (~(run by lum) need))
|
(some (~(run by lum) need))
|
||||||
-- ::dejs-soft
|
-- ::dejs-soft
|
||||||
|
::
|
||||||
|
++ klr :: styx/stub engine
|
||||||
|
=, dill
|
||||||
|
|%
|
||||||
|
++ make :: stub from styx
|
||||||
|
|= a=styx ^- stub
|
||||||
|
=| b=stye
|
||||||
|
%+ reel
|
||||||
|
|- ^- stub
|
||||||
|
%- zing %+ turn a
|
||||||
|
|= a=$@(@t (pair styl styx))
|
||||||
|
?@ a [b (tuba (trip a))]~
|
||||||
|
^$(a q.a, b (styd p.a b))
|
||||||
|
::
|
||||||
|
|= [a=(pair stye (list @c)) b=stub]
|
||||||
|
?~ b [a ~]
|
||||||
|
?. =(p.a p.i.b) [a b]
|
||||||
|
[[p.a (weld q.a q.i.b)] t.b]
|
||||||
|
::
|
||||||
|
++ styd :: stye from styl
|
||||||
|
|= [a=styl b=stye] ^+ b :: with inheritance
|
||||||
|
:+ ?~ p.a p.b
|
||||||
|
?~ u.p.a ~
|
||||||
|
(~(put in p.b) u.p.a)
|
||||||
|
(fall p.q.a p.q.b)
|
||||||
|
(fall q.q.a q.q.b)
|
||||||
|
::
|
||||||
|
++ lent-char
|
||||||
|
|= a=stub ^- @
|
||||||
|
(roll (lnts-char a) add)
|
||||||
|
::
|
||||||
|
++ lnts-char :: stub text lengths
|
||||||
|
|= a=stub ^- (list @)
|
||||||
|
%+ turn a
|
||||||
|
|= a=(pair stye (list @c))
|
||||||
|
(lent q.a)
|
||||||
|
::
|
||||||
|
++ brek :: index + incl-len of
|
||||||
|
|= [a=@ b=(list @)] :: stub pair w/ idx a
|
||||||
|
=| [c=@ i=@]
|
||||||
|
|- ^- (unit (pair @ @))
|
||||||
|
?~ b ~
|
||||||
|
=. c (add c i.b)
|
||||||
|
?: (gte c a)
|
||||||
|
`[i c]
|
||||||
|
$(i +(i), b t.b)
|
||||||
|
::
|
||||||
|
++ pact :: condense stub
|
||||||
|
|= a=stub
|
||||||
|
^- stub
|
||||||
|
?~ a ~
|
||||||
|
?~ t.a a
|
||||||
|
?. =(p.i.a p.i.t.a) [i.a $(a t.a)]
|
||||||
|
=. q.i.t.a (weld q.i.a q.i.t.a)
|
||||||
|
$(a t.a)
|
||||||
|
::
|
||||||
|
++ slag :: slag stub
|
||||||
|
|= [a=@ b=stub]
|
||||||
|
^- stub
|
||||||
|
?: =(0 a) b
|
||||||
|
?~ b ~
|
||||||
|
=+ c=(lent q.i.b)
|
||||||
|
?: =(c a) t.b
|
||||||
|
?: (gth c a)
|
||||||
|
[[p.i.b (^slag a q.i.b)] t.b]
|
||||||
|
$(a (sub a c), b t.b)
|
||||||
|
::
|
||||||
|
++ scag :: scag stub
|
||||||
|
|= [a=@ b=stub]
|
||||||
|
^- stub
|
||||||
|
?: =(0 a) ~
|
||||||
|
?~ b ~
|
||||||
|
=+ c=(lent q.i.b)
|
||||||
|
?: (gth c a)
|
||||||
|
[p.i.b (^scag a q.i.b)]~
|
||||||
|
:- i.b
|
||||||
|
$(a (sub a c), b t.b)
|
||||||
|
::
|
||||||
|
++ swag :: swag stub
|
||||||
|
|= [[a=@ b=@] c=stub]
|
||||||
|
(scag b (slag a c))
|
||||||
|
::
|
||||||
|
++ wail :: overlay stub
|
||||||
|
|= [a=stub b=@ c=stub d=@c]
|
||||||
|
^- stub
|
||||||
|
;: weld
|
||||||
|
(scag b a)
|
||||||
|
::
|
||||||
|
=+ e=(lent-char a)
|
||||||
|
?: (lte b e) ~
|
||||||
|
[*stye (reap (sub b e) d)]~
|
||||||
|
::
|
||||||
|
c
|
||||||
|
(slag (add b (lent-char c)) a)
|
||||||
|
==
|
||||||
|
-- :: klr
|
||||||
--
|
--
|
||||||
:: |cloy: clay helpers
|
:: |cloy: clay helpers
|
||||||
::
|
::
|
||||||
@ -4928,7 +5024,7 @@
|
|||||||
=< q.q %- need %- need
|
=< q.q %- need %- need
|
||||||
(rof ~ %j `beam`[[our %sein %da now] /(scot %p who)])
|
(rof ~ %j `beam`[[our %sein %da now] /(scot %p who)])
|
||||||
--
|
--
|
||||||
:: middle core: for userspace use, with .^
|
:: middle core: stateless queries for default numeric sponsorship
|
||||||
::
|
::
|
||||||
=> |%
|
=> |%
|
||||||
:: :: ++clan:title
|
:: :: ++clan:title
|
||||||
@ -4968,7 +5064,7 @@
|
|||||||
%pawn (end 4 who)
|
%pawn (end 4 who)
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
:: surface core: stateless queries for default numeric sponsorship
|
:: surface core: for userspace use, with .^
|
||||||
::
|
::
|
||||||
|%
|
|%
|
||||||
:: :: ++cite:title
|
:: :: ++cite:title
|
||||||
@ -5003,13 +5099,25 @@
|
|||||||
%j
|
%j
|
||||||
/(scot %p our)/sein/(scot %da now)/(scot %p who)
|
/(scot %p our)/sein/(scot %da now)/(scot %p who)
|
||||||
==
|
==
|
||||||
|
:: +team was created with two meanings:
|
||||||
|
:: A. her / her moon
|
||||||
|
:: B. whoever should be able to control her ship
|
||||||
|
::
|
||||||
|
:: these two things aren't obviously equal anymore,
|
||||||
|
:: and it's more important for +team to satisfy B than A,
|
||||||
|
:: so now +team just means "her".
|
||||||
|
::
|
||||||
|
:: (ships can definitely be trusted to control themselves)
|
||||||
:: :: ++team:title
|
:: :: ++team:title
|
||||||
++ team :: our / our moon
|
++ team :: her
|
||||||
|= [our=ship who=ship]
|
|= [her=ship who=ship]
|
||||||
^- ?
|
^- ?
|
||||||
?| =(our who)
|
=(her who)
|
||||||
&(?=(%earl (clan who)) =(our (^sein who)))
|
:: :: ++moon:title
|
||||||
==
|
++ moon :: her moon
|
||||||
|
|= [her=ship who=ship]
|
||||||
|
^- ?
|
||||||
|
&(=(%earl (clan who)) =(her (^sein who)))
|
||||||
-- ::title
|
-- ::title
|
||||||
:: ::
|
:: ::
|
||||||
:::: ++milly :: (2k) milliseconds
|
:::: ++milly :: (2k) milliseconds
|
||||||
|
@ -17,15 +17,16 @@
|
|||||||
%+ roll blits
|
%+ roll blits
|
||||||
|= [b=blit:dill line=tape]
|
|= [b=blit:dill line=tape]
|
||||||
?- -.b
|
?- -.b
|
||||||
%lin (tape p.b)
|
%put (tape p.b)
|
||||||
%klr (tape (zing (turn p.b tail)))
|
%klr (tape (zing (turn p.b tail)))
|
||||||
%mor ~& "{<who>}: {line}" ""
|
%nel ~& "{<who>}: {line}" ""
|
||||||
%hop line
|
%hop line
|
||||||
%bel line
|
%bel line
|
||||||
%clr ""
|
%clr ""
|
||||||
%sag ~& [%save-jamfile-to p.b] line
|
%sag ~& [%save-jamfile-to p.b] line
|
||||||
%sav ~& [%save-file-to p.b] line
|
%sav ~& [%save-file-to p.b] line
|
||||||
%url ~& [%activate-url p.b] line
|
%url ~& [%activate-url p.b] line
|
||||||
|
%wyp ""
|
||||||
==
|
==
|
||||||
~? !=(~ last-line) last-line
|
~? !=(~ last-line) last-line
|
||||||
~
|
~
|
||||||
|
319
pkg/autoprop/app/autoprop.hoon
Normal file
319
pkg/autoprop/app/autoprop.hoon
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
:: autoprop: make pills & props when desk contents change
|
||||||
|
::
|
||||||
|
:: auto-build a new .urb/put/latest-solid.pill:
|
||||||
|
:: +latest-solid solid %kids %garden
|
||||||
|
::
|
||||||
|
:: stop auto-building latest-solid:
|
||||||
|
:: -latest-solid
|
||||||
|
::
|
||||||
|
:: auto-build a new .urb/put/somedesk.jam:
|
||||||
|
:: +some-desk desk %somedesk
|
||||||
|
::
|
||||||
|
:: see currently configured build tasks:
|
||||||
|
:: ?
|
||||||
|
::
|
||||||
|
:: run task right now:
|
||||||
|
:: !latest-solid
|
||||||
|
::
|
||||||
|
/+ libpill=pill, shoe, verb, dbug, default-agent
|
||||||
|
::
|
||||||
|
=, clay
|
||||||
|
::
|
||||||
|
|%
|
||||||
|
+$ state-0
|
||||||
|
$: %0
|
||||||
|
make=(map @ta [next=(unit @da) =task]) :: things to make
|
||||||
|
hear=(set desk) :: observed desks
|
||||||
|
vers=path :: runtime version
|
||||||
|
sole=sole-id :: the way out
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ sole-id sole-id:sole:shoe
|
||||||
|
::
|
||||||
|
+$ task
|
||||||
|
$% pill
|
||||||
|
prop
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ pill
|
||||||
|
$% [%ivory base=desk]
|
||||||
|
[%solid base=desk etc=(set desk)]
|
||||||
|
[%brass base=desk etc=(set desk)]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ prop
|
||||||
|
$% [%desk =desk]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ command
|
||||||
|
$% [%put name=@ta =task] :: configure pill build
|
||||||
|
[%del name=@ta] :: remove pill build
|
||||||
|
[%see ~] :: help & current config
|
||||||
|
[%run name=@ta] :: force build
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ card card:shoe
|
||||||
|
::
|
||||||
|
++ delay ~d5
|
||||||
|
--
|
||||||
|
=| state-0
|
||||||
|
=* state -
|
||||||
|
::
|
||||||
|
%+ verb |
|
||||||
|
%- agent:dbug
|
||||||
|
^- agent:gall
|
||||||
|
%- (agent:shoe command)
|
||||||
|
^- (shoe:shoe command)
|
||||||
|
|_ =bowl:gall
|
||||||
|
+* this .
|
||||||
|
def ~(. (default-agent this %|) bowl)
|
||||||
|
des ~(. (default:shoe this command) bowl)
|
||||||
|
rev rev:.^(vere %$ /(scot %p our.bowl)//(scot %da now.bowl)/zen/ver)
|
||||||
|
::
|
||||||
|
++ on-init
|
||||||
|
^- (quip card _this)
|
||||||
|
:_ this(vers rev)
|
||||||
|
[%pass /vers %arvo %b %wait (add now.bowl ~m5)]~
|
||||||
|
::
|
||||||
|
++ on-save !>(state)
|
||||||
|
++ on-load
|
||||||
|
|= old=vase
|
||||||
|
^- (quip card _this)
|
||||||
|
[~ this(state !<(state-0 old))]
|
||||||
|
::
|
||||||
|
++ command-parser
|
||||||
|
|= =sole-id
|
||||||
|
^+ |~(nail *(like [? command]))
|
||||||
|
%+ pick
|
||||||
|
(cold [%see ~] wut)
|
||||||
|
|^ ;~ pose
|
||||||
|
(stag %put ;~(plug (ifix [lus ace] sym) ;~(pose pil pro)))
|
||||||
|
;~(plug (cold %del hep) sym)
|
||||||
|
;~(plug (cold %run zap) sym)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ pil
|
||||||
|
;~ pose
|
||||||
|
;~(plug (perk %ivory ~) ;~(pfix ace des))
|
||||||
|
;~(plug (perk %solid ~) ;~(pfix ace dez))
|
||||||
|
;~(plug (perk %brass ~) ;~(pfix ace dez))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ pro
|
||||||
|
;~(plug (perk %desk ~) ;~(pfix ace des))
|
||||||
|
::
|
||||||
|
++ des
|
||||||
|
;~(pfix cen sym)
|
||||||
|
::
|
||||||
|
++ dez
|
||||||
|
;~ plug
|
||||||
|
des
|
||||||
|
;~ pose
|
||||||
|
;~(pfix ace (cook ~(gas in *(set desk)) (more ace des)))
|
||||||
|
(easy ~)
|
||||||
|
==
|
||||||
|
==
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ on-command
|
||||||
|
|= [=sole-id =command]
|
||||||
|
^- (quip card _this)
|
||||||
|
?- -.command
|
||||||
|
%put
|
||||||
|
=* task task.command
|
||||||
|
=/ targ=(set desk)
|
||||||
|
?- -.task
|
||||||
|
%ivory [base.task ~ ~]
|
||||||
|
?(%solid %brass) (~(put in etc.task) base.task)
|
||||||
|
%desk [desk.task ~ ~]
|
||||||
|
==
|
||||||
|
=/ news (~(dif in targ) hear)
|
||||||
|
=. hear (~(uni in hear) targ)
|
||||||
|
=. make (~(put by make) name.command `now.bowl task.command)
|
||||||
|
:_ this
|
||||||
|
%+ turn ~(tap in news)
|
||||||
|
|= =desk
|
||||||
|
:+ %pass /desk/[desk]
|
||||||
|
[%arvo %c %warp our.bowl desk `[%next %z da+now.bowl /]]
|
||||||
|
::
|
||||||
|
%del
|
||||||
|
::NOTE deletion from hear, if necessary, handled in +on-arvo
|
||||||
|
[~ this(make (~(del by make) name.command))]
|
||||||
|
::
|
||||||
|
%see
|
||||||
|
:_ this
|
||||||
|
^- (list card)
|
||||||
|
=- [%shoe [sole-id]~ %sole %mor -]~
|
||||||
|
^- (list sole-effect:shoe)
|
||||||
|
:- [%txt "to add: +task-name type %args"]
|
||||||
|
:- [%txt " where type is one of: solid, brass, ivory, desk"]
|
||||||
|
:- [%txt "to del: -task-name"]
|
||||||
|
:- [%txt "to run: !task-name"]
|
||||||
|
?: =(~ make)
|
||||||
|
[%txt "no builds configured"]~
|
||||||
|
:- [%txt "--"]
|
||||||
|
:- [%txt "builds:"]
|
||||||
|
%+ turn ~(tap by make)
|
||||||
|
|= [name=@ta next=(unit @da) =task]
|
||||||
|
:- %txt
|
||||||
|
%- trip
|
||||||
|
%+ rap 3
|
||||||
|
:* name ' ('
|
||||||
|
?~(next 'up to date' (scot %da u.next))
|
||||||
|
') : +' -.task ' %'
|
||||||
|
::
|
||||||
|
?- -.task
|
||||||
|
%ivory [base.task ~]
|
||||||
|
?(%solid %brass) :- base.task
|
||||||
|
?: =(~ etc.task) ~
|
||||||
|
[' %' (join ' %' ~(tap in etc.task))]
|
||||||
|
%desk [desk.task ~]
|
||||||
|
== ==
|
||||||
|
::
|
||||||
|
%run
|
||||||
|
=* name name.command
|
||||||
|
=+ (~(got by make) name)
|
||||||
|
:_ =- this(make (~(jab by make) name -))
|
||||||
|
|=([next=(unit @da) =^task] [~ task])
|
||||||
|
::TODO just poke hood instead?
|
||||||
|
=; sag=sole-effect:shoe
|
||||||
|
:_ ~
|
||||||
|
:+ %shoe [sole]~
|
||||||
|
:+ %sole %mor
|
||||||
|
:~ [%txt "{(trip dap.bowl)} built {(trip name)}"]
|
||||||
|
sag
|
||||||
|
==
|
||||||
|
|^ =* base base.task
|
||||||
|
:+ %sag
|
||||||
|
=/ ver=@ta
|
||||||
|
=+ .^(vere %$ /(scot %p our.bowl)//(scot %da now.bowl)/zen/ver)
|
||||||
|
?. ?=([%vere @ ~] rev)
|
||||||
|
(rap 3 (join '-' rev))
|
||||||
|
(fall (slaw %ta i.t.rev) i.t.rev)
|
||||||
|
?- -.task
|
||||||
|
?(%solid %brass %ivory) /[dap.bowl]/[ver]/[name]/pill
|
||||||
|
%desk /[dap.bowl]/[ver]/[name]/jam
|
||||||
|
==
|
||||||
|
?- -.task
|
||||||
|
%ivory (ivory:libpill (sys base))
|
||||||
|
::
|
||||||
|
?(%solid %brass)
|
||||||
|
=/ dez=(list [desk path])
|
||||||
|
%+ turn ~(tap in etc.task)
|
||||||
|
|=(d=desk [d (bek d)])
|
||||||
|
?- -.task
|
||||||
|
%solid (solid:libpill (sys base) dez | now.bowl &)
|
||||||
|
%brass (brass:libpill (sys base) dez &)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
%desk
|
||||||
|
=* desk desk.task
|
||||||
|
(install:events:libpill desk (byk desk) &)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ sys
|
||||||
|
|= d=desk
|
||||||
|
`path`(snoc (bek d) %sys)
|
||||||
|
::
|
||||||
|
++ byk
|
||||||
|
|= d=desk
|
||||||
|
`beak`[our.bowl d da+now.bowl]
|
||||||
|
::
|
||||||
|
++ bek
|
||||||
|
|= d=desk
|
||||||
|
`path`(en-beam (byk d) /)
|
||||||
|
--
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ on-arvo
|
||||||
|
|= [=wire sign=sign-arvo]
|
||||||
|
^- (quip card _this)
|
||||||
|
?: ?=([%build ~] wire)
|
||||||
|
:: on-wake, build all tasks whose time has come
|
||||||
|
::
|
||||||
|
?> ?=(%wake +<.sign)
|
||||||
|
=/ tasks=(list @ta)
|
||||||
|
%+ murn ~(tap by make)
|
||||||
|
|= [name=@ta next=(unit @da) task]
|
||||||
|
?~ next ~
|
||||||
|
?:((lte u.next now.bowl) (some name) ~)
|
||||||
|
?^ error.sign
|
||||||
|
((slog 'on-wake build failed' >tasks< u.error.sign) ~ this)
|
||||||
|
::
|
||||||
|
=| cards=(list card)
|
||||||
|
|-
|
||||||
|
?~ tasks [cards this]
|
||||||
|
=^ caz this (on-command sole %run i.tasks)
|
||||||
|
$(tasks t.tasks, cards (weld cards caz))
|
||||||
|
::
|
||||||
|
?: ?=([%vers ~] wire)
|
||||||
|
:: on-wake, republish props if we're on a new runtime
|
||||||
|
::
|
||||||
|
?> ?=(%wake +<.sign)
|
||||||
|
=/ next=card
|
||||||
|
[%pass /vers %arvo %b %wait (add now.bowl ~m5)]
|
||||||
|
?^ error.sign
|
||||||
|
%- (slog 'on-wake vers failed' u.error.sign)
|
||||||
|
[[next]~ this]
|
||||||
|
?: =(rev vers) [[next]~ this]
|
||||||
|
=/ tasks=(list @ta) ~(tap in ~(key by make))
|
||||||
|
=| cards=(list card)
|
||||||
|
|-
|
||||||
|
?~ tasks [[next cards] this]
|
||||||
|
=^ caz this (on-command sole %run i.tasks)
|
||||||
|
$(tasks t.tasks, cards (weld cards caz))
|
||||||
|
::
|
||||||
|
?> ?=([%desk @ ~] wire)
|
||||||
|
=* desk i.t.wire
|
||||||
|
?. ?=(%writ +<.sign)
|
||||||
|
~& [dap.bowl %unexpected-sign +<.sign]
|
||||||
|
[~ this]
|
||||||
|
:: on-writ, bump build timers for all affected tasks
|
||||||
|
::
|
||||||
|
=/ tasks=(list @ta)
|
||||||
|
%+ murn ~(tap by make)
|
||||||
|
|= [name=@ta (unit @da) =task]
|
||||||
|
=- ?:(- (some name) ~)
|
||||||
|
?- -.task
|
||||||
|
%ivory =(desk base.task)
|
||||||
|
?(%solid %brass) |(=(desk base.task) (~(has in etc.task) desk))
|
||||||
|
%desk =(desk desk.task)
|
||||||
|
==
|
||||||
|
?: =(~ tasks)
|
||||||
|
[~ this(hear (~(del in hear) desk))]
|
||||||
|
::
|
||||||
|
=/ next=@da (add now.bowl delay)
|
||||||
|
:_ :: delay next build for affected tasks
|
||||||
|
::
|
||||||
|
|- ?~ tasks this
|
||||||
|
=. make
|
||||||
|
%+ ~(jab by make) i.tasks
|
||||||
|
|=([(unit @da) =task] [`next task])
|
||||||
|
$(tasks t.tasks)
|
||||||
|
:~ :: watch for the next change on this desk
|
||||||
|
::
|
||||||
|
:+ %pass /desk/[desk]
|
||||||
|
[%arvo %c %warp our.bowl desk `[%next %z da+now.bowl /]]
|
||||||
|
::
|
||||||
|
:: set a timer for building affected tasks
|
||||||
|
::
|
||||||
|
[%pass /build %arvo %b %wait next]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ on-connect
|
||||||
|
|= =sole-id
|
||||||
|
^- (quip card _this)
|
||||||
|
::TODO actually should just poke drum to write
|
||||||
|
[~ this(sole sole-id)]
|
||||||
|
::
|
||||||
|
++ can-connect |=(* =(src our):bowl)
|
||||||
|
++ on-disconnect on-disconnect:des
|
||||||
|
++ tab-list tab-list:des
|
||||||
|
::
|
||||||
|
++ on-poke on-poke:def
|
||||||
|
++ on-watch on-watch:def
|
||||||
|
++ on-leave on-leave:def
|
||||||
|
++ on-peek on-peek:def
|
||||||
|
++ on-agent on-agent:def
|
||||||
|
++ on-fail on-fail:def
|
||||||
|
--
|
3
pkg/autoprop/desk.bill
Normal file
3
pkg/autoprop/desk.bill
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
:~ %autoprop
|
||||||
|
==
|
||||||
|
|
1
pkg/autoprop/lib/dice.hoon
Symbolic link
1
pkg/autoprop/lib/dice.hoon
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../arvo/lib/dice.hoon
|
1
pkg/autoprop/lib/ethereum.hoon
Symbolic link
1
pkg/autoprop/lib/ethereum.hoon
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../arvo/lib/ethereum.hoon
|
1
pkg/autoprop/lib/naive.hoon
Symbolic link
1
pkg/autoprop/lib/naive.hoon
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../arvo/lib/naive.hoon
|
1
pkg/autoprop/lib/tiny.hoon
Symbolic link
1
pkg/autoprop/lib/tiny.hoon
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../arvo/lib/tiny.hoon
|
1
pkg/autoprop/sur/dice.hoon
Symbolic link
1
pkg/autoprop/sur/dice.hoon
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../arvo/sur/dice.hoon
|
1
pkg/autoprop/sys.kelvin
Normal file
1
pkg/autoprop/sys.kelvin
Normal file
@ -0,0 +1 @@
|
|||||||
|
[%zuse 415]
|
@ -93,11 +93,6 @@
|
|||||||
(arvo %e %connect binding app)
|
(arvo %e %connect binding app)
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ fact-curry
|
|
||||||
|* [=mark =mold]
|
|
||||||
|= [paths=(list path) fac=mold]
|
|
||||||
(fact mark^!>(fac) paths)
|
|
||||||
::
|
|
||||||
++ fact-kick
|
++ fact-kick
|
||||||
|= [=path =cage]
|
|= [=path =cage]
|
||||||
^- (list card)
|
^- (list card)
|
||||||
|
94
pkg/base-dev/lib/dill.hoon
Normal file
94
pkg/base-dev/lib/dill.hoon
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
:: dill: utilities for dill's data structures
|
||||||
|
::
|
||||||
|
=, dill
|
||||||
|
|%
|
||||||
|
++ enjs
|
||||||
|
|%
|
||||||
|
++ blit
|
||||||
|
|= =blit:dill
|
||||||
|
^- json
|
||||||
|
=, enjs:format
|
||||||
|
%+ frond -.blit
|
||||||
|
?- -.blit
|
||||||
|
%bel b+&
|
||||||
|
%clr b+&
|
||||||
|
%hop ?@ p.blit (numb p.blit)
|
||||||
|
(pairs 'x'^(numb x.p.blit) 'y'^(numb y.p.blit) ~)
|
||||||
|
%put a+(turn p.blit |=(c=@c s+(tuft c)))
|
||||||
|
%nel b+&
|
||||||
|
%url s+p.blit
|
||||||
|
%wyp b+&
|
||||||
|
%mor a+(turn p.blit ^blit)
|
||||||
|
::
|
||||||
|
%sag
|
||||||
|
%- pairs
|
||||||
|
:~ 'path'^(path p.blit)
|
||||||
|
'file'^s+(en:base64:mimes:html (as-octs:mimes:html (jam q.blit)))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
%sav
|
||||||
|
%- pairs
|
||||||
|
:~ 'path'^(path p.blit)
|
||||||
|
'file'^s+(en:base64:mimes:html (as-octs:mimes:html q.blit))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
%klr
|
||||||
|
:- %a
|
||||||
|
%+ turn p.blit
|
||||||
|
|= [=stye text=(list @c)]
|
||||||
|
%- pairs
|
||||||
|
:~ 'text'^a+(turn text |=(c=@c s+(tuft c)))
|
||||||
|
::
|
||||||
|
:- 'stye'
|
||||||
|
%- pairs
|
||||||
|
|^ :~ 'back'^(color p.q.stye)
|
||||||
|
'fore'^(color q.q.stye)
|
||||||
|
'deco'^a+(turn ~(tap in p.stye) |=(d=deco ?~(d ~ s+d)))
|
||||||
|
==
|
||||||
|
++ color
|
||||||
|
|= =tint
|
||||||
|
?@ tint ?~(tint ~ s+tint)
|
||||||
|
=, tint
|
||||||
|
(pairs r+(numb r) g+(numb g) b+(numb b) ~)
|
||||||
|
--
|
||||||
|
==
|
||||||
|
==
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ dejs
|
||||||
|
|%
|
||||||
|
++ belt
|
||||||
|
|= jon=json
|
||||||
|
^- belt:dill
|
||||||
|
?: ?=([%s *] jon)
|
||||||
|
(taft p.jon)
|
||||||
|
=, dejs:format
|
||||||
|
%. jon
|
||||||
|
%- of
|
||||||
|
|^ :* mod+(ot 'mod'^mod 'key'^bot ~)
|
||||||
|
txt+(ar (cu taft so))
|
||||||
|
bol
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ bol
|
||||||
|
:~ aro+(su (perk %d %l %r %u ~))
|
||||||
|
bac+ul
|
||||||
|
del+ul
|
||||||
|
hit+(ot 'x'^ni 'y'^ni ~)
|
||||||
|
ret+ul
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ bot
|
||||||
|
|= j=json
|
||||||
|
^- bolt:dill
|
||||||
|
?+ j !!
|
||||||
|
[%s *] (taft p.j)
|
||||||
|
[%o *] ((of bol) j)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ mod
|
||||||
|
|= j=json
|
||||||
|
((su (perk %ctl %met %hyp ~)) j)
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
@ -28,8 +28,8 @@
|
|||||||
%+ send-events-to who
|
%+ send-events-to who
|
||||||
^- (list unix-event)
|
^- (list unix-event)
|
||||||
:~
|
:~
|
||||||
[/d/term/1 %belt %ctl `@c`%e]
|
[/d/term/1 %belt %mod %ctl `@c`%e]
|
||||||
[/d/term/1 %belt %ctl `@c`%u]
|
[/d/term/1 %belt %mod %ctl `@c`%u]
|
||||||
[/d/term/1 %belt %txt ((list @c) what)]
|
[/d/term/1 %belt %txt ((list @c) what)]
|
||||||
[/d/term/1 %belt %ret ~]
|
[/d/term/1 %belt %ret ~]
|
||||||
==
|
==
|
||||||
@ -40,7 +40,7 @@
|
|||||||
|= [who=ship what=term]
|
|= [who=ship what=term]
|
||||||
^- (list ph-event)
|
^- (list ph-event)
|
||||||
%+ send-events-to who
|
%+ send-events-to who
|
||||||
:~ [/d/term/1 %belt %ctl (,@c what)]
|
:~ [/d/term/1 %belt %mod %ctl (,@c what)]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: Inject a file into a ship
|
:: Inject a file into a ship
|
||||||
@ -67,7 +67,7 @@
|
|||||||
::
|
::
|
||||||
%+ lien p.q.uf
|
%+ lien p.q.uf
|
||||||
|= =blit:dill
|
|= =blit:dill
|
||||||
?. ?=(%lin -.blit)
|
?. ?=(%put -.blit)
|
||||||
|
|
|
|
||||||
!=(~ (find what p.blit))
|
!=(~ (find what p.blit))
|
||||||
==
|
==
|
||||||
|
@ -64,7 +64,11 @@
|
|||||||
%- ~(gas by *(map path (each page lobe:clay)))
|
%- ~(gas by *(map path (each page lobe:clay)))
|
||||||
(turn hav |=([=path =page] [path &+page]))
|
(turn hav |=([=path =page] [path &+page]))
|
||||||
[/c/sync [%park des &+yuki *rang:clay]]
|
[/c/sync [%park des &+yuki *rang:clay]]
|
||||||
=| hav=(list [path page])
|
(file-pages bas sal)
|
||||||
|
::
|
||||||
|
++ file-pages
|
||||||
|
|= [bas=path sal=(list spur)]
|
||||||
|
=| hav=(list [path page:clay])
|
||||||
|- ^+ hav
|
|- ^+ hav
|
||||||
?~ sal ~
|
?~ sal ~
|
||||||
=. hav $(sal t.sal)
|
=. hav $(sal t.sal)
|
||||||
@ -97,6 +101,16 @@
|
|||||||
::
|
::
|
||||||
++ file-ovum2 |=(p=path `unix-event`[//arvo what/(user-files p)])
|
++ file-ovum2 |=(p=path `unix-event`[//arvo what/(user-files p)])
|
||||||
::
|
::
|
||||||
|
++ prep-ovum
|
||||||
|
|= dez=(list path)
|
||||||
|
^- unix-event
|
||||||
|
=- ~& clay-blobs+~(wyt by -)
|
||||||
|
[/c/inflate [%prep -]]
|
||||||
|
%+ roll dez
|
||||||
|
|= [bas=path out=(map lobe:clay page:clay)]
|
||||||
|
%- ~(uni by out)
|
||||||
|
.^(_out %cs (snoc bas %bloc))
|
||||||
|
::
|
||||||
:: +user-files: all userspace hoon files
|
:: +user-files: all userspace hoon files
|
||||||
::
|
::
|
||||||
++ user-files
|
++ user-files
|
||||||
@ -135,4 +149,218 @@
|
|||||||
|- ^+ hav
|
|- ^+ hav
|
||||||
?~ all hav
|
?~ all hav
|
||||||
$(all t.all, hav ^$(tyl [p.i.all tyl]))
|
$(all t.all, hav ^$(tyl [p.i.all tyl]))
|
||||||
|
::
|
||||||
|
::TODO include %prep task in solid and brass?
|
||||||
|
++ solid
|
||||||
|
:: sys: root path to boot system, `/~me/[desk]/now/sys`
|
||||||
|
:: dez: secondary desks and their root paths
|
||||||
|
::
|
||||||
|
|= [sys=path dez=(list [desk path]) dub=? now=@da prime=?]
|
||||||
|
^- pill
|
||||||
|
=/ bas=path (scag 3 sys)
|
||||||
|
=/ compiler-path (weld sys /hoon)
|
||||||
|
=/ arvo-path (weld sys /arvo)
|
||||||
|
~& %solid-start
|
||||||
|
=/ compiler-src .^(@t %cx (weld compiler-path /hoon))
|
||||||
|
=/ arvo-src .^(@t %cx (weld arvo-path /hoon))
|
||||||
|
=/ arvo-formula
|
||||||
|
~& %solid-loaded
|
||||||
|
=/ compiler-hoon (rain compiler-path compiler-src)
|
||||||
|
?. dub
|
||||||
|
:: compile arvo against hoon, with our current compiler
|
||||||
|
::
|
||||||
|
=/ whole-hoon=hoon
|
||||||
|
[%tsgr compiler-hoon [%tsgr [%$ 7] (rain arvo-path arvo-src)]]
|
||||||
|
~& %solid-parsed
|
||||||
|
=/ whole-formula q:(~(mint ut %noun) %noun whole-hoon)
|
||||||
|
~& %solid-arvo
|
||||||
|
whole-formula
|
||||||
|
:: compile arvo against hoon, with a freshly compiled hoon (via +ride)
|
||||||
|
::
|
||||||
|
~& %solid-parsed
|
||||||
|
=/ compiler-formula q:(~(mint ut %noun) %noun compiler-hoon)
|
||||||
|
~& %solid-compiled
|
||||||
|
=/ whole-src
|
||||||
|
(rap 3 ['=> ' compiler-src '=> +7 ' arvo-src ~])
|
||||||
|
~& %solid-double-loaded
|
||||||
|
=/ whole-formula
|
||||||
|
=< +
|
||||||
|
.* [%noun whole-src]
|
||||||
|
[%8 compiler-formula [%9 2 %10 [6 %0 3] [%0 2]]]
|
||||||
|
~& %solid-double-compiled
|
||||||
|
whole-formula
|
||||||
|
::
|
||||||
|
~& [%solid-kernel `@ux`(mug arvo-formula)]
|
||||||
|
::
|
||||||
|
:: installed: Arvo gate (formal interface) with %zuse and vanes installed
|
||||||
|
::
|
||||||
|
=/ installed
|
||||||
|
=< q
|
||||||
|
%^ spin
|
||||||
|
^- (list ovum)
|
||||||
|
:- (boot-ovum:pill compiler-src arvo-src)
|
||||||
|
%+ turn
|
||||||
|
(snoc (turn dez tail) bas)
|
||||||
|
file-ovum2:pill
|
||||||
|
.*(0 arvo-formula)
|
||||||
|
|= [ovo=ovum ken=*]
|
||||||
|
[~ (slum ken [now ovo])]
|
||||||
|
::
|
||||||
|
:: boot-two: startup formula
|
||||||
|
::
|
||||||
|
:: We evaluate :arvo-formula (for jet registration),
|
||||||
|
:: then ignore the result and produce .installed
|
||||||
|
::
|
||||||
|
=/ boot-two
|
||||||
|
=> *[arvo-formula=^ installed=^ tale=*]
|
||||||
|
!= =+(.*(0 arvo-formula) [installed tale])
|
||||||
|
::
|
||||||
|
:: boot-ova
|
||||||
|
::
|
||||||
|
=/ boot-ova=(list)
|
||||||
|
[aeon:eden:part boot-two arvo-formula installed ~]
|
||||||
|
::
|
||||||
|
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
|
||||||
|
::
|
||||||
|
:: Our kernel event-list is ~, as we've already installed them.
|
||||||
|
:: Our userspace event-list is a list containing a full %clay
|
||||||
|
:: filesystem sync event.
|
||||||
|
::
|
||||||
|
:+ %pill %solid
|
||||||
|
:+ boot-ova ~
|
||||||
|
=. dez (snoc dez [%base bas])
|
||||||
|
%+ weld
|
||||||
|
(turn dez file-ovum)
|
||||||
|
?. prime ~
|
||||||
|
[(prep-ovum (turn dez tail))]~
|
||||||
|
::
|
||||||
|
++ brass
|
||||||
|
:: sys: root path to boot system, `/~me/[desk]/now/sys`
|
||||||
|
:: dez: secondary desks and their root paths
|
||||||
|
::
|
||||||
|
|= [sys=path dez=(list [desk path]) prime=?]
|
||||||
|
^- pill
|
||||||
|
=/ bas=path (scag 3 sys)
|
||||||
|
:: compiler-source: hoon source file producing compiler, `sys/hoon`
|
||||||
|
::
|
||||||
|
=+ compiler-source=.^(@t %cx (welp sys /hoon/hoon))
|
||||||
|
::
|
||||||
|
:: compiler-twig: compiler as hoon expression
|
||||||
|
::
|
||||||
|
~& %brass-parsing
|
||||||
|
=+ compiler-twig=(rain /sys/hoon/hoon compiler-source)
|
||||||
|
~& %brass-parsed
|
||||||
|
::
|
||||||
|
:: compiler-formula: compiler as nock formula
|
||||||
|
::
|
||||||
|
~& %brass-compiling
|
||||||
|
=+ compiler-formula=q:(~(mint ut %noun) %noun compiler-twig)
|
||||||
|
~& %brass-compiled
|
||||||
|
::
|
||||||
|
:: arvo-source: hoon source file producing arvo kernel, `sys/arvo`
|
||||||
|
::
|
||||||
|
=+ arvo-source=.^(@t %cx (welp sys /arvo/hoon))
|
||||||
|
::
|
||||||
|
:: boot-ova: startup events
|
||||||
|
::
|
||||||
|
=/ boot-ova=(list)
|
||||||
|
:~ aeon:eden:part
|
||||||
|
boot:eden:part
|
||||||
|
compiler-formula
|
||||||
|
compiler-source
|
||||||
|
arvo-source
|
||||||
|
==
|
||||||
|
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
|
||||||
|
::
|
||||||
|
:+ %pill %brass
|
||||||
|
:+ boot-ova
|
||||||
|
:~ (boot-ovum:pill compiler-source arvo-source)
|
||||||
|
(file-ovum2:pill bas)
|
||||||
|
==
|
||||||
|
=. dez (snoc dez [%base bas])
|
||||||
|
%+ weld
|
||||||
|
(turn dez file-ovum)
|
||||||
|
?. prime ~
|
||||||
|
[(prep-ovum (turn dez tail))]~
|
||||||
|
::
|
||||||
|
++ ivory
|
||||||
|
|= sys=path
|
||||||
|
^- pill
|
||||||
|
=/ lib (snoc (scag 3 sys) %lib)
|
||||||
|
|^ =/ ver
|
||||||
|
=/ sub *(trap vase)
|
||||||
|
=. sub (build-sys sub %hoon)
|
||||||
|
=. sub (build-sys sub %arvo)
|
||||||
|
=. sub (build-sys sub %lull)
|
||||||
|
=. sub (build-sys sub %zuse)
|
||||||
|
=. sub (build-lib sub & %ethereum)
|
||||||
|
=. sub (build-lib sub & %azimuth)
|
||||||
|
(build-lib sub | %vere)
|
||||||
|
=/ nok !.
|
||||||
|
=> *[ver=(trap vase) ~]
|
||||||
|
!= q:$:ver
|
||||||
|
ivory/[nok ver ~]
|
||||||
|
::
|
||||||
|
++ build-sys
|
||||||
|
|= [sub=(trap vase) nam=term] ^- (trap vase)
|
||||||
|
~> %slog.[0 leaf+"ivory: building /sys/{(trip nam)}"]
|
||||||
|
(swat sub (rain /sys/[nam]/hoon .^(@t cx+(welp sys /[nam]/hoon))))
|
||||||
|
::
|
||||||
|
++ build-lib
|
||||||
|
|= [sub=(trap vase) imp=? nam=term] ^- (trap vase)
|
||||||
|
~> %slog.[0 leaf+"ivory: building /lib/{(trip nam)}"]
|
||||||
|
=/ hun=hoon
|
||||||
|
%+ mist /lib/[nam]/hoon
|
||||||
|
.^(@t cx+(welp lib /[nam]/hoon))
|
||||||
|
?. imp (swat sub hun)
|
||||||
|
(swel sub [%ktts nam hun])
|
||||||
|
:: +mist: +rain but skipping past ford runes
|
||||||
|
::
|
||||||
|
++ mist
|
||||||
|
|= [bon=path txt=@]
|
||||||
|
^- hoon
|
||||||
|
=+ vas=vast
|
||||||
|
~| bon
|
||||||
|
%+ scan (trip txt)
|
||||||
|
%- full
|
||||||
|
=; fud
|
||||||
|
(ifix [;~(plug gay fud) gay] tall:vas(wer bon))
|
||||||
|
%- star
|
||||||
|
;~ pose vul
|
||||||
|
%+ ifix [fas (just `@`10)]
|
||||||
|
(star ;~(less (just `@`10) next))
|
||||||
|
==
|
||||||
|
:: +swel: +swat but with +slop
|
||||||
|
::
|
||||||
|
++ swel
|
||||||
|
|= [tap=(trap vase) gen=hoon]
|
||||||
|
^- (trap vase)
|
||||||
|
=/ gun (~(mint ut p:$:tap) %noun gen)
|
||||||
|
=> [tap=tap gun=gun]
|
||||||
|
|. ~+
|
||||||
|
=/ pro q:$:tap
|
||||||
|
[[%cell p.gun p:$:tap] [.*(pro q.gun) pro]]
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ events
|
||||||
|
|%
|
||||||
|
+$ prop [%prop meta tier (list ovum)]
|
||||||
|
+$ meta term
|
||||||
|
+$ tier ?(%fore %hind) :: before or after userspace
|
||||||
|
::
|
||||||
|
++ install
|
||||||
|
|= [as=desk =beak pri=?]
|
||||||
|
^- prop
|
||||||
|
:^ %prop (rap 3 %install '-' as ~) %hind
|
||||||
|
::TODO will exclude non-:directories files, such as /changelog/txt
|
||||||
|
=- (murn - same)
|
||||||
|
^- (list (unit ovum))
|
||||||
|
:~ `(file-ovum as (en-beam beak /))
|
||||||
|
::
|
||||||
|
?. pri ~
|
||||||
|
`(prep-ovum (en-beam beak /) ~)
|
||||||
|
::
|
||||||
|
`[/d/install/[as] [%seat as]]
|
||||||
|
==
|
||||||
|
--
|
||||||
--
|
--
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user