Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

?_ rune #24

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions UIPS/UIP-0014.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
uip: 0114
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please quote the UIP so GH doesn't parse it as octal

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uip: 0114
uip: "0114"

title: ?_ rune, noun equality restricts type to left parameter
description: for use with dependently typed maps and other related value-based type inference
author: ~sarpen-laplux (@xiphiness)
status: Draft
type: Standards Track
category: Kernel
created: ~2023.8.9
---

## Abstract

This PR introduces a new rune ?_(a=hoon b=wing), subject to renaming, whose compiled nock is equivalent to .=, but refines the type of b to that of a on noun equality.

## Specification

See https://github.com/urbit/urbit/pull/6656
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reproduce the spec here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, and expanded upon it


## Rationale

This procedure can be generalized to work with arbitrary ships, but it's not necessary that it be used for anyone other than our galaxy until we either start forwarding through stars, or need some keep-alive mechanism for "sticky" scry requests. Both of those are planned for the future. The current design keeps formal pings from /app/ping to the rest of the (non-galaxy) sponsorship hierarchy. These could be removed, since galaxies can statelessly forward packets from the sponsor star to the sponsee.

Initially only galaxies will need to act as STUN servers, but any ship could support STUN requests. These could be used to check connectivity with other ships outside of the event loop, and, if additionally listening on a standard port, could provide useful service to applications running outside of urbit (such as webrtc clients).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STUN with ?_!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a very cool, entirely unexpected feature!

## Backwards Compatibility

This PR properly would at least modify map and ordered map, and should make sure that this doesn't break compilation everywhere those are used.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).