3 title/'2f: Noun Ordering'
15Computes whether `a` and `b` are in alphabetical order, producing a flag.
42 =+ [c=(end 3 1 a) d=(end 3 1 b)]
44 $(a (rsh 3 1 a), b (rsh 3 1 b))
66 > (aor "abcdefz" "abcdefa")
69 > (aor "abcdefa" "abcdefz")
85Computes whether `a` and `b` are in ascending numeric order, producing a flag.
123 > (dor ~[1 2 3] ~[1 2 4])
126 > (dor ~[1 2 4] ~[1 2 3])
129 > (dor `(list @)`~[99 100 10.000] ~[99 101 10.000])
132 > (dor ~[99 101 10.999] `(list @)`~[99 100 10.000])
138If `a` and `b` are both atoms, `dor` is equivalent to [`lte`](../1a). If they're
139cells, `dor` recurses on the heads, and then if the heads are the same it checks
142If one sample is a cell and the other is an atom, the cell sample is treated as
151Computes whether of `(mug a)` and `(mug b)` are in ascending numeric order,
152producing a flag. If the `mug` hashes are equal, `a` and `b` are compared by
155[`mug`](../2e) is the the 31-bit nonzero FNV-1a hash algorithm.
174 =+ [c=(mug a) d=(mug b)]
213 > (gor (some 10) `(list @)`[1 2 3 ~])
219`map`s use `gor` on the key for horizontal ordering and `vor` for
220vertical order. `map`s only look at the keys (the head of the key-value pair
221elements) for ordering.
228If `a` and `b` are atoms, they are computed as samples of `gor`, producing a
231If `a` and `b` are cells, `hor` checks to see if their heads are equal. If their
232heads are equal, `gor` is computed on their tails, producing a flag. If their
233heads are not equal, `gor` is computed on their heads, producing a flag.
235If `a` is an atom and `b` is not, then `%.y` is produced. If `b` is an atom and
236`a` is not, `%.n` is produced.
285 > (hor 500.000.000 "foo")
288 > (hor "foo" 500.000.000)
294 > (gor `(list @)`[0 ~] 1)
297 > (hor `(list @)`[50 500 5.000 ~] 1)
303Sets (+set, +in) use `hor` for their horizontal order and `vor` for their
304vertical order. See [`apt:in`](../2h) to see how a set verifies its correctness.
305`vor` is used to verify.
312Computes whether the corresponding legs of `a` and `b` are in ascending
313numeric order, producing a flag.
353 > (lor `(list @)`[1 2 3 ~] `(list @)`[1 2 3 4 ~])
356 > (lor `(list @)`[1 2 3 ~] `(list @)`[1 2 2 ~])
359 > (lor `(list @)`[1 2 3 ~] `(list @)`[2 2 ~])
362 > (lor [2 2 5] [1 5 9 8])
365 > (lor [1 5 8] [1 5 9 8])
368 > (lor [1 2 3] [1 2])
374`lor` is no longer used internally.
381Computes whether the double-hashes `(mug (mug a))` and `(mug (mug b))` are in
382ascending numeric order, producing a flag. If the double-`mug` hashes are
383equal, `a` and `b` are compared by `dor` instead.
385[`mug`](../2e) is the the 31-bit nonzero FNV-1a hash algorithm.
405 =+ [c=(mug (mug a)) d=(mug (mug b))]
417 > [(mug 'f') (mug 'g')]
418 [1.661.740.952 1.644.963.335]
420 > [(mug (mug 'f')) (mug (mug 'g'))]
421 [261.421.509 1.861.258.547]
426 > (vor 43.326 41.106)
432Maps, sets, and queues all use `vor` to check for vertical ordering. Maps and
433sets also use `gor` and `hor` for horizontal order, respectively, but queues use
434vertical ordering alone.
436Since hashing removes correlation, double-`mug`ging with `vor` removes
437correlation with single-`mug`ged `hor`. Vertical order becomes uncorrelated
438with horizontal order.
446 ++ noun ,* :: any noun
462 ++ null ,~ :: null, nil, etc
480Type and location of core-shaped thing? XX Compiler Internals
488 [%| p=axis q=(list ,[p=type q=foot])] ::
497 [p=0 q=[%.y p=%void]]
507A restricted text atom for canonical atom syntaxes. The prefix is `~.`.
508There are no escape sequences except `~~`, which means `~`, and `~-`,
509which means `_`. `-` and `.` encode themselves. No other characters
510besides numbers and lowercase letters are permitted.
515 ++ span ,@ta :: text-atom (ASCII)
553A `++wing` or `++hoon`.
555 > (ream '=+ a=4 ?-(a @ ~)')
557 p=[%ktts p=p=%a q=[%dtzy p=%ud q=4]]
561 q=~[[p=[%axil p=[%atom p=~.]] q=[%bczp p=%null]]]
564 > (ream '=+ a=4 ?-(4 @ ~)')
566 p=[%ktts p=p=%a q=[%dtzy p=%ud q=4]]
569 p=[%.n p=~ q=[%dtzy p=%ud q=4]]
570 q=~[[p=[%axil p=[%atom p=~.]] q=[%bczp p=%null]]]
582A face, or tree of faces. A `++toga` is applied to anything assigned
585XX move to `++ut` and rune doc (for \^= examples)
590 ++ toga :: face control
591 [2 p=toga q=toga] :: cell toga
601 [%ktts p=p=%a q=[%dtzy p=%ud q=1]]
604 > (ream '[a b]=[1 2 3]')
607 q=[%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
612 > (ream '[a ~]=[1 2 3]')
614 p=[%2 p=p=%a q=[%0 ~]]
615 q=[%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
624Intermediate Nock computation result
626Similar to `++toon`, but stack trace is not yet rendered.
631 ++ tone $% [%0 p=*] :: success
637 > (mink [[20 21] 0 3] ,~)
640 > (mink [[0] !=(.^(cy//=main/1))] ,~)
641 [%1 p=~[[31.075 1.685.027.454 1.852.399.981 49 0]]]
642 > (path [31.075 1.685.027.454 1.852.399.981 49 0])
645 > (mink [[1 2] !=(~|(%hi +(.)))] ,~)
646 [%2 p=~[[~.yelp 26.984]]]
647 > (mink [[1 2] !=(!:(+(.)))] ,~)
654 \/159.445.990.350.374.058.574.398.238.344.143.957.205.628.479.572.65\/
681 [%d p=hoon] :: dynamic list
682 [%e p=hoon q=(list tuna)] :: element
683 [%f p=(list tuna)] :: subflow
689Leaf %a contains plain-text, %b an empty tag, %c a static list, %d a
690dynamic list, %e a full node element containing a hoon and a list of
691tuna, and %f is a empty node.
703List of `++hoon`s. In `:*`, for example, your contents is
709 ++ tusk (list hoon) ::
716 [%cltr p=~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]]
717 > (tusk +:(ream '[1 2 3]'))
718 ~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]
728An expression, or AST.
730See Rune section of Hoon reference
740List of `++unit` `++hoon`, or gaps left to be inferred, in `++path`
741parsing. When you use a path such as `/=main=/pub/src/doc` the path is in fact
742a `++tyke`, where the `=` are inferred from your current path.
748 ++ tyke (list (unit hoon)) ::
754 > (scan "/==as=" porc:vast)
755 [0 ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]]
756 > `tyke`+:(scan "/==as=" porc:vast)
757 ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]
767Pointer for `++type`. `++typo` preserves the previous `++type` in your
773 ++ typo type :: old type
778See also: `++seem`, `++vise`, `++type`
788Associative list of `++term` `++hoon`, used in jet hint processing.
793 ++ tyre (list ,[p=term q=hoon]) ::
801Typed data. A `++vase` is used wherever typed data is explicitly worked
807 ++ vase ,[p=type q=*] :: type-value pair
814 [p=[%cube p=0 q=[%atom p=%n]] q=0]
824Used to convert from previously-typed data during reboot.
829 ++ vise ,[p=typo q=*] :: old vase
834See also: `++typo`, `++seer`
843 ++ wing (list limb) ::
846Address in subject. A `++wing` is a path to a value in the subject. A
847term alone is the trivial case of a `++wing`.
853 [%cnzz p=~[%a [%.y p=3] %c]]
854 > (wing +:(ream 'a.+.c'))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list