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

Cheat Sheet? #16

Open
no-identd opened this issue Dec 12, 2018 · 1 comment
Open

Cheat Sheet? #16

no-identd opened this issue Dec 12, 2018 · 1 comment

Comments

@no-identd
Copy link

no-identd commented Dec 12, 2018

A "dumb" cheat sheet of all Commands, Syntax & Semantics would help. The ToC of https://github.com/JeffreyBenjaminBrown/digraphs-with-text/blob/master/Hash/the-hash-language.md kind of works as this, but not really. I've tried to write a dump of it here:

Opening an empty UI:
ui empty

M-v - Treat the currently entered text as something to query from the RSLT & view the results
M-a - Treat the currently entered text as something to add to the RSLT, and do so
Esc - Cleanly escape the UI

Semi-reserved symbols:
# - adjacent to an expression indicates that the expression is (one of the labels in) a relationship template. Repeat to increase precedence/force earlier binding. (Alternatively put: Repeat to force further up in the hierarchy.)
( and ) - Encloses multi-word expressions. Useful both for explicitly & for implicitly relating relationship templates
_ - "Blank", Substitute for expressions inside relationship templates (Relationship templates only contain labels)

Reserved words for parsing:
/users integer "Find all Nodes that link to to the given Node" & return them.
/queries - Returns the query history
/all - Returns all nodes

Reserved words & symbols for querying:
/any - Wildcard, matches any expression
/it - Returns the subexpression that appears where /it appears in the query
& - Intersection operator ("and"). Repeat to decrease precedence/force later binding.
| - Union operator ("either"). Repeat to decrease precedence/force later binding.
\ Difference operator ("except"). Repeat to decrease precedence/force later binding.
/eval - Forces early evaluation of a subexpression. Useful for sub-queries.
/branch - Recursively evaluate. Must combine with /from and /to
/from
/to

I have no idea yet:
/mb - Similar to /branch, but more flexible - albeit I have no idea how it works because I haven't figured out pRoleMap yet. (Little help here?)

Importing/Exporting data via the GHCi prompt:

See here: https://github.com/JeffreyBenjaminBrown/digraphs-with-text/blob/master/introduction/try-the-ui.md#saving-to-disk-and-reading-from-disk

As it stands, the above cheat sheet almost certainly contains errors & remains incomplete - but I've (for now) run out of time for completing it, and will come back to it later.

@no-identd
Copy link
Author

Unary relationships one might wish to consider for ones RLST:

  • maybe _
  • not _
  • for every _ (Mentioned in the PDF, but not in the .md)
  • there exists _ (Mentioned in the PDF, but not in the .md)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant