Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rybla/sexp-ze-poc
https://github.com/rybla/sexp-ze-poc
Last synced: about 8 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/rybla/sexp-ze-poc
- Owner: rybla
- Created: 2024-09-08T17:49:35.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T02:48:32.000Z (about 2 months ago)
- Last Synced: 2024-09-15T05:39:44.320Z (about 2 months ago)
- Language: PureScript
- Homepage: https://rybla.github.io/sexp-ze-poc/
- Size: 522 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sexp-ze-poc
To run the webapp locally:
```sh
pnpm install
pnpm run build
pnpm run serve
```## Notes
There are three kinds of cursors:
- __point__: a position between two subexpressions.
- __span__: a contiguous span between two points that contains equal number of
open and close parentheses
- __zipper__: a one-hole-context formed by two spans surrounding a third span,
where the two outer spans contain equal numbers of open and close parentheses.Importantly, a span does not need to be a valid subexpression. So, for example,
the following is a valid span: `) (`.Though, spans and zippers have an associated number that is half the number of
unclosed parentheses they contain. So `) (` has an unclosed number `1`, and `))
(((a b)` has an unclosed number `2`.Usually we just have a cursor as pointing into a expression. But sometimes, for
example in the clipboard, we need to encode a standalone cursor.A standalone span is encoded by:
- an expression
- this is a valid expression, but is surrounded by `n` pairs of extra pairs of
parentheses, where `n` is the unclosed number
- an unclosed numberA standalone zipper is encoded by:
- an expression
- (in same way as standalone span), this is a valid expression, but is
surrounded by `n` pairs of extra pairs of parentheses, where `n` is the
unclosed number
- an unclosed number
- a point into the expression (which is where the hole of the one-hole context
is)