mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 05:22:27 +03:00
various: move away from {type} syntax
In favor of [type] syntax. Turns a bunch of ++ into +$ along the way.
This commit is contained in:
parent
ebe0feed50
commit
a539d986a7
@ -10,14 +10,14 @@
|
||||
:::: :: ::::
|
||||
:: :: ::
|
||||
=> |% :: external structures
|
||||
++ id @tasession :: session id
|
||||
++ house :: all state
|
||||
+$ id @tasession :: session id
|
||||
+$ house :: all state
|
||||
$: %6
|
||||
egg=@u :: command count
|
||||
hoc=(map id session) :: conversations
|
||||
acl=(set ship) :: remote access whitelist
|
||||
== ::
|
||||
++ session :: per conversation
|
||||
+$ session :: per conversation
|
||||
$: say=sole-share :: command-line state
|
||||
dir=beam :: active path
|
||||
poy=(unit dojo-project) :: working
|
||||
@ -32,7 +32,7 @@
|
||||
old=(set term) :: used TLVs
|
||||
buf=tape :: multiline buffer
|
||||
== ::
|
||||
++ monkey :: per conversation
|
||||
+$ monkey :: per conversation
|
||||
$: say=sole-share :: command-line state
|
||||
dir=beam :: active path
|
||||
poy=(unit dojo-project) :: working
|
||||
@ -40,52 +40,52 @@
|
||||
old=(set term) :: used TLVs
|
||||
buf=tape :: multiline buffer
|
||||
== ::
|
||||
++ dojo-command ::
|
||||
+$ dojo-command ::
|
||||
$^ (pair dojo-sink dojo-source) :: route value
|
||||
{%brev p=term} :: unbind variable
|
||||
[%brev p=term] :: unbind variable
|
||||
::
|
||||
++ dojo-sink ::
|
||||
$% {%flat p=path} :: atom to unix
|
||||
{%pill p=path} :: noun to unix pill
|
||||
:: {%tree p=path} :: noun to unix tree
|
||||
{%file p=beam} :: save to clay
|
||||
+$ dojo-sink ::
|
||||
$% [%flat p=path] :: atom to unix
|
||||
[%pill p=path] :: noun to unix pill
|
||||
:: [%tree p=path] :: noun to unix tree
|
||||
[%file p=beam] :: save to clay
|
||||
$: %http :: http outbound
|
||||
p=?(%post %put)
|
||||
r=@t
|
||||
==
|
||||
{%poke p=goal} :: poke app
|
||||
{%show p=?(%0 %1 %2 %3 %4 %5)} :: val=type=hoon=xray
|
||||
{%verb p=term} :: store variable
|
||||
[%poke p=goal] :: poke app
|
||||
[%show p=?(%0 %1 %2 %3 %4 %5)] :: val=type=hoon=xray
|
||||
[%verb p=term] :: store variable
|
||||
== ::
|
||||
++ dojo-source :: construction node
|
||||
+$ dojo-source :: construction node
|
||||
$: p=@ud :: assembly index
|
||||
q=dojo-build :: general build
|
||||
== ::
|
||||
++ dojo-build :: one arvo step
|
||||
+$ dojo-build :: one arvo step
|
||||
$~ [%ex *hoon]
|
||||
$% {%ur p=@t} :: http GET request
|
||||
{%ge p=dojo-model} :: generator
|
||||
{%te p=term q=(list dojo-source)} :: thread
|
||||
{%dv p=path} :: core from source
|
||||
{%ex p=hoon} :: hoon expression
|
||||
{%sa p=mark} :: example mark value
|
||||
{%as p=mark q=dojo-source} :: simple transmute
|
||||
{%do p=hoon q=dojo-source} :: gate apply
|
||||
{%tu p=(list dojo-source)} :: tuple
|
||||
$% [%ur p=@t] :: http GET request
|
||||
[%ge p=dojo-model] :: generator
|
||||
[%te p=term q=(list dojo-source)] :: thread
|
||||
[%dv p=path] :: core from source
|
||||
[%ex p=hoon] :: hoon expression
|
||||
[%sa p=mark] :: example mark value
|
||||
[%as p=mark q=dojo-source] :: simple transmute
|
||||
[%do p=hoon q=dojo-source] :: gate apply
|
||||
[%tu p=(list dojo-source)] :: tuple
|
||||
== ::
|
||||
++ dojo-model :: data construction
|
||||
+$ dojo-model :: data construction
|
||||
$: p=dojo-server :: core source
|
||||
q=dojo-config :: configuration
|
||||
== ::
|
||||
++ dojo-server :: numbered device
|
||||
+$ dojo-server :: numbered device
|
||||
$: p=@ud :: assembly index
|
||||
q=path :: gate path
|
||||
== ::
|
||||
++ dojo-config :: configuration
|
||||
+$ dojo-config :: configuration
|
||||
$: p=(list dojo-source) :: by order
|
||||
q=(map term (unit dojo-source)) :: by keyword
|
||||
== ::
|
||||
++ dojo-project :: construction state
|
||||
+$ dojo-project :: construction state
|
||||
$: mad=dojo-command :: operation
|
||||
num=@ud :: number of tasks
|
||||
cud=(unit dojo-source) :: now solving
|
||||
@ -95,8 +95,8 @@
|
||||
job=(map @ud dojo-build) :: problems
|
||||
rez=(map @ud cage) :: results
|
||||
== ::
|
||||
++ bead {p=(set beam) q=cage} :: computed result
|
||||
++ goal {p=ship q=term} :: flat application
|
||||
+$ bead [p=(set beam) q=cage] :: computed result
|
||||
+$ goal [p=ship q=term] :: flat application
|
||||
--
|
||||
=>
|
||||
|%
|
||||
@ -130,7 +130,7 @@
|
||||
++ parse-variable
|
||||
|* [sym=rule src=rule]
|
||||
%+ cook
|
||||
|= {a=term b=(unit dojo-source)}
|
||||
|= [a=term b=(unit dojo-source)]
|
||||
^- dojo-command
|
||||
?~(b [%brev a] [[%verb a] u.b])
|
||||
;~(plug sym (punt src))
|
||||
@ -146,7 +146,7 @@
|
||||
::
|
||||
;~ pfix col
|
||||
%+ cook
|
||||
|= {a=goal b=$^(dojo-model dojo-source)}
|
||||
|= [a=goal b=$^(dojo-model dojo-source)]
|
||||
?@ -.b [[%poke a] b]
|
||||
(to-command a b)
|
||||
;~ plug
|
||||
@ -316,7 +316,7 @@
|
||||
++ xsell `$-(vase tank)`vase-to-tank:pprint
|
||||
::
|
||||
++ he :: per session
|
||||
|_ {hid=bowl:gall =id moz=(list card:agent:gall) session}
|
||||
|_ [hid=bowl:gall =id moz=(list card:agent:gall) session]
|
||||
::
|
||||
++ he-beam
|
||||
^- beam
|
||||
@ -363,7 +363,7 @@
|
||||
[%pass u.pux %arvo %c %warp ship desk ~]
|
||||
::
|
||||
++ dy-errd :: reject change, abet
|
||||
|= {rev=(unit sole-edit) err=@u}
|
||||
|= [rev=(unit sole-edit) err=@u]
|
||||
^+ +>+>
|
||||
(he-errd(poy `+>+<) rev err)
|
||||
::
|
||||
@ -493,7 +493,7 @@
|
||||
(dy-made-dial %noun p.res)
|
||||
::
|
||||
++ dy-cast
|
||||
|* {typ=_* bun=vase}
|
||||
|* [typ=_* bun=vase]
|
||||
|= a=vase ^- typ
|
||||
~| [p.bun p.a]
|
||||
?> (~(nest ut p.bun) & p.a)
|
||||
@ -503,7 +503,7 @@
|
||||
^+ +>
|
||||
:: XX needs filter
|
||||
::
|
||||
?: ?=({%show %3} -.mad)
|
||||
?: ?=([%show %3] -.mad)
|
||||
(dy-rash %tan (dy-show-source q.mad) ~)
|
||||
?: ?=(%brev -.mad)
|
||||
=. var (~(del by var) p.mad)
|
||||
@ -539,8 +539,8 @@
|
||||
%dir =+ ^= pax ^- path
|
||||
=+ pax=((dy-cast path !>(*path)) q.cay)
|
||||
?: ?=(~ pax) ~[(scot %p our.hid) %home '0']
|
||||
?: ?=({@ ~} pax) ~[i.pax %home '0']
|
||||
?: ?=({@ @ ~} pax) ~[i.pax i.t.pax '0']
|
||||
?: ?=([@ ~] pax) ~[i.pax %home '0']
|
||||
?: ?=([@ @ ~] pax) ~[i.pax i.t.pax '0']
|
||||
pax
|
||||
=. dir (need (de-beam:format pax))
|
||||
=- +>(..dy (he-diff %tan - ~))
|
||||
@ -605,7 +605,7 @@
|
||||
:: Print a value (given as a cage) and a note (given as a tang).
|
||||
::
|
||||
++ dy-xprint
|
||||
|= {cay=cage tan=tang}
|
||||
|= [cay=cage tan=tang]
|
||||
%+ dy-rash %tan
|
||||
%- welp :_ tan
|
||||
?+ p.cay [(xsell q.cay)]~
|
||||
@ -615,7 +615,7 @@
|
||||
=- (flop (turn `wall`- |=(a=tape leaf+(dash:us a '' ~))))
|
||||
:- "HTTP {<p.hit>}"
|
||||
%+ weld
|
||||
(turn q.hit |=({a=@t b=@t} "{(trip a)}: {(trip b)}"))
|
||||
(turn q.hit |=([a=@t b=@t] "{(trip a)}: {(trip b)}"))
|
||||
:- i=""
|
||||
t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip)
|
||||
==
|
||||
@ -623,7 +623,7 @@
|
||||
:: Print a value (given as a cage) and a note (given as a tang).
|
||||
::
|
||||
++ dy-print
|
||||
|= {cay=cage tan=tang}
|
||||
|= [cay=cage tan=tang]
|
||||
%+ dy-rash %tan
|
||||
%- welp :_ tan
|
||||
?+ p.cay [(sell q.cay)]~
|
||||
@ -633,29 +633,29 @@
|
||||
=- (flop (turn `wall`- |=(a=tape leaf+(dash:us a '' ~))))
|
||||
:- "HTTP {<p.hit>}"
|
||||
%+ weld
|
||||
(turn q.hit |=({a=@t b=@t} "{(trip a)}: {(trip b)}"))
|
||||
(turn q.hit |=([a=@t b=@t] "{(trip a)}: {(trip b)}"))
|
||||
:- i=""
|
||||
t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip)
|
||||
==
|
||||
++ dy-show-type-noun
|
||||
|= a=type ^- tank
|
||||
=- >[-]<
|
||||
|- ^- $? $% {%atom @tas (unit @)}
|
||||
{%cell _$ _$}
|
||||
{%face $@(term tune) _$}
|
||||
{%fork (set _$)}
|
||||
{%hold _$ hoon}
|
||||
|- ^- $? $% [%atom @tas (unit @)]
|
||||
[%cell _$ _$]
|
||||
[%face $@(term tune) _$]
|
||||
[%fork (set _$)]
|
||||
[%hold _$ hoon]
|
||||
==
|
||||
wain :: "<|core|>"
|
||||
$?(%noun %void)
|
||||
==
|
||||
?+ a a
|
||||
{%face ^} 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)))))
|
||||
{%hint *} !!
|
||||
{%core ^} `wain`/core
|
||||
{%hold *} a(p $(a p.a))
|
||||
[%face ^] 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)))))
|
||||
[%hint *] !!
|
||||
[%core ^] `wain`/core
|
||||
[%hold *] a(p $(a p.a))
|
||||
==
|
||||
::
|
||||
:: XX needs filter
|
||||
@ -668,25 +668,25 @@
|
||||
::$? hoon
|
||||
;: jank-bucwut
|
||||
hoon
|
||||
$^ {dy-shown dy-shown}
|
||||
$% {%ur cord}
|
||||
{%sa mark}
|
||||
{%as mark dy-shown}
|
||||
{%do hoon dy-shown}
|
||||
{%te term (list dy-shown)}
|
||||
{%ge path (list dy-shown) (map term (unit dy-shown))}
|
||||
{%dv path}
|
||||
$^ [dy-shown dy-shown]
|
||||
$% [%ur cord]
|
||||
[%sa mark]
|
||||
[%as mark dy-shown]
|
||||
[%do hoon dy-shown]
|
||||
[%te term (list dy-shown)]
|
||||
[%ge path (list dy-shown) (map term (unit dy-shown))]
|
||||
[%dv path]
|
||||
==
|
||||
==
|
||||
::
|
||||
++ dy-show-source
|
||||
|= a=dojo-source ^- tank
|
||||
=- >[-]<
|
||||
=+ `{@ bil=dojo-build}`a
|
||||
=+ `[@ bil=dojo-build]`a
|
||||
|- ^- dy-shown
|
||||
?- -.bil
|
||||
$?(%ur %dv %sa) bil
|
||||
%ex ?. ?=({%cltr *} p.bil) p.bil
|
||||
%ex ?. ?=([%cltr *] p.bil) p.bil
|
||||
|- ^- hoon
|
||||
?~ p.p.bil !!
|
||||
?~ t.p.p.bil i.p.p.bil
|
||||
@ -742,7 +742,7 @@
|
||||
?. (~(nest ut [%cell [%atom %$ ~] %noun]) | p.q.cay)
|
||||
:: naked generator; takes one argument
|
||||
::
|
||||
?. &(?=({* ~} p.cig) ?=(~ q.cig))
|
||||
?. &(?=([* ~] p.cig) ?=(~ q.cig))
|
||||
~|(%one-argument !!)
|
||||
=/ res (mule |.((slam q.cay (dy-vase p.i.p.cig))))
|
||||
?: ?=(%| -.res)
|
||||
@ -903,7 +903,7 @@
|
||||
?.(=(gen -) $(gen -) gen)
|
||||
|= gen=hoon ^- (unit cage)
|
||||
=. gen (ope gen)
|
||||
?: ?=({%cnts {@ ~} ~} gen)
|
||||
?: ?=([%cnts [@ ~] ~] gen)
|
||||
(~(get by var) i.p.gen)
|
||||
~
|
||||
:: +dy-mere: execute hoon and complete construction step
|
||||
@ -993,7 +993,7 @@
|
||||
he-prom:he-pone
|
||||
::
|
||||
++ he-errd :: reject update
|
||||
|= {rev=(unit sole-edit) err=@u} ^+ +>
|
||||
|= [rev=(unit sole-edit) err=@u] ^+ +>
|
||||
=+ red=(fall rev [%nop ~]) :: required for error location sync
|
||||
=^ lic say (~(transmit sole say) red)
|
||||
(he-diff %mor [%det lic] [%err err] ~)
|
||||
@ -1034,7 +1034,7 @@
|
||||
==
|
||||
::
|
||||
++ he-unto :: result from agent
|
||||
|= {way=wire cit=sign:agent:gall}
|
||||
|= [way=wire cit=sign:agent:gall]
|
||||
^+ +>
|
||||
?. ?=(%poke-ack -.cit)
|
||||
~& [%strange-unto cit]
|
||||
@ -1087,8 +1087,8 @@
|
||||
%. [%httr !>((to-httr:iris response-header.response full-file.response))]
|
||||
=+ dye=~(. dy u.poy(pux ~))
|
||||
?+ way !!
|
||||
{%hand ~} dy-hand:dye
|
||||
{%show ~} dy-show:dye
|
||||
[%hand ~] dy-hand:dye
|
||||
[%show ~] dy-show:dye
|
||||
==
|
||||
::
|
||||
++ he-lens
|
||||
@ -1443,7 +1443,7 @@
|
||||
==
|
||||
::
|
||||
++ he-lame :: handle error
|
||||
|= {wut=term why=tang}
|
||||
|= [wut=term why=tang]
|
||||
^+ +>
|
||||
%- (slog (flop `tang`[>%dojo-lame wut< why]))
|
||||
?^ poy
|
||||
@ -1460,10 +1460,10 @@
|
||||
::
|
||||
^- cage
|
||||
:- %noun
|
||||
=+ sloop=|=({a=vase b=vase} ?:(=(*vase a) b ?:(=(*vase b) a (slop a b))))
|
||||
=+ sloop=|=([a=vase b=vase] ?:(=(*vase a) b ?:(=(*vase b) a (slop a b))))
|
||||
%+ sloop
|
||||
%- ~(rep by var)
|
||||
|= {{a=term @ b=vase} c=vase} ^- vase
|
||||
|= [[a=term @ b=vase] c=vase] ^- vase
|
||||
(sloop b(p face+[a p.b]) c)
|
||||
!>([our=our now=now eny=eny]:hid)
|
||||
--
|
||||
|
@ -8,7 +8,7 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= {^ {arg=(list path)} vane=?(%g %c)}
|
||||
|= [^ [arg=(list path)] vane=?(%g %c)]
|
||||
=- tang+(flop `tang`(zing -))
|
||||
%+ turn arg
|
||||
|= pax=path
|
||||
@ -22,7 +22,7 @@
|
||||
~
|
||||
[rose+[" " `~]^~[leaf+"~" (smyt pax)]]~
|
||||
::
|
||||
{{@t ~} ~ ~}
|
||||
[[@t ~] ~ ~]
|
||||
$(pax (welp pax /[p.n.dir.ark]))
|
||||
::
|
||||
*
|
||||
|
@ -3,7 +3,7 @@
|
||||
:::: /hoon/code/gen
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
~
|
||||
~
|
||||
==
|
||||
|
@ -37,8 +37,8 @@
|
||||
:: with {a}. use this convention only for one-liners, etc.
|
||||
::
|
||||
:: the file below is a medium-sized generator, built around
|
||||
:: a typical two-core structure. the cores are labeled {%arch}
|
||||
:: (structures) and {%work} (productions). this is canonical.
|
||||
:: a typical two-core structure. the cores are labeled [%arch}
|
||||
:: (structures) and [%work} (productions). this is canonical.
|
||||
::
|
||||
:: this code is written to display the variety of formatting
|
||||
:: options the parser allows. a specific convention should pick
|
||||
|
@ -8,6 +8,6 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= {^ {{txt=@tas ~} ~}}
|
||||
|= [^ [[txt=@tas ~] ~]]
|
||||
:- %noun
|
||||
(crip (weld "hello, " (trip txt)))
|
||||
|
@ -16,13 +16,13 @@
|
||||
['-' $(a t.a)]
|
||||
::
|
||||
++ rend
|
||||
|= {a=@thoon b=path} ^- tank
|
||||
|= [a=@thoon b=path] ^- tank
|
||||
=; c=(pair tape tape)
|
||||
=/ tab (sub 10 (mod (lent "{p.c} ") 10))
|
||||
[%palm [" {(reap tab ' ')}" ``~] leaf+p.c leaf+q.c ~]
|
||||
:- ?- b
|
||||
~ "/" :: XX !! maybe?
|
||||
{%hood ^} "|{(path-heps t.b)}"
|
||||
[%hood ^] "|{(path-heps t.b)}"
|
||||
^ "+{(path-heps b)}" :: XX deal with :graph-store|foo
|
||||
==
|
||||
=/ c (to-wain:format a)
|
||||
@ -32,16 +32,16 @@
|
||||
(trip i.c)
|
||||
::
|
||||
++ read-at
|
||||
|= {len=@u pax=path}
|
||||
|= {nam=@t ark=arch} ^- (unit {@t path})
|
||||
|= [len=@u pax=path]
|
||||
|= [nam=@t ark=arch] ^- (unit [@t path])
|
||||
?. (~(has by dir.ark) %hoon) ~
|
||||
%+ bind (file:space:userlib (welp pax /[nam]/hoon))
|
||||
|= a=* ^- {cord path}
|
||||
|= a=* ^- [cord path]
|
||||
[;;(@t a) (welp (slag len pax) /[nam])]
|
||||
--
|
||||
::
|
||||
:- %say
|
||||
|= {{now=time @ our=ship ^} typ=$@(~ {p=term ~}) ~}
|
||||
|= [[now=time @ our=ship ^] typ=$@(~ [p=term ~]) ~]
|
||||
=/ pax=path /(scot %p our)/home/(scot %da now)/gen :: XX hardcoded
|
||||
=+ len=(lent pax)
|
||||
=. pax ?~(typ pax (welp pax /[p.typ]))
|
||||
@ -53,12 +53,12 @@
|
||||
(drop (bind red rend))
|
||||
|- ^- tang
|
||||
=+ =< arl=~(tap by (~(urn by dir.ark) .))
|
||||
|=({a=@t ~} .^(arch cy+(welp pax /[a])))
|
||||
|=([a=@t ~] .^(arch cy+(welp pax /[a])))
|
||||
%+ welp
|
||||
=/ dir=(list {@ path})
|
||||
=/ dir=(list [@ path])
|
||||
(murn arl (read-at len pax))
|
||||
`tang`(turn (sort dir aor) rend)
|
||||
%- zing ^- (list tang)
|
||||
%+ turn (sort arl aor)
|
||||
|= {a=@t b=arch}
|
||||
|= [a=@t b=arch]
|
||||
^$(pax (welp pax /[a]), ark b)
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{mon=term ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[mon=term ~]
|
||||
~
|
||||
==
|
||||
:- %kiln-commit
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg=(list term) ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=(list term) ~]
|
||||
==
|
||||
:+ %helm-reload-desk %base
|
||||
arg
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{mon=term ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[mon=term ~]
|
||||
auto=_|
|
||||
==
|
||||
:- %kiln-commit
|
||||
|
@ -5,7 +5,7 @@
|
||||
/? 310
|
||||
:- %say
|
||||
=, space:userlib
|
||||
|= {^ {input=path output=path ~} ~}
|
||||
|= [^ [input=path output=path ~] ~]
|
||||
:- %kiln-info
|
||||
?. =(-:(flop input) -:(flop output))
|
||||
["Can't move to a different mark" ~]
|
||||
|
@ -9,8 +9,8 @@
|
||||
::
|
||||
=, sole
|
||||
:- %say
|
||||
|= $: {now=@da eny=@ bec=beak}
|
||||
{~ ~}
|
||||
|= $: [now=@da eny=@ bec=beak]
|
||||
[~ ~]
|
||||
==
|
||||
~& %drum-exit
|
||||
[%drum-exit ~]
|
||||
|
@ -4,4 +4,4 @@
|
||||
::
|
||||
/? 310
|
||||
:- %say
|
||||
|=({^ {who=ship mez=$@(~ {a=tape ~})} ~} helm-send-hi+[who ?~(mez ~ `a.mez)])
|
||||
|=([^ [who=ship mez=$@(~ [a=tape ~])] ~] helm-send-hi+[who ?~(mez ~ `a.mez)])
|
||||
|
@ -10,11 +10,11 @@
|
||||
::
|
||||
=, generators
|
||||
:- %ask
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg=$@(~ {dom=path ~})}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=$@(~ [dom=path ~])]
|
||||
~
|
||||
==
|
||||
^- (sole-result:sole {%write-sec-atom p=host:eyre q=@})
|
||||
^- (sole-result:sole [%write-sec-atom p=host:eyre q=@])
|
||||
=- ?~ arg -
|
||||
(fun.q.q [%& dom.arg])
|
||||
%+ prompt
|
||||
|
@ -12,11 +12,11 @@
|
||||
=, html
|
||||
=, format
|
||||
:- %ask
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg=$@(~ {jon=json ~})}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=$@(~ [jon=json ~])]
|
||||
~
|
||||
==
|
||||
^- (sole-result:sole {%write-sec-atom p=host:eyre q=@})
|
||||
^- (sole-result:sole [%write-sec-atom p=host:eyre q=@])
|
||||
%+ print leaf+"Accepting credentials for https://*.googleapis.com"
|
||||
=+ hot=[%& /com/googleapis]
|
||||
=- ?~ arg -
|
||||
@ -26,7 +26,7 @@
|
||||
%+ parse apex:de-json
|
||||
|= jon=json
|
||||
=+ ~| bad-json+jon
|
||||
=- `{cid=@t cis=@t}`(need (rep jon))
|
||||
=- `[cid=@t cis=@t]`(need (rep jon))
|
||||
rep=(ot web+(ot 'client_id'^so 'client_secret'^so ~) ~):dejs-soft:format
|
||||
%+ produce %write-sec-atom :: XX typed pair
|
||||
[hot (of-wain:format cid cis ~)]
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg={syd=desk lab=@tas ~} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=[syd=desk lab=@tas ~] ~]
|
||||
==
|
||||
:- %kiln-label
|
||||
[syd lab]:arg
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ byk=beak}
|
||||
{arg=$?({dap=term ~} {who=ship dap=term ~}) ~}
|
||||
|= $: [now=@da eny=@uvJ byk=beak]
|
||||
[arg=$?([dap=term ~] [who=ship dap=term ~]) ~]
|
||||
==
|
||||
:- %drum-link
|
||||
?~ +.arg
|
||||
|
@ -7,7 +7,7 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg=~ ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=~ ~]
|
||||
==
|
||||
[%helm-mass ~]
|
||||
|
@ -7,38 +7,38 @@
|
||||
=, clay
|
||||
::
|
||||
|%
|
||||
++ beaky {knot knot knot ~}
|
||||
++ sorc ?({bek=beaky ~} {her=@p sud=@tas ~})
|
||||
+$ beaky [knot knot knot ~]
|
||||
+$ sorc ?([bek=beaky ~] [her=@p sud=@tas ~])
|
||||
--
|
||||
::
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bek=beak}
|
||||
{arg={?(~ sorc {syd=$@(desk beaky) sorc})} cas=case gem=?(germ %auto)}
|
||||
|= $: [now=@da eny=@uvJ bek=beak]
|
||||
[arg=[?(~ sorc [syd=$@(desk beaky) sorc])] cas=case gem=?(germ %auto)]
|
||||
==
|
||||
=* our p.bek
|
||||
|^ :- %kiln-merge
|
||||
^- $@(~ {syd=desk her=ship sud=desk cas=case gem=?(germ %auto)})
|
||||
^- $@(~ [syd=desk her=ship sud=desk cas=case gem=?(germ %auto)])
|
||||
?- arg
|
||||
~ ((slog (turn help-text |=(=@t leaf+(trip t)))) ~)
|
||||
{@ @ ~}
|
||||
[@ @ ~]
|
||||
=+(arg [sud ?.(=(our her) her (sein:title p.bek now her)) sud (opt-case da+now) gem])
|
||||
::
|
||||
{^ ~}
|
||||
[^ ~]
|
||||
=+ (pars bek.arg)
|
||||
[dez ?.(=(our who) who (sein:title p.bek now who)) dez (opt-case caz) gem]
|
||||
::
|
||||
{* @ @ ~}
|
||||
[* @ @ ~]
|
||||
:- (pars-src syd.arg)
|
||||
=+(arg [her sud (opt-case da+now) gem])
|
||||
::
|
||||
{* ^ ~}
|
||||
[* ^ ~]
|
||||
:- (pars-src syd.arg)
|
||||
=+((pars bek.arg) [who dez (opt-case caz) gem])
|
||||
==
|
||||
++ opt-case |=(a=case ?:(=(*case cas) a cas)) :: override
|
||||
++ pars |=(a=beaky `{{who=ship dez=desk caz=case} *}`(need (de-beam:format a)))
|
||||
++ pars |=(a=beaky `[[who=ship dez=desk caz=case] *]`(need (de-beam:format a)))
|
||||
++ pars-src
|
||||
|= syd=$@(desk beaky)
|
||||
?@ syd syd
|
||||
|
@ -16,7 +16,7 @@
|
||||
^- (unit [=ship =udiff:point:able:jael])
|
||||
=* our p.bec
|
||||
=/ ran (clan:title our)
|
||||
?: ?=({?(%earl %pawn)} ran)
|
||||
?: ?=([?(%earl %pawn)] ran)
|
||||
%- %- slog :_ ~
|
||||
leaf+"can't manage a moon from a {?:(?=(%earl ran) "moon" "comet")}"
|
||||
~
|
||||
|
@ -17,7 +17,7 @@
|
||||
^- (unit [=ship =udiff:point:able:jael])
|
||||
=* our p.bec
|
||||
=/ ran (clan:title our)
|
||||
?: ?=({?(%earl %pawn)} ran)
|
||||
?: ?=([?(%earl %pawn)] ran)
|
||||
%- %- slog :_ ~
|
||||
leaf+"can't manage a moon from a {?:(?=(%earl ran) "moon" "comet")}"
|
||||
~
|
||||
|
@ -16,7 +16,7 @@
|
||||
^- (unit [=ship =udiff:point:able:jael])
|
||||
=* our p.bec
|
||||
=/ ran (clan:title our)
|
||||
?: ?=({?(%earl %pawn)} ran)
|
||||
?: ?=([?(%earl %pawn)] ran)
|
||||
%- %- slog :_ ~
|
||||
leaf+"can't create a moon from a {?:(?=(%earl ran) "moon" "comet")}"
|
||||
~
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{{pax=path pot=$@(~ {v=@tas ~})} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[[pax=path pot=$@(~ [v=@tas ~])] ~]
|
||||
==
|
||||
?~ pot
|
||||
=+ bem=(need (de-beam:format pax))
|
||||
|
@ -5,7 +5,7 @@
|
||||
/? 310
|
||||
=, space:userlib
|
||||
:- %say
|
||||
|= {^ {input=path output=path ~} ~}
|
||||
|= [^ [input=path output=path ~] ~]
|
||||
:- %kiln-info
|
||||
?. =(-:(flop input) -:(flop output))
|
||||
["Can't move to a different mark" ~]
|
||||
|
@ -7,7 +7,7 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg=~ ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=~ ~]
|
||||
==
|
||||
[%helm-pack ~]
|
||||
|
@ -4,8 +4,8 @@
|
||||
::
|
||||
/? 310
|
||||
:- %say
|
||||
|= $: {now=@da eny=@ bec=beak}
|
||||
{{exp=@ud ~} ~}
|
||||
|= $: [now=@da eny=@ bec=beak]
|
||||
[[exp=@ud ~] ~]
|
||||
==
|
||||
=+ rab=(~(raw og eny) (bex exp))
|
||||
~& [%random-bytes (met 3 rab) `@p`(mug rab)]
|
||||
|
@ -3,8 +3,8 @@
|
||||
:::: /gen/hood/private/hoon
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg={des=desk may=?(~ {pax=path ~})} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=[des=desk may=?(~ [pax=path ~])] ~]
|
||||
==
|
||||
:- %kiln-permission
|
||||
[des ?~(may / pax.may) |]:arg
|
||||
|
@ -3,8 +3,8 @@
|
||||
:::: /gen/hood/public/hoon
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg={des=desk may=?(~ {pax=path ~})} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=[des=desk may=?(~ [pax=path ~])] ~]
|
||||
==
|
||||
:- %kiln-permission
|
||||
[des ?~(may / pax.may) &]:arg
|
||||
|
@ -7,7 +7,7 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg=~ ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=~ ~]
|
||||
==
|
||||
[%helm-reload ~[%c]]
|
||||
|
@ -7,7 +7,7 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg=~ ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=~ ~]
|
||||
==
|
||||
[%helm-reload ~[%z %a %b %c %d %e %g %i %j]]
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg={desk (list term)} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=[desk (list term)] ~]
|
||||
==
|
||||
:- %helm-reload-desk
|
||||
arg
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg=(list term) ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=(list term) ~]
|
||||
==
|
||||
:- %helm-reload
|
||||
arg
|
||||
|
@ -7,7 +7,7 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg=~ ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=~ ~]
|
||||
==
|
||||
[%helm-reset ~]
|
||||
|
@ -4,4 +4,4 @@
|
||||
::
|
||||
/? 310
|
||||
:- %say
|
||||
|=({^ {input=path ~} ~} kiln-rm+input)
|
||||
|=([^ [input=path ~] ~] kiln-rm+input)
|
||||
|
@ -4,4 +4,4 @@
|
||||
::
|
||||
/? 310
|
||||
:- %say
|
||||
|=({^ {where=path tym=@da eve=@t ~} ~} kiln-schedule+[where tym eve])
|
||||
|=([^ [where=path tym=@da eve=@t ~] ~] kiln-schedule+[where tym eve])
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg={@ $@(~ {@ ~})} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=[@ $@(~ [@ ~])] ~]
|
||||
==
|
||||
:- %drum-start
|
||||
?> ((sane %tas) -.arg)
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg={syd=@tas her=@p sud=@tas ~} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=[syd=@tas her=@p sud=@tas ~] ~]
|
||||
==
|
||||
:- %kiln-sync
|
||||
[syd her sud]:arg
|
||||
|
@ -7,5 +7,5 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= {{now=@da eny=@uvJ bec=beak} ~ ~}
|
||||
|= [[now=@da eny=@uvJ bec=beak] ~ ~]
|
||||
[%kiln-syncs ~]
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg={syd=@tas her=@p sud=@tas ~} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=[syd=@tas her=@p sud=@tas ~] ~]
|
||||
==
|
||||
:- %kiln-track
|
||||
[syd her sud]:arg
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ byk=beak}
|
||||
{arg=$?({dap=term ~} {who=ship dap=term ~}) ~}
|
||||
|= $: [now=@da eny=@uvJ byk=beak]
|
||||
[arg=$?([dap=term ~] [who=ship dap=term ~]) ~]
|
||||
==
|
||||
:- %drum-unlink
|
||||
?~ +.arg
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{{mon=$@(term {knot path}) ~} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[[mon=$@(term [knot path]) ~] ~]
|
||||
==
|
||||
:- %kiln-unmount
|
||||
mon
|
||||
|
@ -7,8 +7,8 @@
|
||||
::::
|
||||
::
|
||||
:- %say
|
||||
|= $: {now=@da eny=@uvJ bec=beak}
|
||||
{arg={syd=@tas her=@p sud=@tas ~} ~}
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=[syd=@tas her=@p sud=@tas ~] ~]
|
||||
==
|
||||
:- %kiln-unsync
|
||||
[syd her sud]:arg
|
||||
|
@ -9,8 +9,8 @@
|
||||
::
|
||||
=, sole
|
||||
:- %say
|
||||
|= $: {now=@da eny=@ bec=beak}
|
||||
{~ ~}
|
||||
|= $: [now=@da eny=@ bec=beak]
|
||||
[~ ~]
|
||||
==
|
||||
~& %helm-verb
|
||||
[%helm-verb ~]
|
||||
|
@ -9,6 +9,6 @@
|
||||
::
|
||||
~& %
|
||||
:- %say
|
||||
|= {^ {arg=path ~} vane=?(%g %c)}
|
||||
|= [^ [arg=path ~] vane=?(%g %c)]
|
||||
=+ lon=.^(arch (cat 3 vane %y) arg)
|
||||
tang+[?~(dir.lon leaf+"~" (show-dir vane arg dir.lon))]~
|
||||
|
@ -168,7 +168,7 @@
|
||||
(cu (cury slav %uv) so)
|
||||
::
|
||||
++ re :: recursive reparsers
|
||||
|* {gar=* sef=_|.(fist:dejs-soft:format)}
|
||||
|* [gar=* sef=_|.(fist:dejs-soft:format)]
|
||||
|= jon=json
|
||||
^- (unit _gar)
|
||||
=- ~! gar ~! (need -) -
|
||||
|
@ -3,7 +3,7 @@
|
||||
|%
|
||||
++ nu :: parse number as hex
|
||||
|= jon=json
|
||||
?> ?=({%s *} jon)
|
||||
?> ?=([%s *] jon)
|
||||
(rash p.jon hex)
|
||||
::
|
||||
++ hook-update-to-json
|
||||
|
@ -1,6 +1,6 @@
|
||||
|%
|
||||
++ static :: freeze .mdh hoon subset
|
||||
|= gen=hoon ^- {inf=(map term dime) elm=manx}
|
||||
|= gen=hoon ^- [inf=(map term dime) elm=manx]
|
||||
?+ -.gen
|
||||
=/ gen ~(open ap gen)
|
||||
?: =(gen ^gen) ~|([%cram-dynamic -.gen] !!)
|
||||
@ -12,11 +12,11 @@
|
||||
::
|
||||
++ single :: unwrap one-elem marl
|
||||
|= xml=marl ^- manx
|
||||
?: ?=({* ~} xml) i.xml
|
||||
?: ?=([* ~] xml) i.xml
|
||||
~|(%many-elems !!)
|
||||
::
|
||||
++ shut-mart :: xml attrs
|
||||
|=({n=mane v=(list beer:hoot)} [n (turn v |=(a=beer:hoot ?^(a !! a)))])
|
||||
|=([n=mane v=(list beer:hoot)] [n (turn v |=(a=beer:hoot ?^(a !! a)))])
|
||||
::
|
||||
++ shut :: as xml constant
|
||||
|= gen=hoon ^- marl
|
||||
@ -39,8 +39,8 @@
|
||||
::
|
||||
::
|
||||
++ frontmatter :: parse ~[[%foo 1] [%bar ~s2]]
|
||||
|= gen=hoon ^- (list {term dime})
|
||||
?: ?=({%bust %null} gen) ~
|
||||
|= gen=hoon ^- (list [term dime])
|
||||
?: ?=([%bust %null] gen) ~
|
||||
?: ?=(%dbug -.gen) $(gen q.gen)
|
||||
?. ?=(%clsg -.gen) ~|([%bad-frontmatter -.gen] !!)
|
||||
%+ turn p.gen
|
||||
@ -56,6 +56,6 @@
|
||||
++ as-dime :: %foo ~.foo 0vbar etc
|
||||
|= gen=hoon ^- dime
|
||||
?: ?=(%dbug -.gen) $(gen q.gen)
|
||||
?. ?=({?(%rock %sand) @ @} gen) ~|([%bad-literal gen] !!)
|
||||
?. ?=([?(%rock %sand) @ @] gen) ~|([%bad-literal gen] !!)
|
||||
+.gen
|
||||
--
|
||||
|
@ -28,7 +28,7 @@
|
||||
:: special handling for <pre urb:codemirror>foo</pre>
|
||||
++ urb-codemirror :: render code blocks
|
||||
|= src=manx ^- manx
|
||||
?> ?=({{%pre *} _;/(**) ~} src)
|
||||
?> ?=([[%pre *] _;/(**) ~] src)
|
||||
;codemirror(value "{v.i.a.g.i.c.src}");
|
||||
::
|
||||
++ elem-to-react-json :: serialize DOM as json
|
||||
@ -42,7 +42,7 @@
|
||||
c+a+(turn c.src ..$)
|
||||
gn+s+(mane-to-cord n.g.src)
|
||||
=< ga+(pairs:enjs (turn a.g.src .))
|
||||
|= {a=mane b=tape} ^- {cord json}
|
||||
|= [a=mane b=tape] ^- [cord json]
|
||||
:_ (tape:enjs b)
|
||||
?^ a (mane-to-cord a)
|
||||
(~(gut by react-attrs) a a)
|
||||
|
@ -7,13 +7,13 @@
|
||||
|%
|
||||
++ atr-lines
|
||||
|= atr=(map cord cord)
|
||||
%+ turn (sort ~(tap by atr) |=({{a=@ @} {b=@ @}} (aor a b)))
|
||||
|= {k=cord v=cord}
|
||||
%+ turn (sort ~(tap by atr) |=([[a=@ @] [b=@ @]] (aor a b)))
|
||||
|= [k=cord v=cord]
|
||||
(rap 3 k ': ' v ~)
|
||||
::
|
||||
++ atr-key ;~(sfix (star ;~(less col prn)) col ace)
|
||||
++ print
|
||||
|= {atr=(map cord cord) src=wain}
|
||||
|= [atr=(map cord cord) src=wain]
|
||||
?~ atr src
|
||||
['---' (welp (atr-lines atr) '---' src)]
|
||||
++ parse
|
||||
@ -30,6 +30,6 @@
|
||||
$(wan t.wan)
|
||||
=- $(wan t.wan, atr (~(put by atr) (crip key) (crip val)))
|
||||
~| malformed-attribute+i.t.wan
|
||||
^- {key=tape ^ val=tape}
|
||||
^- [key=tape ^ val=tape]
|
||||
+>:(atr-key 1^1 (trip i.t.wan))
|
||||
--
|
||||
|
@ -6,17 +6,17 @@
|
||||
[p=*(list tank) q=[%& p=[~ u=pro]]] ::
|
||||
:: ::
|
||||
++ print :: add output tank
|
||||
|* {tan=tank res=(sole-result)} ::
|
||||
|* [tan=tank res=(sole-result)] ::
|
||||
?@ res res ::
|
||||
[p=[i=tan t=p.res] q=q.res] ::
|
||||
:: ::
|
||||
++ prompt :: construct prompt
|
||||
|* {pom=sole-prompt mor=(sole-dialog)} ::
|
||||
|* [pom=sole-prompt mor=(sole-dialog)] ::
|
||||
[p=*(list tank) q=[%| p=pom q=mor]] ::
|
||||
:: ::
|
||||
++ curl :: fetch url
|
||||
=| usr=knot ::
|
||||
|* {pul=_purl:eyre fun=$-(httr:eyre *)} ::
|
||||
|* [pul=_purl:eyre fun=$-(httr:eyre *)] ::
|
||||
:- p=*(list tank) ::
|
||||
q=[%| p=`usr q=[pul %get ~ ~] r=fun] ::
|
||||
:: ::
|
||||
@ -24,7 +24,7 @@
|
||||
[p=*(list tank) q=[%& ~]] ::
|
||||
:: ::
|
||||
++ parse :: parse by rule
|
||||
|* {sef=rule fun=$-(* *)} ::
|
||||
|* [sef=rule fun=$-(* *)] ::
|
||||
|= txt=sole-input ::
|
||||
=+ vex=(sef [0 0] txt) ::
|
||||
?: |(!=((lent txt) q.p.vex) ?=(~ q.vex)) ::
|
||||
|
@ -8,11 +8,11 @@
|
||||
:: NOTE: move these functions to zuse
|
||||
++ nu :: parse number as hex
|
||||
|= jon=json
|
||||
?> ?=({%s *} jon)
|
||||
?> ?=([%s *] jon)
|
||||
(rash p.jon hex)
|
||||
::
|
||||
++ re :: recursive reparsers
|
||||
|* {gar=* sef=_|.(fist:dejs-soft:format)}
|
||||
|* [gar=* sef=_|.(fist:dejs-soft:format)]
|
||||
|= jon=json
|
||||
^- (unit _gar)
|
||||
=- ~! gar ~! (need -) -
|
||||
|
@ -12,7 +12,7 @@
|
||||
(set-to-array group ship:enjs:format)
|
||||
::
|
||||
++ set-to-array
|
||||
|* {a=(set) b=$-(* json)}
|
||||
|* [a=(set) b=$-(* json)]
|
||||
^- json
|
||||
[%a (turn ~(tap in a) b)]
|
||||
--
|
||||
|
@ -304,13 +304,13 @@
|
||||
$(a r.a)
|
||||
::
|
||||
++ of
|
||||
|* wer=(pole {cord fist})
|
||||
|* wer=(pole [cord fist])
|
||||
|= jon=json
|
||||
?> ?=({%o {@ *} ~ ~} jon)
|
||||
?> ?=([%o [@ *] ~ ~] jon)
|
||||
|-
|
||||
?- wer
|
||||
:: {{key=@t wit=*} t=*}
|
||||
{{key=@t *} t=*}
|
||||
:: {{key=@t wit=*} t=*]
|
||||
[[key=@t *] t=*]
|
||||
=> .(wer [[* wit] *]=wer)
|
||||
?: =(key.wer (enkebab p.n.p.jon))
|
||||
[key.wer ~|(val+q.n.p.jon (wit.wer q.n.p.jon))]
|
||||
|
@ -144,7 +144,7 @@
|
||||
+$ any-state ^any-state :: proxy
|
||||
++ on-init se-abet:this(eel (deft-fish our.hid))
|
||||
++ diff-sole-effect-phat :: app event
|
||||
|= {way=wire fec=sole-effect}
|
||||
|= [way=wire fec=sole-effect]
|
||||
=< se-abet =< se-view
|
||||
=+ gyl=(de-gill way)
|
||||
?: (se-aint gyl) +>.$
|
||||
@ -197,7 +197,7 @@
|
||||
se-abet:(se-blit-sys `dill-blit:dill`[%qit ~])
|
||||
::
|
||||
++ poke-put :: write file
|
||||
|= {pax=path txt=@}
|
||||
|= [pax=path txt=@]
|
||||
se-abet:(se-blit-sys [%sav pax txt]) ::
|
||||
::
|
||||
++ poke
|
||||
@ -256,7 +256,7 @@
|
||||
..on-load
|
||||
::
|
||||
++ reap-phat :: ack connect
|
||||
|= {way=wire saw=(unit tang)}
|
||||
|= [way=wire saw=(unit tang)]
|
||||
=< se-abet =< se-view
|
||||
=+ gyl=(de-gill way)
|
||||
?~ saw
|
||||
@ -273,7 +273,7 @@
|
||||
+>.sign-arvo
|
||||
::
|
||||
++ take-coup-phat :: ack poke
|
||||
|= {way=wire saw=(unit tang)}
|
||||
|= [way=wire saw=(unit tang)]
|
||||
=< se-abet =< se-view
|
||||
?~ saw +>
|
||||
=+ gyl=(de-gill way)
|
||||
@ -283,14 +283,14 @@
|
||||
>[%drum-coup-fail src.hid gyl]<
|
||||
::
|
||||
++ take-onto :: ack start
|
||||
|= {way=wire saw=(each suss:gall tang)}
|
||||
|= [way=wire saw=(each suss:gall tang)]
|
||||
=< se-abet =< se-view
|
||||
?> ?=({@ @ ~} way)
|
||||
?> ?=([@ @ ~] way)
|
||||
?> (~(has by fur) i.t.way)
|
||||
=/ wel=well:gall [i.way i.t.way]
|
||||
?- saw
|
||||
{%| *} (se-dump p.saw)
|
||||
{%& *} ?> =(q.wel p.p.saw)
|
||||
[%| *] (se-dump p.saw)
|
||||
[%& *] ?> =(q.wel p.p.saw)
|
||||
:: =. +>.$ (se-text "live {<p.saw>}")
|
||||
+>.$(fur (~(put by fur) q.wel `[p.wel %da r.p.saw]))
|
||||
==
|
||||
@ -396,7 +396,7 @@
|
||||
?: =(b %dojo) %.y
|
||||
(aor a b)
|
||||
=< .(con +>)
|
||||
|: $:{gil=gill:gall con=_.} ^+ con
|
||||
|: $:,[gil=gill:gall con=_.] ^+ con
|
||||
=. +>.$ con
|
||||
?: (~(has by fug) gil)
|
||||
+>.$
|
||||
@ -408,7 +408,7 @@
|
||||
^+ .
|
||||
%- ~(rep by bin)
|
||||
=< .(con +>)
|
||||
|: $:{{ost=bone dev=source} con=_.} ^+ con
|
||||
|: $:,[[ost=bone dev=source] con=_.] ^+ con
|
||||
=+ xeno=se-subze-local:%_(con ost ost, dev dev)
|
||||
xeno(ost ost.con, dev dev.con, bin (~(put by bin) ost dev.xeno))
|
||||
::
|
||||
@ -416,7 +416,7 @@
|
||||
^+ .
|
||||
%- ~(rep by fug)
|
||||
=< .(con +>)
|
||||
|: $:{{gil=gill:gall *} con=_.} ^+ con
|
||||
|: $:,[[gil=gill:gall *] con=_.] ^+ con
|
||||
=. +>.$ con
|
||||
?: (~(has in eel) gil)
|
||||
+>.$
|
||||
@ -440,7 +440,7 @@
|
||||
++ se-amor :: live targets
|
||||
^- (list gill:gall)
|
||||
%+ skim ~(tap in eel)
|
||||
|=(a=gill:gall ?=({~ ~ *} (~(get by fug) a)))
|
||||
|=(a=gill:gall ?=([~ ~ *] (~(get by fug) a)))
|
||||
::
|
||||
++ se-anon :: rotate index
|
||||
=+ wag=se-amor
|
||||
@ -458,12 +458,12 @@
|
||||
++ se-belt :: handle input
|
||||
|= bet=dill-belt:dill
|
||||
^+ +>
|
||||
?: ?=({?(%cru %hey %rez %yow) *} bet) :: target-agnostic
|
||||
?: ?=([?(%cru %hey %rez %yow) *] bet) :: target-agnostic
|
||||
?- bet
|
||||
{%cru *} (se-dump:(se-text (trip p.bet)) q.bet)
|
||||
{%hey *} +>(mir [0 ~]) :: refresh
|
||||
{%rez *} +>(edg (dec p.bet)) :: resize window
|
||||
{%yow *} ~&([%no-yow -.bet] +>)
|
||||
[%cru *] (se-dump:(se-text (trip p.bet)) q.bet)
|
||||
[%hey *] +>(mir [0 ~]) :: refresh
|
||||
[%rez *] +>(edg (dec p.bet)) :: resize window
|
||||
[%yow *] ~&([%no-yow -.bet] +>)
|
||||
==
|
||||
=+ gul=se-agon
|
||||
?: |(?=(~ gul) (se-aint u.gul))
|
||||
@ -482,7 +482,7 @@
|
||||
==
|
||||
::
|
||||
++ se-drop :: disconnect
|
||||
|= {pej=? gyl=gill:gall}
|
||||
|= [pej=? gyl=gill:gall]
|
||||
^+ +>
|
||||
=+ lag=se-agon
|
||||
?. (~(has by fug) gyl) +>.$
|
||||
@ -497,7 +497,7 @@
|
||||
+>.$
|
||||
::
|
||||
++ se-tab :: print tab completions
|
||||
|= tl=(list {=cord =tank})
|
||||
|= tl=(list [=cord =tank])
|
||||
^+ +>
|
||||
=/ lots (gth (lent tl) 10)
|
||||
=/ long
|
||||
@ -574,7 +574,7 @@
|
||||
+>(mir lin)
|
||||
::
|
||||
++ se-just :: adjusted buffer
|
||||
|= {pom=stub lin=(pair @ud (list @c))}
|
||||
|= [pom=stub lin=(pair @ud (list @c))]
|
||||
^+ +>
|
||||
=/ pol (lent-char:klr pom)
|
||||
=/ pos (add pol p.lin)
|
||||
@ -612,7 +612,7 @@
|
||||
(se-blit %out (tuba txt))
|
||||
::
|
||||
++ 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-peer :: send a peer
|
||||
@ -631,12 +631,12 @@
|
||||
~(. ta gyl (need (~(got by fug) gyl)))
|
||||
::
|
||||
++ se-diff :: receive results
|
||||
|= {gyl=gill:gall fec=sole-effect}
|
||||
|= [gyl=gill:gall fec=sole-effect]
|
||||
^+ +>
|
||||
ta-abet:(ta-fec:(se-tame gyl) fec)
|
||||
::
|
||||
++ ta :: per target
|
||||
|_ {gyl=gill:gall target} :: app and state
|
||||
|_ [gyl=gill:gall target] :: app and state
|
||||
++ ta-abet :: resolve
|
||||
^+ ..ta
|
||||
..ta(fug (~(put by fug) gyl ``target`+<+))
|
||||
@ -674,16 +674,16 @@
|
||||
++ ta-belt :: handle input
|
||||
|= bet=dill-belt:dill
|
||||
^+ +>
|
||||
?< ?=({?(%cru %hey %rez %yow) *} bet) :: target-specific
|
||||
?< ?=([?(%cru %hey %rez %yow) *] bet) :: target-specific
|
||||
=. blt [q.blt `bet] :: remember belt
|
||||
?- bet
|
||||
{%aro *} (ta-aro p.bet)
|
||||
{%bac *} ta-bac
|
||||
{%ctl *} (ta-ctl p.bet)
|
||||
{%del *} ta-del
|
||||
{%met *} (ta-met p.bet)
|
||||
{%ret *} ta-ret
|
||||
{%txt *} (ta-txt p.bet)
|
||||
[%aro *] (ta-aro p.bet)
|
||||
[%bac *] ta-bac
|
||||
[%ctl *] (ta-ctl p.bet)
|
||||
[%del *] ta-del
|
||||
[%met *] (ta-met p.bet)
|
||||
[%ret *] ta-ret
|
||||
[%txt *] (ta-txt p.bet)
|
||||
==
|
||||
::
|
||||
++ ta-det :: send edit
|
||||
@ -773,23 +773,23 @@
|
||||
|= fec=sole-effect
|
||||
^+ +>
|
||||
?- fec
|
||||
{%bel *} ta-bel
|
||||
{%blk *} +>
|
||||
{%clr *} +>(..ta (se-blit fec))
|
||||
{%det *} (ta-got +.fec)
|
||||
{%err *} (ta-err p.fec)
|
||||
{%klr *} +>(..ta (se-blit %klr (make:klr p.fec)))
|
||||
{%mor *} |- ^+ +>.^$
|
||||
[%bel *] ta-bel
|
||||
[%blk *] +>
|
||||
[%clr *] +>(..ta (se-blit fec))
|
||||
[%det *] (ta-got +.fec)
|
||||
[%err *] (ta-err p.fec)
|
||||
[%klr *] +>(..ta (se-blit %klr (make:klr p.fec)))
|
||||
[%mor *] |- ^+ +>.^$
|
||||
?~ p.fec +>.^$
|
||||
$(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec))
|
||||
{%nex *} ta-nex
|
||||
{%pro *} (ta-pro +.fec)
|
||||
{%tab *} +>(..ta (se-tab p.fec))
|
||||
{%tan *} +>(..ta (se-dump p.fec))
|
||||
{%sag *} +>(..ta (se-blit fec))
|
||||
{%sav *} +>(..ta (se-blit fec))
|
||||
{%txt *} +>(..ta (se-text p.fec))
|
||||
{%url *} +>(..ta (se-blit fec))
|
||||
[%nex *] ta-nex
|
||||
[%pro *] (ta-pro +.fec)
|
||||
[%tab *] +>(..ta (se-tab p.fec))
|
||||
[%tan *] +>(..ta (se-dump p.fec))
|
||||
[%sag *] +>(..ta (se-blit fec))
|
||||
[%sav *] +>(..ta (se-blit fec))
|
||||
[%txt *] +>(..ta (se-text p.fec))
|
||||
[%url *] +>(..ta (se-blit fec))
|
||||
==
|
||||
::
|
||||
++ ta-dog :: change cursor
|
||||
@ -800,13 +800,13 @@
|
||||
%+ min len
|
||||
|- ^- @ud
|
||||
?- ted
|
||||
{%del *} ?:((gth pos.inp p.ted) (dec pos.inp) pos.inp)
|
||||
{%ins *} ?:((gte pos.inp p.ted) +(pos.inp) pos.inp)
|
||||
{%mor *} |- ^- @ud
|
||||
[%del *] ?:((gth pos.inp p.ted) (dec pos.inp) pos.inp)
|
||||
[%ins *] ?:((gte pos.inp p.ted) +(pos.inp) pos.inp)
|
||||
[%mor *] |- ^- @ud
|
||||
?~ p.ted pos.inp
|
||||
$(p.ted t.p.ted, pos.inp ^$(ted i.p.ted))
|
||||
{%nop *} pos.inp
|
||||
{%set *} len
|
||||
[%nop *] pos.inp
|
||||
[%set *] len
|
||||
==
|
||||
==
|
||||
::
|
||||
@ -827,13 +827,13 @@
|
||||
(ta-dog(say.inp (~(commit sole say.inp) ted)) ted)
|
||||
::
|
||||
++ ta-jump :: buffer pos
|
||||
|= {dir=?(%l %r) til=?(%ace %edg %wrd) pos=@ud}
|
||||
|= [dir=?(%l %r) til=?(%ace %edg %wrd) pos=@ud]
|
||||
^- @ud
|
||||
%- ?:(?=(%l dir) sub add)
|
||||
[pos (ta-pos dir til pos)]
|
||||
::
|
||||
++ ta-kil :: kill selection
|
||||
|= {dir=?(%l %r) sel={@ @}}
|
||||
|= [dir=?(%l %r) sel=[@ @]]
|
||||
^+ +>
|
||||
=+ buf=(swag sel buf.say.inp)
|
||||
%. (cut:edit sel)
|
||||
@ -841,8 +841,8 @@
|
||||
kil
|
||||
?. ?& ?=(^ old.kil)
|
||||
?=(^ p.blt)
|
||||
?| ?=({%ctl ?(%k %u %w)} u.p.blt)
|
||||
?=({%met ?(%d %bac)} u.p.blt)
|
||||
?| ?=([%ctl ?(%k %u %w)] u.p.blt)
|
||||
?=([%met ?(%d %bac)] u.p.blt)
|
||||
== ==
|
||||
%= kil :: prepend
|
||||
num +(num.kil)
|
||||
@ -925,8 +925,8 @@
|
||||
::
|
||||
%y ?. ?& ?=(^ old.kil) :: rotate & yank
|
||||
?=(^ p.blt)
|
||||
?| ?=({%ctl %y} u.p.blt)
|
||||
?=({%met %y} u.p.blt)
|
||||
?| ?=([%ctl %y] u.p.blt)
|
||||
?=([%met %y] u.p.blt)
|
||||
== ==
|
||||
ta-bel
|
||||
=+ las=(lent ta-yan)
|
||||
@ -961,7 +961,7 @@
|
||||
==
|
||||
::
|
||||
++ ta-pos :: buffer pos offset
|
||||
|= {dir=?(%l %r) til=?(%ace %edg %wrd) pos=@ud}
|
||||
|= [dir=?(%l %r) til=?(%ace %edg %wrd) pos=@ud]
|
||||
^- @ud
|
||||
%- ?- til %ace ace:offset
|
||||
%edg edg:offset
|
||||
@ -1020,7 +1020,7 @@
|
||||
(ta-hom (cat:edit pos.inp txt))
|
||||
::
|
||||
++ ta-vew :: computed prompt
|
||||
^- {pom=stub lin=(pair @ud (list @c))}
|
||||
^- [pom=stub lin=(pair @ud (list @c))]
|
||||
=; vew=(pair (list @c) styx)
|
||||
[(make:klr q.vew) pos.inp p.vew]
|
||||
?: vis.pom
|
||||
@ -1040,7 +1040,7 @@
|
||||
++ edit :: produce sole-edits
|
||||
|%
|
||||
++ cat :: mass insert
|
||||
|= {pos=@ud txt=(list @c)}
|
||||
|= [pos=@ud txt=(list @c)]
|
||||
^- sole-edit
|
||||
:- %mor
|
||||
|- ^- (list sole-edit)
|
||||
@ -1048,7 +1048,7 @@
|
||||
[[%ins pos i.txt] $(pos +(pos), txt t.txt)]
|
||||
::
|
||||
++ cut :: mass delete
|
||||
|= {pos=@ud num=@ud}
|
||||
|= [pos=@ud num=@ud]
|
||||
^- sole-edit
|
||||
:- %mor
|
||||
|- ^- (list sole-edit)
|
||||
@ -1056,14 +1056,14 @@
|
||||
[[%del pos] $(num (dec num))]
|
||||
::
|
||||
++ rep :: mass replace
|
||||
|= {{pos=@ud num=@ud} txt=(list @c)}
|
||||
|= [[pos=@ud num=@ud] txt=(list @c)]
|
||||
^- sole-edit
|
||||
:~ %mor
|
||||
(cut pos num)
|
||||
(cat pos txt)
|
||||
==
|
||||
++ any :: matches?
|
||||
|= {a=sole-edit b=$-(sole-edit ?)}
|
||||
|= [a=sole-edit b=$-(sole-edit ?)]
|
||||
^- ?
|
||||
?. ?=(%mor -.a) (b a)
|
||||
(lien p.a |=(c=sole-edit ^$(a c)))
|
||||
@ -1079,7 +1079,7 @@
|
||||
::
|
||||
++ ace :: next whitespace
|
||||
|= a=(list @)
|
||||
=| {b=_| i=@ud}
|
||||
=| [b=_| i=@ud]
|
||||
|- ^- @ud
|
||||
?~ a i
|
||||
=/ c !=(32 i.a)
|
||||
@ -1089,7 +1089,7 @@
|
||||
::
|
||||
++ edg :: next word boundary
|
||||
|= a=(list @)
|
||||
=| {b=_| i=@ud}
|
||||
=| [b=_| i=@ud]
|
||||
|- ^- @ud
|
||||
?~ a i
|
||||
=/ c (alnm i.a)
|
||||
@ -1118,13 +1118,13 @@
|
||||
?@ a [b (tuba (trip a))]~
|
||||
^$(a q.a, b (styd p.a b))
|
||||
::
|
||||
|= {a=(pair stye (list @c)) b=stub}
|
||||
|= [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
|
||||
|= [a=styl b=stye] ^+ b :: with inheritance
|
||||
:+ ?~ p.a p.b
|
||||
?~ u.p.a ~
|
||||
(~(put in p.b) u.p.a)
|
||||
@ -1142,8 +1142,8 @@
|
||||
(lent q.a)
|
||||
::
|
||||
++ brek :: index + incl-len of
|
||||
|= {a=@ b=(list @)} :: stub pair w= idx a
|
||||
=| {c=@ i=@}
|
||||
|= [a=@ b=(list @)] :: stub pair w= idx a
|
||||
=| [c=@ i=@]
|
||||
|- ^- (unit (pair @ @))
|
||||
?~ b ~
|
||||
=. c (add c i.b)
|
||||
@ -1152,7 +1152,7 @@
|
||||
$(i +(i), b t.b)
|
||||
::
|
||||
++ slag :: slag stub, keep stye
|
||||
|= {a=@ b=stub}
|
||||
|= [a=@ b=stub]
|
||||
^- stub
|
||||
=+ c=(lnts-char b)
|
||||
=+ i=(brek a c)
|
||||
@ -1165,7 +1165,7 @@
|
||||
(^slag (sub (snag p.u.i c) (sub q.u.i a)) q.n)
|
||||
::
|
||||
++ scag :: scag stub, keep stye
|
||||
|= {a=@ b=stub}
|
||||
|= [a=@ b=stub]
|
||||
^- stub
|
||||
=+ c=(lnts-char b)
|
||||
=+ i=(brek a c)
|
||||
@ -1179,7 +1179,7 @@
|
||||
(^scag (sub (snag p.u.i c) (sub q.u.i a)) q.n)
|
||||
::
|
||||
++ swag :: swag stub, keep stye
|
||||
|= {{a=@ b=@} c=stub}
|
||||
|= [[a=@ b=@] c=stub]
|
||||
(scag b (slag a c))
|
||||
--
|
||||
--
|
||||
|
@ -122,7 +122,7 @@
|
||||
==
|
||||
::
|
||||
++ poke-send-hi
|
||||
|= {her=ship mes=(unit tape)} =< abet
|
||||
|= [her=ship mes=(unit tape)] =< abet
|
||||
%- emit
|
||||
:* %pass /helm/hi/(scot %p her)
|
||||
%agent [her %hood] %poke
|
||||
@ -146,26 +146,26 @@
|
||||
(flog %text "< {<src.bowl>}: atom: {len} bytes, mug {gum}")
|
||||
::
|
||||
++ coup-hi
|
||||
|= {pax=path cop=(unit tang)} =< abet
|
||||
?> ?=({@t ~} pax)
|
||||
|= [pax=path cop=(unit tang)] =< abet
|
||||
?> ?=([@t ~] pax)
|
||||
(flog %text "hi {(trip i.pax)} {?~(cop "" "un")}successful")
|
||||
::
|
||||
++ poke-reload |=(all=(list term) (poke-reload-desk %home all))
|
||||
++ poke-reload-desk :: reload vanes
|
||||
|: $:{syd=desk all=(list term)} =< abet
|
||||
|: $:,[syd=desk all=(list term)] =< abet
|
||||
%- emil
|
||||
%+ turn all
|
||||
=+ top=`path`/(scot %p our.bowl)/[syd]/(scot %da now.bowl)
|
||||
=/ van=(list {term ~})
|
||||
=/ van=(list [term ~])
|
||||
:- zus=[%zuse ~]
|
||||
~(tap by dir:.^(arch %cy (welp top /sys/vane)))
|
||||
|= nam=@tas
|
||||
=. nam
|
||||
?. =(1 (met 3 nam))
|
||||
nam
|
||||
=/ zaz=(list {p=knot ~})
|
||||
(skim van |=({a=term ~} =(nam (end 3 1 a))))
|
||||
?> ?=({{@ ~} ~} zaz)
|
||||
=/ zaz=(list [p=knot ~])
|
||||
(skim van |=([a=term ~] =(nam (end 3 1 a))))
|
||||
?> ?=([[@ ~] ~] zaz)
|
||||
`term`p.i.zaz
|
||||
=+ tip=(end 3 1 nam)
|
||||
=+ zus==('z' tip)
|
||||
|
@ -73,7 +73,7 @@
|
||||
?~(+< +> $(+< t.+<, +> (emit i.+<)))
|
||||
::
|
||||
++ render
|
||||
|= {mez=tape sud=desk who=ship syd=desk}
|
||||
|= [mez=tape sud=desk who=ship syd=desk]
|
||||
:^ %palm [" " ~ ~ ~] leaf+(weld "kiln: " mez)
|
||||
~[leaf+"from {<sud>}" leaf+"on {<who>}" leaf+"to {<syd>}"]
|
||||
::
|
||||
@ -381,7 +381,7 @@
|
||||
abet:(emit %pass /cancel %arvo %c [%drop a])
|
||||
::
|
||||
++ poke-info
|
||||
|= {mez=tape tor=(unit toro)}
|
||||
|= [mez=tape tor=(unit toro)]
|
||||
?~ tor
|
||||
abet:(spam leaf+mez ~)
|
||||
abet:(emit:(spam leaf+mez ~) %pass /kiln %arvo %c [%info u.tor])
|
||||
@ -395,19 +395,19 @@
|
||||
(poke-info "removed" `(fray a))
|
||||
::
|
||||
++ poke-label
|
||||
|= {syd=desk lab=@tas}
|
||||
|= [syd=desk lab=@tas]
|
||||
=+ pax=/(scot %p our)/[syd]/[lab]
|
||||
(poke-info "labeled {(spud pax)}" `[syd %| lab])
|
||||
::
|
||||
++ poke-schedule
|
||||
|= {where=path tym=@da eve=@t}
|
||||
|= [where=path tym=@da eve=@t]
|
||||
=. where (welp where /sched)
|
||||
%+ poke-info "scheduled"
|
||||
=+ old=;;((map @da cord) (fall (file where) ~))
|
||||
`(foal where %sched !>((~(put by old) tym eve)))
|
||||
::
|
||||
++ poke-permission
|
||||
|= {syd=desk pax=path pub=?}
|
||||
|= [syd=desk pax=path pub=?]
|
||||
=< abet
|
||||
%- emit
|
||||
=/ =rite [%r ~ ?:(pub %black %white) ~]
|
||||
@ -447,7 +447,7 @@
|
||||
abet:(emit %pass /kiln %arvo %g %sear ship)
|
||||
::
|
||||
++ done
|
||||
|= {way=wire saw=(unit error:ames)}
|
||||
|= [way=wire saw=(unit error:ames)]
|
||||
~? ?=(^ saw) [%kiln-nack u.saw]
|
||||
abet
|
||||
::
|
||||
@ -481,23 +481,23 @@
|
||||
?>(?=(%mere +<.sign-arvo) +>.sign-arvo)
|
||||
==
|
||||
==
|
||||
++ take |=(way=wire ?>(?=({@ ~} way) (work i.way))) :: general handler
|
||||
++ take |=(way=wire ?>(?=([@ ~] way) (work i.way))) :: general handler
|
||||
++ take-mere ::
|
||||
|= {way=wire are=(each (set path) (pair term tang))}
|
||||
|= [way=wire are=(each (set path) (pair term tang))]
|
||||
abet:abet:(mere:(take way) are)
|
||||
::
|
||||
++ take-coup-fancy ::
|
||||
|= {way=wire saw=(unit tang)}
|
||||
|= [way=wire saw=(unit tang)]
|
||||
abet:abet:(coup-fancy:(take way) saw)
|
||||
::
|
||||
++ take-coup-spam ::
|
||||
|= {way=wire saw=(unit tang)}
|
||||
|= [way=wire saw=(unit tang)]
|
||||
~? ?=(^ saw) [%kiln-spam-lame u.saw]
|
||||
abet
|
||||
::
|
||||
++ take-mere-sync ::
|
||||
|= {way=wire mes=(each (set path) (pair term tang))}
|
||||
?> ?=({@ @ @ *} way)
|
||||
|= [way=wire mes=(each (set path) (pair term tang))]
|
||||
?> ?=([@ @ @ *] way)
|
||||
=/ hos=kiln-sync
|
||||
:* syd=(slav %tas i.way)
|
||||
her=(slav %p i.t.way)
|
||||
@ -508,8 +508,8 @@
|
||||
abet:abet:(mere:(auto hos) mes)
|
||||
::
|
||||
++ take-writ-find-ship ::
|
||||
|= {way=wire rot=riot}
|
||||
?> ?=({@ @ @ *} way)
|
||||
|= [way=wire rot=riot]
|
||||
?> ?=([@ @ @ *] way)
|
||||
=/ hos=kiln-sync
|
||||
:* syd=(slav %tas i.way)
|
||||
her=(slav %p i.t.way)
|
||||
@ -520,8 +520,8 @@
|
||||
abet:abet:(take-find-ship:(auto hos) rot)
|
||||
::
|
||||
++ take-writ-sync ::
|
||||
|= {way=wire rot=riot}
|
||||
?> ?=({@ @ @ *} way)
|
||||
|= [way=wire rot=riot]
|
||||
?> ?=([@ @ @ *] way)
|
||||
=/ hos=kiln-sync
|
||||
:* syd=(slav %tas i.way)
|
||||
her=(slav %p i.t.way)
|
||||
@ -685,7 +685,7 @@
|
||||
(blab [%pass /kiln/[syd] %arvo %c [%merg syd her sud cas gem]] ~)
|
||||
::
|
||||
++ fancy-merge :: send to self
|
||||
|= {syd=desk her=@p sud=desk gem=?(%auto germ)}
|
||||
|= [syd=desk her=@p sud=desk gem=?(%auto germ)]
|
||||
^+ +>
|
||||
=/ =cage [%kiln-merge !>([syd her sud cas gem])]
|
||||
%- blab :_ ~
|
||||
@ -694,7 +694,7 @@
|
||||
++ spam ::|=(tang ((slog +<) ..spam))
|
||||
|*(* +>(..work (^spam +<)))
|
||||
++ merge
|
||||
|= {her=@p sud=@tas cas=case gim=?(%auto germ)}
|
||||
|= [her=@p sud=@tas cas=case gim=?(%auto germ)]
|
||||
^+ +>
|
||||
?. ?=(%auto gim)
|
||||
perform(auto |, gem gim, her her, cas cas, sud sud)
|
||||
@ -828,7 +828,7 @@
|
||||
(scan a (more (just '\0a') (cook |=(a=tape leaf+a) (star prn))))
|
||||
::
|
||||
++ tanks-if-any
|
||||
|= {a=tape b=(list path) c=tape} ^- (list tank)
|
||||
|= [a=tape b=(list path) c=tape] ^- (list tank)
|
||||
?: =(~ b) ~
|
||||
(welp (tape-to-tanks "\0a{c}{a}") >b< ~)
|
||||
--
|
||||
|
@ -34,7 +34,7 @@
|
||||
:: :: ++apex:en-json:html
|
||||
++ apex
|
||||
=, en-json:html
|
||||
|= {val=json sor=$-(^ ?) rez=tape}
|
||||
|= [val=json sor=$-(^ ?) rez=tape]
|
||||
^- tape
|
||||
?~ val (weld "null" rez)
|
||||
?- -.val
|
||||
@ -57,7 +57,7 @@
|
||||
|- ^- tape
|
||||
?~ viz rez
|
||||
=+ hed=(jesc i.viz)
|
||||
?: ?=({@ ~} hed)
|
||||
?: ?=([@ ~] hed)
|
||||
[i.hed $(viz t.viz)]
|
||||
(weld hed $(viz t.viz))
|
||||
::
|
||||
|
@ -9,7 +9,7 @@
|
||||
:: Like +rose except also produces line number
|
||||
::
|
||||
++ lily
|
||||
|* {los=tape sab=rule}
|
||||
|* [los=tape sab=rule]
|
||||
=+ vex=(sab [[1 1] los])
|
||||
?~ q.vex
|
||||
[%| p=p.vex(q (dec q.p.vex))]
|
||||
|
@ -1,8 +1,8 @@
|
||||
:: Fast type printing that's easy on the eyes or your money back
|
||||
::
|
||||
=> |%
|
||||
++ cape {p=(map @ud wine) q=wine}
|
||||
++ wine
|
||||
+$ cape [p=(map @ud wine) q=wine]
|
||||
+$ wine
|
||||
$@ $? %noun
|
||||
%path
|
||||
%type
|
||||
@ -11,22 +11,22 @@
|
||||
%wool
|
||||
%yarn
|
||||
==
|
||||
$% {%mato p=term}
|
||||
{%gate p=hoon q=type r=wine}
|
||||
{%core p=(list @ta) q=wine}
|
||||
{%face p=term q=wine}
|
||||
{%list p=term q=wine}
|
||||
{%pear p=term q=@}
|
||||
{%bcwt p=(list wine)}
|
||||
{%plot p=(list wine)}
|
||||
{%stop p=@ud}
|
||||
{%tree p=term q=wine}
|
||||
{%unit p=term q=wine}
|
||||
$% [%mato p=term]
|
||||
[%gate p=hoon q=type r=wine]
|
||||
[%core p=(list @ta) q=wine]
|
||||
[%face p=term q=wine]
|
||||
[%list p=term q=wine]
|
||||
[%pear p=term q=@]
|
||||
[%bcwt p=(list wine)]
|
||||
[%plot p=(list wine)]
|
||||
[%stop p=@ud]
|
||||
[%tree p=term q=wine]
|
||||
[%unit p=term q=wine]
|
||||
==
|
||||
--
|
||||
|_ sut=type
|
||||
++ dash
|
||||
|= {mil=tape lim=char lam=tape}
|
||||
|= [mil=tape lim=char lam=tape]
|
||||
^- tape
|
||||
=/ esc (~(gas in *(set @tD)) lam)
|
||||
:- lim
|
||||
@ -50,14 +50,14 @@
|
||||
|%
|
||||
++ many
|
||||
|= haz=(list wine)
|
||||
^- {(list tank) (set @ud)}
|
||||
^- [(list tank) (set @ud)]
|
||||
?~ haz [~ gid]
|
||||
=^ mor gid $(haz t.haz)
|
||||
=^ dis gid ^$(q.ham i.haz)
|
||||
[[dis mor] gid]
|
||||
::
|
||||
++ $
|
||||
^- {tank (set @ud)}
|
||||
^- [tank (set @ud)]
|
||||
?- q.ham
|
||||
%noun :_(gid [%leaf '*' ~])
|
||||
%path :_(gid [%leaf '/' ~])
|
||||
@ -66,8 +66,8 @@
|
||||
%wool :_(gid [%leaf '*' '"' '"' ~])
|
||||
%wall :_(gid [%leaf '*' '\'' '\'' ~])
|
||||
%yarn :_(gid [%leaf '"' '"' ~])
|
||||
{%mato *} :_(gid [%leaf '@' (trip p.q.ham)])
|
||||
{%gate *}
|
||||
[%mato *] :_(gid [%leaf '@' (trip p.q.ham)])
|
||||
[%gate *]
|
||||
=^ sam gid
|
||||
?. ?=([%plot * * *] r.q.ham)
|
||||
?: ?=(%plot -.r.q.ham)
|
||||
@ -92,7 +92,7 @@
|
||||
==
|
||||
~
|
||||
::
|
||||
{%core *}
|
||||
[%core *]
|
||||
=^ sam gid
|
||||
?. ?=([%plot * * ~] q.q.ham)
|
||||
`gid
|
||||
@ -114,26 +114,26 @@
|
||||
[[%leaf (rip 3 i.p.q.ham)] $(p.q.ham t.p.q.ham)]
|
||||
~
|
||||
::
|
||||
{%face *}
|
||||
[%face *]
|
||||
=^ cox gid $(q.ham q.q.ham)
|
||||
:_(gid [%palm [['=' ~] ~ ~ ~] [%leaf (trip p.q.ham)] cox ~])
|
||||
::
|
||||
{%list *}
|
||||
[%list *]
|
||||
=^ cox gid $(q.ham q.q.ham)
|
||||
:_(gid [%rose [" " (weld (trip p.q.ham) "(") ")"] cox ~])
|
||||
::
|
||||
{%bcwt *}
|
||||
[%bcwt *]
|
||||
=^ coz gid (many p.q.ham)
|
||||
:_(gid [%rose [[' ' ~] ['?' '(' ~] [')' ~]] coz])
|
||||
::
|
||||
{%plot *}
|
||||
[%plot *]
|
||||
=^ coz gid (many p.q.ham)
|
||||
:_(gid [%rose [[' ' ~] ['[' ~] [']' ~]] coz])
|
||||
::
|
||||
{%pear *}
|
||||
[%pear *]
|
||||
:_(gid [%leaf '$' ~(rend co [%$ p.q.ham q.q.ham])])
|
||||
::
|
||||
{%stop *}
|
||||
[%stop *]
|
||||
=+ num=~(rend co [%$ %ud p.q.ham])
|
||||
?: (~(has in gid) p.q.ham)
|
||||
:_(gid [%leaf '#' num])
|
||||
@ -144,23 +144,23 @@
|
||||
==
|
||||
:_(gid [%palm [['.' ~] ~ ~ ~] [%leaf ['^' '#' num]] cox ~])
|
||||
::
|
||||
{%tree *}
|
||||
[%tree *]
|
||||
=^ cox gid $(q.ham q.q.ham)
|
||||
:_(gid [%rose [" " (weld (trip p.q.ham) "(") ")"] cox ~])
|
||||
::
|
||||
{%unit *}
|
||||
[%unit *]
|
||||
=^ cox gid $(q.ham q.q.ham)
|
||||
:_(gid [%rose [" " (weld (trip p.q.ham) "(") ")"] cox ~])
|
||||
==
|
||||
--
|
||||
::
|
||||
++ dish !:
|
||||
|= {ham=cape lum=*} ^- tank
|
||||
|= [ham=cape lum=*] ^- tank
|
||||
~| [%dish-h ?@(q.ham q.ham -.q.ham)]
|
||||
~| [%lump lum]
|
||||
~| [%ham ham]
|
||||
%- need
|
||||
=| gil=(set {@ud *})
|
||||
=| gil=(set [@ud *])
|
||||
|- ^- (unit tank)
|
||||
?- q.ham
|
||||
%noun
|
||||
@ -215,7 +215,7 @@
|
||||
%void
|
||||
~
|
||||
::
|
||||
{%mato *}
|
||||
[%mato *]
|
||||
?. ?=(@ lum)
|
||||
~
|
||||
:+ ~
|
||||
@ -227,10 +227,10 @@
|
||||
%tas ['%' ?.(=(0 lum) (rip 3 lum) ['$' ~])]
|
||||
==
|
||||
::
|
||||
{%gate *}
|
||||
[%gate *]
|
||||
!!
|
||||
::
|
||||
{%core *}
|
||||
[%core *]
|
||||
:: XX needs rethinking for core metal
|
||||
:: ?. ?=(^ lum) ~
|
||||
:: => .(lum `*`lum)
|
||||
@ -244,13 +244,13 @@
|
||||
:: ?~(mur ~ [~ [[%leaf (rip 3 i.p.q.ham)] u.mur]])
|
||||
[~ (dial ham)]
|
||||
::
|
||||
{%face *}
|
||||
[%face *]
|
||||
=+ wal=$(q.ham q.q.ham)
|
||||
?~ wal
|
||||
~
|
||||
[~ %palm [['=' ~] ~ ~ ~] [%leaf (trip p.q.ham)] u.wal ~]
|
||||
::
|
||||
{%list *}
|
||||
[%list *]
|
||||
?: =(~ lum)
|
||||
[~ %leaf '~' ~]
|
||||
=- ?~ tok
|
||||
@ -265,7 +265,7 @@
|
||||
~
|
||||
[~ u.for u.aft]
|
||||
::
|
||||
{%bcwt *}
|
||||
[%bcwt *]
|
||||
|- ^- (unit tank)
|
||||
?~ p.q.ham
|
||||
~
|
||||
@ -274,7 +274,7 @@
|
||||
$(p.q.ham t.p.q.ham)
|
||||
wal
|
||||
::
|
||||
{%plot *}
|
||||
[%plot *]
|
||||
=- ?~ tok
|
||||
~
|
||||
[~ %rose [[' ' ~] ['[' ~] [']' ~]] u.tok]
|
||||
@ -282,7 +282,7 @@
|
||||
|- ^- (unit (list tank))
|
||||
?~ p.q.ham
|
||||
~
|
||||
?: ?=({* ~} p.q.ham)
|
||||
?: ?=([* ~] p.q.ham)
|
||||
=+ wal=^$(q.ham i.p.q.ham)
|
||||
?~(wal ~ [~ [u.wal ~]])
|
||||
?@ lum
|
||||
@ -295,25 +295,25 @@
|
||||
~
|
||||
[~ u.gim u.myd]
|
||||
::
|
||||
{%pear *}
|
||||
[%pear *]
|
||||
?. =(lum q.q.ham)
|
||||
~
|
||||
=. p.q.ham
|
||||
(rash p.q.ham ;~(sfix (cook crip (star low)) (star hig)))
|
||||
=+ fox=$(q.ham [%mato p.q.ham])
|
||||
?> ?=({~ %leaf ^} fox)
|
||||
?> ?=([~ %leaf ^] fox)
|
||||
?: ?=(?(%n %tas) p.q.ham)
|
||||
fox
|
||||
[~ %leaf '%' p.u.fox]
|
||||
::
|
||||
{%stop *}
|
||||
[%stop *]
|
||||
?: (~(has in gil) [p.q.ham lum]) ~
|
||||
=+ kep=(~(get by p.ham) p.q.ham)
|
||||
?~ kep
|
||||
~|([%stop-loss p.q.ham] !!)
|
||||
$(gil (~(put in gil) [p.q.ham lum]), q.ham u.kep)
|
||||
::
|
||||
{%tree *}
|
||||
[%tree *]
|
||||
=- ?~ tok
|
||||
~
|
||||
[~ %rose [[' ' ~] ['{' ~] ['}' ~]] u.tok]
|
||||
@ -322,7 +322,7 @@
|
||||
|- ^- (unit (list tank))
|
||||
?: =(~ lum)
|
||||
[~ tuk]
|
||||
?. ?=({n=* l=* r=*} lum)
|
||||
?. ?=([n=* l=* r=*] lum)
|
||||
~
|
||||
=+ rol=$(lum r.lum)
|
||||
?~ rol
|
||||
@ -332,7 +332,7 @@
|
||||
~
|
||||
$(lum l.lum, tuk [u.tim u.rol])
|
||||
::
|
||||
{%unit *}
|
||||
[%unit *]
|
||||
?@ lum
|
||||
?.(=(~ lum) ~ [~ %leaf '~' ~])
|
||||
?. =(~ -.lum)
|
||||
@ -346,15 +346,15 @@
|
||||
++ doge
|
||||
|= ham=cape
|
||||
=- ?+ woz woz
|
||||
{%list * {%mato %'ta'}} %path
|
||||
{%list * {%mato %'t'}} %wall
|
||||
{%list * {%mato %'tD'}} %yarn
|
||||
{%list * %yarn} %wool
|
||||
[%list * [%mato %'ta']] %path
|
||||
[%list * [%mato %'t']] %wall
|
||||
[%list * [%mato %'tD']] %yarn
|
||||
[%list * %yarn] %wool
|
||||
==
|
||||
^= woz
|
||||
^- wine
|
||||
?. ?=({%stop *} q.ham)
|
||||
?: ?& ?= {%bcwt {%pear %n %0} {%plot {%pear %n %0} {%face *} ~} ~}
|
||||
?. ?=([%stop *] q.ham)
|
||||
?: ?& ?= [%bcwt [%pear %n %0] [%plot [%pear %n %0] [%face *] ~] ~]
|
||||
q.ham
|
||||
=(1 (met 3 p.i.t.p.i.t.p.q.ham))
|
||||
==
|
||||
@ -364,13 +364,13 @@
|
||||
?~ may
|
||||
q.ham
|
||||
=+ nul=[%pear %n 0]
|
||||
?. ?& ?=({%bcwt *} u.may)
|
||||
?=({* * ~} p.u.may)
|
||||
?. ?& ?=([%bcwt *] u.may)
|
||||
?=([* * ~] p.u.may)
|
||||
|(=(nul i.p.u.may) =(nul i.t.p.u.may))
|
||||
==
|
||||
q.ham
|
||||
=+ din=?:(=(nul i.p.u.may) i.t.p.u.may i.p.u.may)
|
||||
?: ?& ?=({%plot {%face *} {%face * %stop *} ~} din)
|
||||
?: ?& ?=([%plot [%face *] [%face * %stop *] ~] din)
|
||||
=(p.q.ham p.q.i.t.p.din)
|
||||
=(1 (met 3 p.i.p.din))
|
||||
=(1 (met 3 p.i.t.p.din))
|
||||
@ -379,9 +379,9 @@
|
||||
(cat 3 p.i.p.din p.i.t.p.din)
|
||||
q.i.p.din
|
||||
?: ?& ?= $: %plot
|
||||
{%face *}
|
||||
{%face * %stop *}
|
||||
{{%face * %stop *} ~}
|
||||
[%face *]
|
||||
[%face * %stop *]
|
||||
[[%face * %stop *] ~]
|
||||
==
|
||||
din
|
||||
=(p.q.ham p.q.i.t.p.din)
|
||||
@ -403,24 +403,24 @@
|
||||
=+ gil=*(set type)
|
||||
=+ dex=[p=*(map type @) q=*(map @ wine)]
|
||||
=< [q.p q]
|
||||
|- ^- {p={p=(map type @) q=(map @ wine)} q=wine}
|
||||
|- ^- [p=[p=(map type @) q=(map @ wine)] q=wine]
|
||||
=- [p.tez (doge q.p.tez q.tez)]
|
||||
^= tez
|
||||
^- {p={p=(map type @) q=(map @ wine)} q=wine}
|
||||
^- [p=[p=(map type @) q=(map @ wine)] q=wine]
|
||||
?: (~(meet ut sut) -:!>(*type))
|
||||
[dex %type]
|
||||
?- sut
|
||||
%noun [dex sut]
|
||||
%void [dex sut]
|
||||
{%atom *} [dex ?~(q.sut [%mato p.sut] [%pear p.sut u.q.sut])]
|
||||
{%cell *}
|
||||
[%atom *] [dex ?~(q.sut [%mato p.sut] [%pear p.sut u.q.sut])]
|
||||
[%cell *]
|
||||
=+ hin=$(sut p.sut)
|
||||
=+ yon=$(dex p.hin, sut q.sut)
|
||||
:- p.yon
|
||||
:- %plot
|
||||
?:(?=({%plot *} q.yon) [q.hin p.q.yon] [q.hin q.yon ~])
|
||||
?:(?=([%plot *] q.yon) [q.hin p.q.yon] [q.hin q.yon ~])
|
||||
::
|
||||
{%core *}
|
||||
[%core *]
|
||||
?: ?=([[%$ * [[%$ @ *] ~ ~]] ~ ~] q.r.q.sut)
|
||||
=/ dad $(sut p.sut)
|
||||
:- p.dad
|
||||
@ -428,8 +428,8 @@
|
||||
[%gate q.n.q.q.n.q.r.q.sut sut(r.p.q %gold) q.dad]
|
||||
=+ yad=$(sut p.sut)
|
||||
:- p.yad
|
||||
=+ ^= doy ^- {p=(list @ta) q=wine}
|
||||
?: ?=({%core *} q.yad)
|
||||
=+ ^= doy ^- [p=(list @ta) q=wine]
|
||||
?: ?=([%core *] q.yad)
|
||||
[p.q.yad q.q.yad]
|
||||
[~ q.yad]
|
||||
:- %core
|
||||
@ -449,24 +449,24 @@
|
||||
[1 (add 'a' (mod (div gum 676) 26))]
|
||||
==
|
||||
::
|
||||
{%hint *}
|
||||
[%hint *]
|
||||
$(sut q.sut)
|
||||
::
|
||||
{%face *}
|
||||
[%face *]
|
||||
=+ yad=$(sut q.sut)
|
||||
?^(p.sut yad [p.yad [%face p.sut q.yad]])
|
||||
::
|
||||
{%fork *}
|
||||
[%fork *]
|
||||
=+ yed=(sort ~(tap in p.sut) aor)
|
||||
=- [p [%bcwt q]]
|
||||
|- ^- {p={p=(map type @) q=(map @ wine)} q=(list wine)}
|
||||
|- ^- [p=[p=(map type @) q=(map @ wine)] q=(list wine)]
|
||||
?~ yed
|
||||
[dex ~]
|
||||
=+ mor=$(yed t.yed)
|
||||
=+ dis=^$(dex p.mor, sut i.yed)
|
||||
[p.dis q.dis q.mor]
|
||||
::
|
||||
{%hold *}
|
||||
[%hold *]
|
||||
=+ hey=(~(get by p.dex) sut)
|
||||
?^ hey
|
||||
[dex [%stop u.hey]]
|
||||
|
@ -48,7 +48,7 @@
|
||||
::
|
||||
++ nu
|
||||
|= jon=json
|
||||
?> ?=({%s *} jon)
|
||||
?> ?=([%s *] jon)
|
||||
(rash p.jon hex)
|
||||
::
|
||||
++ metadata
|
||||
|
@ -66,7 +66,7 @@
|
||||
|%
|
||||
++ hif (boss 256 ;~(plug tip tiq (easy ~)))
|
||||
++ huf %+ cook
|
||||
|=({a=@ b=@} (wred:un ~(zug mu ~(zag mu [a b]))))
|
||||
|=([a=@ b=@] (wred:un ~(zug mu ~(zag mu [a b]))))
|
||||
;~(plug hif ;~(pfix hep hif))
|
||||
++ hyf (bass 0x1.0000.0000 ;~(plug huf ;~(pfix hep huf) (easy ~)))
|
||||
++ tip (sear |=(a=@ (ins:po a)) til)
|
||||
@ -87,7 +87,7 @@
|
||||
--
|
||||
::
|
||||
++ mu
|
||||
|_ {top=@ bot=@}
|
||||
|_ [top=@ bot=@]
|
||||
++ zag [p=(end 4 1 (add top bot)) q=bot]
|
||||
++ zig [p=(end 4 1 (add top (sub 0x1.0000 bot))) q=bot]
|
||||
++ zug (mix (lsh 4 1 top) bot)
|
||||
@ -105,9 +105,9 @@
|
||||
=> .(len (dec len))
|
||||
=+ mig=(zaft (xafo len (cut 3 [len 1] pyn)))
|
||||
%+ can 3
|
||||
%- flop ^- (list {@ @})
|
||||
%- flop ^- (list [@ @])
|
||||
:- [1 mig]
|
||||
|- ^- (list {@ @})
|
||||
|- ^- (list [@ @])
|
||||
?: =(0 len)
|
||||
~
|
||||
=> .(len (dec len))
|
||||
@ -122,17 +122,17 @@
|
||||
=> .(len (dec len))
|
||||
=+ mig=(cut 3 [len 1] cry)
|
||||
%+ can 3
|
||||
%- flop ^- (list {@ @})
|
||||
%- flop ^- (list [@ @])
|
||||
:- [1 (xaro len (zart mig))]
|
||||
|- ^- (list {@ @})
|
||||
|- ^- (list [@ @])
|
||||
?: =(0 len)
|
||||
~
|
||||
=> .(len (dec len))
|
||||
=+ mog=(cut 3 [len 1] cry)
|
||||
[[1 :(mix mig (end 3 1 len) (zyrt mog))] $(mig mog)]
|
||||
::
|
||||
++ xafo |=({a=@ b=@} +((mod (add (dec b) a) 255)))
|
||||
++ xaro |=({a=@ b=@} +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
|
||||
++ xafo |=([a=@ b=@] +((mod (add (dec b) a) 255)))
|
||||
++ xaro |=([a=@ b=@] +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
|
||||
::
|
||||
++ zaft :: forward 255-sbox
|
||||
|= a=@D
|
||||
|
@ -101,11 +101,11 @@
|
||||
=; cot [[(flop `path`tyl) `[/text/plain cot]] hav]
|
||||
^- octs
|
||||
?- tyl
|
||||
{%json *}
|
||||
[%json *]
|
||||
=/ dat .^(json %cx pax)
|
||||
(as-octt:mimes:html (en-json:html dat))
|
||||
::
|
||||
{%txt *}
|
||||
[%txt *]
|
||||
=/ dat .^(wain %cx pax)
|
||||
(as-octs:mimes:html (of-wain:format dat))
|
||||
::
|
||||
|
@ -157,7 +157,7 @@
|
||||
limb
|
||||
?- -.limb
|
||||
%& (axis-to-cord p.limb)
|
||||
:: {%| p=@ud q=(unit term) ]
|
||||
:: [%| p=@ud q=(unit term) ]
|
||||
%| (crip (runt [0 p.limb] ?~(q.limb "," (trip u.q.limb))))
|
||||
==
|
||||
::
|
||||
|
@ -13,7 +13,7 @@
|
||||
?@ pri
|
||||
leaf+?:(((sane %tas) pri) <`@tas`pri> <pri>)
|
||||
=< rose+[" " ?:(- "~[" "[") "]"]^+
|
||||
|- ^- {? (list tank)}
|
||||
|- ^- [? (list tank)]
|
||||
?~ +.pri
|
||||
[& ^$(pri -.pri) ~]
|
||||
?@ +.pri
|
||||
|
@ -3,20 +3,20 @@
|
||||
:::: /hoon/show-dir/lib
|
||||
::
|
||||
/? 310
|
||||
|= {vane=?(%g %c) pax=path des=(map @t ~)}
|
||||
|= [vane=?(%g %c) pax=path des=(map @t ~)]
|
||||
^- tank
|
||||
:+ %rose [" " `~]
|
||||
%+ turn (sort ~(tap by des) aor)
|
||||
|= {kid=@ta ~}
|
||||
|= [kid=@ta ~]
|
||||
=+ paf=`path`/[kid]
|
||||
=- :+ %rose ["/" ~ ?:(dir "/" ~)]
|
||||
(turn paf |=(a=knot leaf+(trip a)))
|
||||
|- ^- {dir=? paf=path}
|
||||
|- ^- [dir=? paf=path]
|
||||
=+ arf=.^(arch (cat 3 vane %y) (weld pax paf))
|
||||
?^ fil.arf
|
||||
[| paf]
|
||||
?~ dir.arf
|
||||
[& paf] :: !!
|
||||
?. ?=({^ ~ ~} dir.arf)
|
||||
?. ?=([^ ~ ~] dir.arf)
|
||||
[& paf]
|
||||
$(paf (welp paf /[p.n.dir.arf]))
|
||||
|
@ -31,7 +31,7 @@
|
||||
:: (apply:(apply b) y)
|
||||
::
|
||||
++ transmute :: dex as after sin
|
||||
|= {sin=sole-edit dex=sole-edit}
|
||||
|= [sin=sole-edit dex=sole-edit]
|
||||
~| [%transmute sin dex]
|
||||
^- sole-edit
|
||||
?: ?=(%mor -.sin)
|
||||
@ -81,7 +81,7 @@
|
||||
++ inverse :: relative inverse
|
||||
|= ted=sole-edit
|
||||
^- sole-edit
|
||||
=. ted ?.(?=({%mor * ~} ted) ted i.p.ted)
|
||||
=. ted ?.(?=([%mor * ~] ted) ted i.p.ted)
|
||||
?- -.ted
|
||||
%del [%ins p.ted (snag p.ted buf)]
|
||||
%ins [%del p.ted]
|
||||
@ -97,7 +97,7 @@
|
||||
::
|
||||
++ receive :: naturalize event
|
||||
|= sole-change
|
||||
^- {sole-edit sole-share}
|
||||
^- [sole-edit sole-share]
|
||||
?. &(=(his.ler his.ven) (lte own.ler own.ven))
|
||||
~| [%receive-sync his+[his.ler his.ven] own+[own.ler own.ven]]
|
||||
!!
|
||||
@ -110,8 +110,8 @@
|
||||
[dat abet:(apply(his.ven +(his.ven)) dat)]
|
||||
::
|
||||
++ remit :: conditional accept
|
||||
|= {cal=sole-change ask=$-((list @c) ?)}
|
||||
^- {(unit sole-change) sole-share}
|
||||
|= [cal=sole-change ask=$-((list @c) ?)]
|
||||
^- [(unit sole-change) sole-share]
|
||||
=+ old=buf
|
||||
=^ dat +>+<.$ (receive cal)
|
||||
?: (ask buf)
|
||||
@ -121,12 +121,12 @@
|
||||
::
|
||||
++ transmit :: outgoing change
|
||||
|= ted=sole-edit
|
||||
^- {sole-change sole-share}
|
||||
^- [sole-change sole-share]
|
||||
[[[his.ven own.ven] (sham buf) ted] (commit ted)]
|
||||
::
|
||||
++ transceive :: receive and invert
|
||||
|= sole-change
|
||||
^- {sole-edit sole-share}
|
||||
^- [sole-edit sole-share]
|
||||
=+ old=buf
|
||||
=^ dat +>+<.$ (receive +<.$)
|
||||
[(inverse(buf old) dat) +>+<.$]
|
||||
|
@ -31,7 +31,7 @@
|
||||
`tang`[[%leaf (weld "FAILED " name)] ~]
|
||||
::TODO indent
|
||||
:: %+ turn p:run
|
||||
:: |= {i=tape}
|
||||
:: |= [i=tape]
|
||||
:: ^- tank
|
||||
:: [%leaf (weld " " i)]
|
||||
p.run
|
||||
|
@ -17,16 +17,16 @@
|
||||
++ read-schem :: decode gapped noun
|
||||
=< (cook to-noun (cook build-grove apex))
|
||||
|%
|
||||
++ noun $@(term {noun noun}) :: shadow
|
||||
++ noun $@(term [noun noun]) :: shadow
|
||||
:: improper list of possible entry points
|
||||
++ grove $@(term {gap=@ sealed=noun pending=grove})
|
||||
++ grove $@(term [gap=@ sealed=noun pending=grove])
|
||||
++ apex ;~(plug sym (star ;~(plug delim sym)))
|
||||
++ delim ;~(pose (cold 0 dot) (cook lent (plus cab)))
|
||||
++ to-noun |=(a=grove ?@(a a [sealed.a $(a pending.a)]))
|
||||
++ build-grove
|
||||
|= {a=grove b=(list {p=@u q=term})} ^- grove
|
||||
|= [a=grove b=(list [p=@u q=term])] ^- grove
|
||||
%+ roll b =< .(acc a)
|
||||
|= {{gap=@u v=term} acc=grove} ^- grove
|
||||
|= [[gap=@u v=term] acc=grove] ^- grove
|
||||
?@ acc [gap acc v]
|
||||
?: (gth gap gap.acc) [gap (to-noun acc) v]
|
||||
acc(pending $(acc pending.acc))
|
||||
|
@ -2,9 +2,9 @@
|
||||
:::: /hoon/urb-split/lib
|
||||
::
|
||||
/? 310
|
||||
|= {dep=@uvH urb=manx} ^- {hed={@uvh marl} bod={@uvH marl}}
|
||||
|= [dep=@uvH urb=manx] ^- [hed=[@uvh marl] bod=[@uvH marl]]
|
||||
~| [%malformed-urb urb] :: XX types
|
||||
?> ?=({{%html ~} {{%head ~} *} {{%body ~} *} ~} urb)
|
||||
=+ `{{%html ~} {{%head ~} hed=marl} {{%body ~} bod=marl} ~}`urb
|
||||
?> ?=([[%html ~] [[%head ~] *] [[%body ~] *] ~] urb)
|
||||
=+ `[[%html ~] [[%head ~] hed=marl] [[%body ~] bod=marl] ~]`urb
|
||||
:- [dep hed] :: Assume all dependencies are hard
|
||||
[0v0 bod]
|
||||
|
@ -1319,7 +1319,7 @@
|
||||
::
|
||||
=^ i=xkey st
|
||||
^- [xkey xtable]
|
||||
%+ (fold {xkey xtable} xkey)
|
||||
%+ (fold ,[xkey xtable] xkey)
|
||||
[[void st] ~(tap in fork)]
|
||||
|= [[k=xkey tbl=xtable] branch=xkey]
|
||||
^- [xkey xtable]
|
||||
@ -1417,8 +1417,8 @@
|
||||
:: coherent `xrole` (where possible, otherwise a %misjunction).
|
||||
::
|
||||
:: This often needs to restructure things. For example, if we are
|
||||
:: combining `{{~ ~} {%a ~}}` and `{{~ ~} {%b ~}}`, we should produce
|
||||
:: `{{~ ~} ?%({%a ~} {%b ~})}`.
|
||||
:: combining `[[~ ~] [%a ~]]` and `[[~ ~] [%b ~]]`, we should produce
|
||||
:: `[[~ ~] ?%([%a ~] [%b ~])]`.
|
||||
::
|
||||
:: This is a massive switch on the xroles of the two arguments. This
|
||||
:: is *very* easy to get wrong, so I structured things this in a
|
||||
|
@ -14,7 +14,7 @@
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ mime |=({p=mite q=octs} (@t q.q))
|
||||
++ mime |=([p=mite q=octs] (@t q.q))
|
||||
++ noun @t :: clam from %noun
|
||||
--
|
||||
++ grad %mime
|
||||
|
@ -24,7 +24,7 @@
|
||||
:: %. jon => jo %- ot
|
||||
:: :~ mod+(cu silt (ar (su (perk ~[%ctrl %shift %alt %meta]))))
|
||||
:: :- %key
|
||||
:: %+ cu |*(a=$%({%str @t} {%act @}) ?+(-.a a %str +.a))
|
||||
:: %+ cu |*(a=$%([%str @t} [%act @}) ?+(-.a a %str +.a))
|
||||
:: =- (of [str+so act+(su (perk -)) ~])
|
||||
:: :~ %ctrl %shift %alt %meta %entr %esc %caps %uncap
|
||||
:: %pgup %pgdn %home %end %baxp %del %ins
|
||||
@ -33,7 +33,7 @@
|
||||
++ kyev
|
||||
|= kev=^kyev ^- dill-belt:dill
|
||||
~| dill-belt-incomplete+kev
|
||||
?: ?=({%act ?(%ctrl %shift %alt %meta)} q.kev)
|
||||
?: ?=([%act ?(%ctrl %shift %alt %meta)] q.kev)
|
||||
[%txt ~] :: ignore
|
||||
=+ mod=(~(del in p.kev) %shift)
|
||||
?^ mod
|
||||
@ -43,10 +43,10 @@
|
||||
q.kev
|
||||
(con 96 q.kev) :: ctrl key decoding
|
||||
=+ cha=(tuba (trip q.kev))
|
||||
?> ?=({@ ~} cha) :: of a single character
|
||||
?> ?=([@ ~] cha) :: of a single character
|
||||
?+ mod !! :: modified by one buckykey
|
||||
{%ctrl ~ ~} [%ctl i.cha]
|
||||
{%alt ~ ~} [%met i.cha]
|
||||
[%ctrl ~ ~] [%ctl i.cha]
|
||||
[%alt ~ ~] [%met i.cha]
|
||||
==
|
||||
?@ q.kev
|
||||
[%txt (tuba (trip q.kev))]
|
||||
|
@ -2,7 +2,7 @@
|
||||
:::: /hoon/do-claim/womb/mar
|
||||
::
|
||||
/? 310
|
||||
|_ {path @}
|
||||
|_ [path @]
|
||||
::
|
||||
++ grad %noun
|
||||
++ grow
|
||||
@ -11,6 +11,6 @@
|
||||
--
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun {path @} :: clam from %noun
|
||||
++ noun [path @] :: clam from %noun
|
||||
--
|
||||
--
|
||||
|
@ -41,7 +41,7 @@
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ mime |=({p=mite q=octs} q.q)
|
||||
++ mime |=([p=mite q=octs] q.q)
|
||||
++ noun @t :: clam from %noun
|
||||
++ txt of-wain:format
|
||||
--
|
||||
|
@ -17,7 +17,7 @@
|
||||
++ grab ^?
|
||||
|% :: convert from
|
||||
++ noun @t :: clam from %noun
|
||||
++ mime |=({p=mite q=octs} q.q) :: retrieve form %mime
|
||||
++ mime |=([p=mite q=octs] q.q) :: retrieve form %mime
|
||||
--
|
||||
++ grad %mime
|
||||
--
|
||||
|
@ -15,7 +15,7 @@
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ mime |=({p=mite q=octs} (@t q.q))
|
||||
++ mime |=([p=mite q=octs] (@t q.q))
|
||||
++ noun cord :: clam from %noun
|
||||
--
|
||||
++ grad %mime
|
||||
|
@ -17,7 +17,7 @@
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ mime |=({p=mite q=octs} (fall (rush (@t q.q) apex:de-json) *json))
|
||||
++ mime |=([p=mite q=octs] (fall (rush (@t q.q) apex:de-json) *json))
|
||||
++ noun json :: clam from %noun
|
||||
++ numb numb:enjs
|
||||
++ time time:enjs
|
||||
|
@ -11,7 +11,7 @@
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ mime |=({p=mite q=octs} (@t q.q))
|
||||
++ mime |=([p=mite q=octs] (@t q.q))
|
||||
++ noun cord :: clam from %noun
|
||||
--
|
||||
++ grad %mime
|
||||
|
@ -24,6 +24,6 @@
|
||||
++ form %mime
|
||||
++ diff |=(mime +<)
|
||||
++ pact |=(mime +<)
|
||||
++ join |=({mime mime} `(unit mime)`~)
|
||||
++ join |=([mime mime] `(unit mime)`~)
|
||||
--
|
||||
--
|
||||
|
@ -5,7 +5,7 @@
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ mime |=({p=mite q=octs} q.q)
|
||||
++ mime |=([p=mite q=octs] q.q)
|
||||
++ noun @t
|
||||
--
|
||||
++ grad %mime
|
||||
|
@ -7,7 +7,7 @@
|
||||
++ words 1
|
||||
++ hedtal
|
||||
=| met=marl
|
||||
|= a=marl ^- {hed=marl tal=marl}
|
||||
|= a=marl ^- [hed=marl tal=marl]
|
||||
?~ a [~ ~]
|
||||
?. ?=(%h1 n.g.i.a)
|
||||
?: ?=(%meta n.g.i.a)
|
||||
@ -18,19 +18,19 @@
|
||||
[c.i.a (weld (flop met) (limit words t.a))]
|
||||
::
|
||||
++ limit
|
||||
|= {lim=@u mal=marl}
|
||||
|= [lim=@u mal=marl]
|
||||
=< res
|
||||
|- ^- {rem=@u res=marl}
|
||||
|- ^- [rem=@u res=marl]
|
||||
?~ mal [lim ~]
|
||||
?~ lim [0 ~]
|
||||
=/ {lam=@u hed=manx}
|
||||
=/ [lam=@u hed=manx]
|
||||
?: ?=(_;/(**) i.mal)
|
||||
[lim ;/(tay)]:(deword lim v.i.a.g.i.mal)
|
||||
[rem ele(c res)]:[ele=i.mal $(mal c.i.mal)]
|
||||
[rem - res]:[hed $(lim lam, mal t.mal)]
|
||||
::
|
||||
++ deword
|
||||
|= {lim=@u tay=tape} ^- {lim=@u tay=tape}
|
||||
|= [lim=@u tay=tape] ^- [lim=@u tay=tape]
|
||||
?~ tay [lim tay]
|
||||
?~ lim [0 ~]
|
||||
=+ wer=(dot 1^1 tay)
|
||||
@ -42,7 +42,7 @@
|
||||
::
|
||||
::
|
||||
=, mimes:html
|
||||
|_ {hed=marl tal=marl}
|
||||
|_ [hed=marl tal=marl]
|
||||
++ grad %mime
|
||||
::
|
||||
++ grow :: convert to
|
||||
@ -57,6 +57,6 @@
|
||||
--
|
||||
--
|
||||
++ grab |% :: convert from
|
||||
++ noun {marl marl} :: clam from %noun
|
||||
++ noun [marl marl] :: clam from %noun
|
||||
++ elem |=(a=manx (hedtal +.a))
|
||||
-- --
|
||||
|
@ -22,16 +22,16 @@
|
||||
=> [dejs-soft:format ..sole-action]
|
||||
|^ (ot id+so dat+(fo %ret (of det+change tab+ni ~)) ~)
|
||||
++ fo
|
||||
|* {a=term b=fist}
|
||||
|* [a=term b=fist]
|
||||
|=(c=json ?.(=([%s a] c) (b c) (some [a ~])))
|
||||
::
|
||||
++ ra
|
||||
|* {a={term fist} b=fist}
|
||||
|* [a=[term fist] b=fist]
|
||||
|= c=json %. c
|
||||
?.(=(%a -.c) b (pe -.a (ar +.a)))
|
||||
::
|
||||
++ ke :: callbacks
|
||||
|* {gar=* sef=(trap fist)}
|
||||
|* [gar=* sef=(trap fist)]
|
||||
|= jon=json ^- (unit _gar)
|
||||
=- ~! gar ~! (need -) -
|
||||
((sef) jon)
|
||||
|
@ -30,7 +30,7 @@
|
||||
--
|
||||
--
|
||||
++ wush
|
||||
|= {wid=@u tan=tang}
|
||||
|= [wid=@u tan=tang]
|
||||
^- tape
|
||||
(of-wall (turn (flop tan) |=(a=tank (of-wall (wash 0^wid a)))))
|
||||
::
|
||||
|
@ -35,7 +35,7 @@
|
||||
(lurk txt dif)
|
||||
::
|
||||
++ join
|
||||
|= {ali=(urge cord) bob=(urge cord)}
|
||||
|= [ali=(urge cord) bob=(urge cord)]
|
||||
^- (unit (urge cord))
|
||||
|^
|
||||
=. ali (clean ali)
|
||||
@ -99,8 +99,8 @@
|
||||
--
|
||||
::
|
||||
++ mash
|
||||
|= $: {als=ship ald=desk ali=(urge cord)}
|
||||
{bos=ship bod=desk bob=(urge cord)}
|
||||
|= $: [als=ship ald=desk ali=(urge cord)]
|
||||
[bos=ship bod=desk bob=(urge cord)]
|
||||
==
|
||||
^- (urge cord)
|
||||
|^
|
||||
@ -124,7 +124,7 @@
|
||||
[i.bob $(ali t.ali, bob t.bob)]
|
||||
?: (gth p.i.ali (lent p.i.bob))
|
||||
[i.bob $(p.i.ali (sub p.i.ali (lent p.i.bob)), bob t.bob)]
|
||||
=/ {fic=(unce cord) ali=(urge cord) bob=(urge cord)}
|
||||
=/ [fic=(unce cord) ali=(urge cord) bob=(urge cord)]
|
||||
(resolve ali bob)
|
||||
[fic $(ali ali, bob bob)]
|
||||
:: ~ :: here, alice is good for a while, but not for the whole
|
||||
@ -133,7 +133,7 @@
|
||||
%|
|
||||
?- -.i.bob
|
||||
%|
|
||||
=/ {fic=(unce cord) ali=(urge cord) bob=(urge cord)}
|
||||
=/ [fic=(unce cord) ali=(urge cord) bob=(urge cord)]
|
||||
(resolve ali bob)
|
||||
[fic $(ali ali, bob bob)]
|
||||
::
|
||||
@ -142,7 +142,7 @@
|
||||
[i.ali $(ali t.ali, bob t.bob)]
|
||||
?: (gth p.i.bob (lent p.i.ali))
|
||||
[i.ali $(ali t.ali, p.i.bob (sub p.i.bob (lent p.i.ali)))]
|
||||
=/ {fic=(unce cord) ali=(urge cord) bob=(urge cord)}
|
||||
=/ [fic=(unce cord) ali=(urge cord) bob=(urge cord)]
|
||||
(resolve ali bob)
|
||||
[fic $(ali ali, bob bob)]
|
||||
==
|
||||
@ -192,8 +192,8 @@
|
||||
[i.wig $(wig t.wig)]
|
||||
::
|
||||
++ resolve
|
||||
|= {ali=(urge cord) bob=(urge cord)}
|
||||
^- {fic={%| p=(list cord) q=(list cord)} ali=(urge cord) bob=(urge cord)}
|
||||
|= [ali=(urge cord) bob=(urge cord)]
|
||||
^- [fic=[%| p=(list cord) q=(list cord)] ali=(urge cord) bob=(urge cord)]
|
||||
=- [[%| bac (annotate alc boc bac)] ali bob]
|
||||
|- ^- $: $: bac=(list cord)
|
||||
alc=(list cord)
|
||||
|
@ -17,5 +17,5 @@
|
||||
-- ::
|
||||
++ grab |% :: convert from
|
||||
++ noun @t :: clam from %noun
|
||||
++ mime |=({p=mite q=octs} q.q) :: retrieve form %mime
|
||||
++ mime |=([p=mite q=octs] q.q) :: retrieve form %mime
|
||||
-- --
|
||||
|
@ -3,8 +3,8 @@
|
||||
:::: /hoon/kyev/sur
|
||||
::
|
||||
/? 310
|
||||
=- {p=(set ?(%ctrl %shift %alt %meta)) q=$@(cord {%act speck})}
|
||||
^= speck
|
||||
=; speck
|
||||
,[p=(set ?(%ctrl %shift %alt %meta)) q=$@(cord [%act speck])]
|
||||
$? %ctrl %shift %alt %meta %entr %esc %caps %uncap
|
||||
%pgup %pgdn %home %end %baxp %del %ins
|
||||
%up %down %left %right
|
||||
|
@ -5,30 +5,30 @@
|
||||
sink=sink
|
||||
==
|
||||
++ source
|
||||
$% {%data data=@}
|
||||
{%dojo command=@t}
|
||||
{%clay pax=@t}
|
||||
{%url url=purl:eyre}
|
||||
{%api api=term command=@t}
|
||||
{%get-api api=term endpoint=(list @t)}
|
||||
{%as mar=mark next=source} :: can't be at the
|
||||
{%hoon code=@t next=source} :: end since they
|
||||
{%tuple next=(list source)} :: don't bunt well
|
||||
{%listen-api api=term event=term}
|
||||
{%export app=@t}
|
||||
{%import app=@t base64-jam=@t}
|
||||
{%export-all ~}
|
||||
{%import-all base64-jam=@t}
|
||||
$% [%data data=@]
|
||||
[%dojo command=@t]
|
||||
[%clay pax=@t]
|
||||
[%url url=purl:eyre]
|
||||
[%api api=term command=@t]
|
||||
[%get-api api=term endpoint=(list @t)]
|
||||
[%as mar=mark next=source] :: can't be at the
|
||||
[%hoon code=@t next=source] :: end since they
|
||||
[%tuple next=(list source)] :: don't bunt well
|
||||
[%listen-api api=term event=term]
|
||||
[%export app=@t]
|
||||
[%import app=@t base64-jam=@t]
|
||||
[%export-all ~]
|
||||
[%import-all base64-jam=@t]
|
||||
==
|
||||
++ sink
|
||||
$% {%stdout ~}
|
||||
{%output-file pax=@t}
|
||||
{%output-pill pax=@t}
|
||||
{%output-clay pax=path}
|
||||
{%url url=purl:eyre}
|
||||
{%to-api api=term command=@t}
|
||||
{%send-api api=term endpoint=(list @t)}
|
||||
{%command command=@t}
|
||||
{%app app=term}
|
||||
$% [%stdout ~]
|
||||
[%output-file pax=@t]
|
||||
[%output-pill pax=@t]
|
||||
[%output-clay pax=path]
|
||||
[%url url=purl:eyre]
|
||||
[%to-api api=term command=@t]
|
||||
[%send-api api=term endpoint=(list @t)]
|
||||
[%command command=@t]
|
||||
[%app app=term]
|
||||
==
|
||||
--
|
||||
|
@ -3,58 +3,58 @@
|
||||
::
|
||||
^?
|
||||
|%
|
||||
++ sole-action :: sole to app
|
||||
+$ sole-action :: sole to app
|
||||
$: id=@ta :: duct id
|
||||
$= dat
|
||||
$% :: {%abo ~} :: reset interaction
|
||||
{%det sole-change} :: command line edit
|
||||
{%ret ~} :: submit and clear
|
||||
{%clr ~} :: exit context
|
||||
{%tab pos=@ud} :: tab complete
|
||||
$% :: [%abo ~] :: reset interaction
|
||||
[%det sole-change] :: command line edit
|
||||
[%ret ~] :: submit and clear
|
||||
[%clr ~] :: exit context
|
||||
[%tab pos=@ud] :: tab complete
|
||||
== ::
|
||||
==
|
||||
++ sole-buffer (list @c) :: command state
|
||||
++ sole-change :: network change
|
||||
+$ sole-buffer (list @c) :: command state
|
||||
+$ sole-change :: network change
|
||||
$: ler=sole-clock :: destination clock
|
||||
haw=@uvH :: source hash
|
||||
ted=sole-edit :: state change
|
||||
== ::
|
||||
++ sole-clock {own=@ud his=@ud} :: vector clock
|
||||
++ sole-edit :: shared state change
|
||||
$% {%del p=@ud} :: delete one at
|
||||
{%ins p=@ud q=@c} :: insert at
|
||||
{%mor p=(list sole-edit)} :: combination
|
||||
{%nop ~} :: no-op
|
||||
{%set p=sole-buffer} :: discontinuity
|
||||
+$ sole-clock [own=@ud his=@ud] :: vector clock
|
||||
+$ sole-edit :: shared state change
|
||||
$% [%del p=@ud] :: delete one at
|
||||
[%ins p=@ud q=@c] :: insert at
|
||||
[%mor p=(list sole-edit)] :: combination
|
||||
[%nop ~] :: no-op
|
||||
[%set p=sole-buffer] :: discontinuity
|
||||
== ::
|
||||
++ sole-effect :: app to sole
|
||||
$% {%bel ~} :: beep
|
||||
{%blk p=@ud q=@c} :: blink+match char at
|
||||
{%clr ~} :: clear screen
|
||||
{%det sole-change} :: edit command
|
||||
{%err p=@ud} :: error point
|
||||
{%klr p=styx} :: styled text line
|
||||
{%mor p=(list sole-effect)} :: multiple effects
|
||||
{%nex ~} :: save clear command
|
||||
{%pro sole-prompt} :: set prompt
|
||||
{%sag p=path q=*} :: save to jamfile
|
||||
{%sav p=path q=@} :: save to file
|
||||
{%tab p=(list {=cord =tank})} :: tab-complete list
|
||||
{%tan p=(list tank)} :: classic tank
|
||||
:: {%taq p=tanq} :: modern tank
|
||||
{%txt p=tape} :: text line
|
||||
{%url p=@t} :: activate url
|
||||
+$ sole-effect :: app to sole
|
||||
$% [%bel ~] :: beep
|
||||
[%blk p=@ud q=@c] :: blink+match char at
|
||||
[%clr ~] :: clear screen
|
||||
[%det sole-change] :: edit command
|
||||
[%err p=@ud] :: error point
|
||||
[%klr p=styx] :: styled text line
|
||||
[%mor p=(list sole-effect)] :: multiple effects
|
||||
[%nex ~] :: save clear command
|
||||
[%pro sole-prompt] :: set prompt
|
||||
[%sag p=path q=*] :: save to jamfile
|
||||
[%sav p=path q=@] :: save to file
|
||||
[%tab p=(list [=cord =tank])] :: tab-complete list
|
||||
[%tan p=(list tank)] :: classic tank
|
||||
:: [%taq p=tanq] :: modern tank
|
||||
[%txt p=tape] :: text line
|
||||
[%url p=@t] :: activate url
|
||||
== ::
|
||||
++ sole-command :: command state
|
||||
+$ sole-command :: command state
|
||||
$: pos=@ud :: cursor position
|
||||
say=sole-share :: cursor
|
||||
== ::
|
||||
++ sole-prompt :: prompt definition
|
||||
+$ sole-prompt :: prompt definition
|
||||
$: vis=? :: command visible
|
||||
tag=term :: history mode
|
||||
cad=styx :: caption
|
||||
== ::
|
||||
++ sole-share :: symmetric state
|
||||
+$ sole-share :: symmetric state
|
||||
$: ven=sole-clock :: our vector clock
|
||||
leg=(list sole-edit) :: unmerged edits
|
||||
buf=sole-buffer :: sole state
|
||||
@ -65,7 +65,7 @@
|
||||
|* out=$-(* *) :: output structure
|
||||
$-(sole-input (sole-result out)) :: output function
|
||||
:: ::
|
||||
++ sole-input tape :: prompt input
|
||||
+$ sole-input tape :: prompt input
|
||||
++ sole-result :: conditional result
|
||||
|* out=$-(* *) :: output structure
|
||||
$@(@ud (sole-product out)) :: error position
|
||||
@ -76,13 +76,11 @@
|
||||
%+ each (unit out) :: ~ is abort
|
||||
(pair sole-prompt (sole-dialog out)) :: ask and continue
|
||||
:: ::
|
||||
++ sole-gen :: XX virtual type
|
||||
$% {%say $-((sole-args) (cask))} :: direct noun
|
||||
{%ask $-((sole-args) (sole-product (cask)))} :: dialog
|
||||
+$ sole-gen :: XX virtual type
|
||||
$% [%say $-((sole-args) (cask))] :: direct noun
|
||||
[%ask $-((sole-args) (sole-product (cask)))] :: dialog
|
||||
== ::
|
||||
++ sole-args :: generator arguments
|
||||
|* _[* *] ::
|
||||
{{now=@da eny=@uvJ bek=beak} {,+<- ,+<+}} ::
|
||||
:: ::
|
||||
:: ::
|
||||
,[[now=@da eny=@uvJ bek=beak] [,+<- ,+<+]] ::
|
||||
--
|
||||
|
@ -2,4 +2,4 @@
|
||||
::
|
||||
:::: /hoon/urb/sur
|
||||
::
|
||||
{hed={dep=@uvH ele=marl} bod={dep=@uvH ele=marl}}
|
||||
[hed=[dep=@uvH ele=marl] bod=[dep=@uvH ele=marl]]
|
||||
|
@ -343,10 +343,10 @@
|
||||
~/ %sloy
|
||||
|= sod=slyd
|
||||
^- slyt
|
||||
|= {ref=* raw=*}
|
||||
|= [ref=* raw=*]
|
||||
=+ pux=((soft path) raw)
|
||||
?~ pux ~
|
||||
?. ?=({@ @ @ @ *} u.pux) ~
|
||||
?. ?=([@ @ @ @ *] u.pux) ~
|
||||
=+ :* hyr=?~(i.u.pux (some %$) (slaw %tas i.u.pux))
|
||||
fal=(slaw %p i.t.u.pux)
|
||||
dyc=?~(i.t.t.u.pux (some %$) (slaw %tas i.t.t.u.pux))
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@
|
||||
::
|
||||
+$ ankh :: expanded node
|
||||
$~ [~ ~]
|
||||
$: fil=(unit {p=lobe q=cage}) :: file
|
||||
$: fil=(unit [p=lobe q=cage]) :: file
|
||||
dir=(map @ta ankh) :: folders
|
||||
== ::
|
||||
::
|
||||
@ -64,7 +64,7 @@
|
||||
:: Includes subscriber list, dome (desk content), possible commit state (for
|
||||
:: local changes), possible merge state (for incoming merges), and permissions.
|
||||
::
|
||||
++ dojo
|
||||
+$ dojo
|
||||
$: qyx=cult :: subscribers
|
||||
dom=dome :: desk state
|
||||
per=regs :: read perms per path
|
||||
@ -82,7 +82,7 @@
|
||||
:: having changed; this lets us short-circuit that in some cases.
|
||||
:: Whenever you give an `%ergo`, you must update this.
|
||||
::
|
||||
++ dome
|
||||
+$ dome
|
||||
$: ank=ankh :: state
|
||||
let=aeon :: top id
|
||||
hit=(map aeon tako) :: versions by id
|
||||
@ -101,7 +101,7 @@
|
||||
:: -- `dif` is the diffs in `dig` applied to their files.
|
||||
:: -- `mut` is the diffs between `muc` and the original files.
|
||||
::
|
||||
++ dork :: diff work
|
||||
+$ dork :: diff work
|
||||
$: del=(list path) :: deletes
|
||||
ink=(list (pair path cage)) :: hoon inserts
|
||||
ins=(list (pair path cage)) :: inserts
|
||||
@ -130,7 +130,7 @@
|
||||
::
|
||||
:: Hash of a blob, for lookup in the object store (lat.ran)
|
||||
::
|
||||
++ lobe @uvI :: blob ref
|
||||
+$ lobe @uvI :: blob ref
|
||||
::
|
||||
:: New desk data.
|
||||
::
|
||||
@ -138,7 +138,7 @@
|
||||
:: of all new aeons to hashes of their commits, the most recent aeon, and sets
|
||||
:: of all new commits and data.
|
||||
::
|
||||
++ nako :: subscription state
|
||||
+$ nako :: subscription state
|
||||
$: gar=(map aeon tako) :: new ids
|
||||
let=aeon :: next id
|
||||
lar=(set yaki) :: new commits
|
||||
@ -157,7 +157,7 @@
|
||||
:: -- `cez` is a collection of named permission groups.
|
||||
:: -- `pud` is an update that's waiting on a kernel upgrade
|
||||
::
|
||||
++ raft :: filesystem
|
||||
+$ raft :: filesystem
|
||||
$: rom=room :: domestic
|
||||
hoy=(map ship rung) :: foreign
|
||||
ran=rang :: hashes
|
||||
@ -172,17 +172,17 @@
|
||||
::
|
||||
:: Maps of commit hashes to commits and content hashes to content.
|
||||
::
|
||||
++ rang ::
|
||||
+$ rang ::
|
||||
$: hut=(map tako yaki) ::
|
||||
lat=(map lobe blob) ::
|
||||
== ::
|
||||
::
|
||||
:: Unvalidated response to a request.
|
||||
::
|
||||
:: Like a ++rant, but with a page of data rather than a cage of it.
|
||||
:: Like a +$rant, but with a page of data rather than a cage of it.
|
||||
::
|
||||
++ rand :: unvalidated rant
|
||||
$: p={p=care q=case r=@tas} :: clade release book
|
||||
+$ rand :: unvalidated rant
|
||||
$: p=[p=care q=case r=@tas] :: clade release book
|
||||
q=path :: spur
|
||||
r=page :: data
|
||||
== ::
|
||||
@ -201,7 +201,7 @@
|
||||
:: -- `dom` is the actual state of the filetree. Since this is used almost
|
||||
:: exclusively in `++ze`, we describe it there.
|
||||
::
|
||||
++ rede :: universal project
|
||||
+$ rede :: universal project
|
||||
$: lim=@da :: complete to
|
||||
ref=(unit rind) :: outgoing requests
|
||||
qyx=cult :: subscribers
|
||||
@ -238,7 +238,7 @@
|
||||
::
|
||||
:: Result of a subscription
|
||||
::
|
||||
++ sub-result
|
||||
+$ sub-result
|
||||
$% [%blab =mood data=(each cage lobe)]
|
||||
[%bleb ver=@ud ins=@ud range=(unit (pair aeon aeon))]
|
||||
[%balk cage=(unit (each cage lobe)) =mood]
|
||||
@ -250,19 +250,19 @@
|
||||
::
|
||||
:: `hun` is the duct to dill, and `dos` is a collection of our desks.
|
||||
::
|
||||
++ room :: fs per ship
|
||||
+$ room :: fs per ship
|
||||
$: hun=duct :: terminal duct
|
||||
dos=(map desk dojo) :: native desk
|
||||
== ::
|
||||
::
|
||||
:: Stored request.
|
||||
::
|
||||
:: Like a ++rave but with caches of current versions for %next and %many.
|
||||
:: Like a +$rave but with caches of current versions for %next and %many.
|
||||
:: Generally used when we store a request in our state somewhere.
|
||||
::
|
||||
++ cach (unit (unit (each cage lobe))) :: cached result
|
||||
+$ cach (unit (unit (each cage lobe))) :: cached result
|
||||
+$ wove [for=(unit [=ship ver=@ud]) =rove] :: stored source + req
|
||||
++ rove :: stored request
|
||||
+$ rove :: stored request
|
||||
$% [%sing =mood] :: single request
|
||||
[%next =mood aeon=(unit aeon) =cach] :: next version of one
|
||||
$: %mult :: next version of any
|
||||
@ -276,12 +276,12 @@
|
||||
::
|
||||
:: Foreign desk data.
|
||||
::
|
||||
++ rung
|
||||
+$ rung
|
||||
$: rus=(map desk rede) :: neighbor desks
|
||||
==
|
||||
::
|
||||
++ move {p=duct q=(wind note gift:able)} :: local move
|
||||
++ note :: out request $->
|
||||
+$ move [p=duct q=(wind note gift:able)] :: local move
|
||||
+$ note :: out request $->
|
||||
$~ [%b %wait *@da] ::
|
||||
$% $: %a :: to %ames
|
||||
$>(%plea task:able:ames) ::
|
||||
@ -311,8 +311,8 @@
|
||||
$: %j :: by %jael
|
||||
$>(%public-keys task:able:jael) ::
|
||||
== == ::
|
||||
++ riot (unit rant) :: response+complete
|
||||
++ sign :: in result $<-
|
||||
+$ riot (unit rant) :: response+complete
|
||||
+$ sign :: in result $<-
|
||||
$~ [%b %wake ~] ::
|
||||
$% $: %a :: by %ames
|
||||
$> $? %boon :: response
|
||||
@ -1023,7 +1023,7 @@
|
||||
:: Handle `%sing` requests
|
||||
::
|
||||
++ aver
|
||||
|= {for=(unit ship) mun=mood}
|
||||
|= [for=(unit ship) mun=mood]
|
||||
^- [(unit (unit (each cage lobe))) ford-cache]
|
||||
=+ ezy=?~(ref ~ (~(get by haw.u.ref) mun))
|
||||
?^ ezy
|
||||
@ -1057,7 +1057,7 @@
|
||||
:: Producing null means subscription has been completed or cancelled.
|
||||
::
|
||||
++ balk
|
||||
|= {hen=duct cay=(unit (each cage lobe)) mun=mood}
|
||||
|= [hen=duct cay=(unit (each cage lobe)) mun=mood]
|
||||
^+ +>
|
||||
?~ cay (blub hen)
|
||||
(blab hen mun u.cay)
|
||||
@ -1065,13 +1065,13 @@
|
||||
:: Set timer.
|
||||
::
|
||||
++ bait
|
||||
|= {hen=duct tym=@da}
|
||||
|= [hen=duct tym=@da]
|
||||
(emit hen %pass /tyme/(scot %p her)/[syd] %b %wait tym)
|
||||
::
|
||||
:: Cancel timer.
|
||||
::
|
||||
++ best
|
||||
|= {hen=duct tym=@da}
|
||||
|= [hen=duct tym=@da]
|
||||
(emit hen %pass /tyme/(scot %p her)/[syd] %b %rest tym)
|
||||
::
|
||||
:: Give subscription result.
|
||||
@ -1141,7 +1141,7 @@
|
||||
==
|
||||
::
|
||||
++ blas
|
||||
|= {hen=duct das=(set mood)}
|
||||
|= [hen=duct das=(set mood)]
|
||||
^+ +>
|
||||
?> ?=(^ das)
|
||||
:: translate the case to a date
|
||||
@ -1180,8 +1180,8 @@
|
||||
:: in `subs`.
|
||||
::
|
||||
++ duct-lift
|
||||
|* send=_|=({duct *} ..duct-lift)
|
||||
|= {a=(set duct) arg=_+<+.send} ^+ ..duct-lift
|
||||
|* send=_|=([duct *] ..duct-lift)
|
||||
|= [a=(set duct) arg=_+<+.send] ^+ ..duct-lift
|
||||
=+ all=~(tap by a)
|
||||
|- ^+ ..duct-lift
|
||||
?~ all ..duct-lift
|
||||
@ -1255,7 +1255,7 @@
|
||||
=+ aey=(case-to-aeon case.mood.rov)
|
||||
?~ aey ~
|
||||
%- ~(rep in ~(key by qyx))
|
||||
|= {haw=wove res=(unit wove)}
|
||||
|= [haw=wove res=(unit wove)]
|
||||
?^ res res
|
||||
?. =(for.wov for.haw) ~
|
||||
=* hav rove.haw
|
||||
@ -1273,7 +1273,7 @@
|
||||
=+ aey=(case-to-aeon case.mool.rov)
|
||||
?~ aey ~
|
||||
%- ~(rep in ~(key by qyx))
|
||||
|= {haw=wove res=(unit wove)}
|
||||
|= [haw=wove res=(unit wove)]
|
||||
?^ res res
|
||||
?. =(for.wov for.haw) ~
|
||||
=* hav rove.haw
|
||||
@ -1296,7 +1296,7 @@
|
||||
=+ aey=(case-to-aeon from.moat.rov)
|
||||
?~ aey ~
|
||||
%- ~(rep in ~(key by qyx))
|
||||
|= {haw=wove res=(unit wove)}
|
||||
|= [haw=wove res=(unit wove)]
|
||||
?^ res res
|
||||
?. =(for.wov for.haw) ~
|
||||
=* hav rove.haw
|
||||
@ -2576,7 +2576,7 @@
|
||||
^- (map term (pair @ud (set path)))
|
||||
%- malt ^- (list (trel term @ud (set path)))
|
||||
%+ murn ~(tap by mon)
|
||||
|= {nam=term bem=beam}
|
||||
|= [nam=term bem=beam]
|
||||
^- (unit (trel term @ud (set path)))
|
||||
=- ?~(- ~ `[nam (lent s.bem) (silt `(list path)`-)])
|
||||
%+ skim can
|
||||
@ -2606,7 +2606,7 @@
|
||||
:: Set permissions for a node.
|
||||
::
|
||||
++ perm
|
||||
|= {pax=path rit=rite}
|
||||
|= [pax=path rit=rite]
|
||||
^+ +>
|
||||
=/ mis=(set @ta)
|
||||
%+ roll
|
||||
@ -2616,7 +2616,7 @@
|
||||
%w who:(fall wit.rit *rule)
|
||||
%rw (~(uni in who:(fall red.rit *rule)) who:(fall wit.rit *rule))
|
||||
==
|
||||
|= {w=whom s=(set @ta)}
|
||||
|= [w=whom s=(set @ta)]
|
||||
?: |(?=(%& -.w) (~(has by cez) p.w)) s
|
||||
(~(put in s) p.w)
|
||||
?^ mis
|
||||
@ -2626,7 +2626,7 @@
|
||||
+>.$
|
||||
=- (emit hen %give %done `[%perm-fail [%leaf "No such group(s): {-}"]~])
|
||||
%+ roll ~(tap in `(set @ta)`mis)
|
||||
|= {g=@ta t=tape}
|
||||
|= [g=@ta t=tape]
|
||||
?~ t (trip g)
|
||||
:(weld t ", " (trip g))
|
||||
:: TODO remove this nasty hack
|
||||
@ -2642,7 +2642,7 @@
|
||||
==
|
||||
::
|
||||
++ put-perm
|
||||
|= {pes=regs pax=path new=(unit rule)}
|
||||
|= [pes=regs pax=path new=(unit rule)]
|
||||
?~ new (~(del by pes) pax)
|
||||
(~(put by pes) pax u.new)
|
||||
::
|
||||
@ -2656,7 +2656,7 @@
|
||||
==
|
||||
::
|
||||
++ forget-crew-in
|
||||
|= {nom=@ta pes=regs}
|
||||
|= [nom=@ta pes=regs]
|
||||
%- ~(run by pes)
|
||||
|= r=rule
|
||||
r(who (~(del in who.r) |+nom))
|
||||
@ -2671,7 +2671,7 @@
|
||||
=^ wos=(list wove) qyx
|
||||
:_ (~(run by qyx) |=(a=(set duct) (~(del in a) hen)))
|
||||
%- ~(rep by qyx)
|
||||
|= {{a=wove b=(set duct)} c=(list wove)}
|
||||
|= [[a=wove b=(set duct)] c=(list wove)]
|
||||
?.((~(has in b) hen) c [a c])
|
||||
::
|
||||
?~ ref
|
||||
@ -3259,7 +3259,7 @@
|
||||
::
|
||||
:: know about file in cach
|
||||
::
|
||||
++ know |=({(pair care path) c=cach} ?=(^ c))
|
||||
++ know |=([(pair care path) c=cach] ?=(^ c))
|
||||
::
|
||||
:: fill in the blanks
|
||||
::
|
||||
@ -3385,7 +3385,7 @@
|
||||
:: Checks whether two pieces of data (either cages or lobes) are the same.
|
||||
::
|
||||
++ equivalent-data
|
||||
|= {one=(each cage lobe) two=(each cage lobe)}
|
||||
|= [one=(each cage lobe) two=(each cage lobe)]
|
||||
^- ?
|
||||
?: ?=(%& -.one)
|
||||
?: ?=(%& -.two)
|
||||
@ -3398,7 +3398,7 @@
|
||||
:: Gets a map of the data at the given path and all children of it.
|
||||
::
|
||||
++ lobes-at-path
|
||||
|= {for=(unit ship) yon=aeon pax=path}
|
||||
|= [for=(unit ship) yon=aeon pax=path]
|
||||
^- (map path lobe)
|
||||
?: =(0 yon) ~
|
||||
:: we use %z for the check because it looks at all child paths.
|
||||
@ -3409,7 +3409,7 @@
|
||||
=< q
|
||||
%- aeon-to-yaki
|
||||
yon
|
||||
|= {p=path q=lobe}
|
||||
|= [p=path q=lobe]
|
||||
?| ?=(~ pax)
|
||||
?& !?=(~ p)
|
||||
=(-.pax -.p)
|
||||
@ -3477,15 +3477,15 @@
|
||||
:: already in `b`.
|
||||
::
|
||||
++ new-lobes :: object hash set
|
||||
|= {b=(set lobe) a=(set tako)} :: that aren't in b
|
||||
|= [b=(set lobe) a=(set tako)] :: that aren't in b
|
||||
^- (set lobe)
|
||||
%+ roll ~(tap in a)
|
||||
|= {tak=tako bar=(set lobe)}
|
||||
|= [tak=tako bar=(set lobe)]
|
||||
^- (set lobe)
|
||||
=+ yak=(tako-to-yaki tak)
|
||||
%+ roll ~(tap by q.yak)
|
||||
=< .(far bar)
|
||||
|= {{path lob=lobe} far=(set lobe)}
|
||||
|= [[path lob=lobe] far=(set lobe)]
|
||||
^- (set lobe)
|
||||
?~ (~(has in b) lob) :: don't need
|
||||
far
|
||||
@ -3566,14 +3566,14 @@
|
||||
(read-p-in pax pew.red)
|
||||
::
|
||||
++ read-p-in
|
||||
|= {pax=path pes=regs}
|
||||
|= [pax=path pes=regs]
|
||||
^- dict
|
||||
=/ rul=(unit rule) (~(get by pes) pax)
|
||||
?^ rul
|
||||
:+ pax mod.u.rul
|
||||
%- ~(rep in who.u.rul)
|
||||
|= {w=whom out=(pair (set ship) (map @ta crew))}
|
||||
?: ?=({%& @p} w)
|
||||
|= [w=whom out=(pair (set ship) (map @ta crew))]
|
||||
?: ?=([%& @p] w)
|
||||
[(~(put in p.out) +.w) q.out]
|
||||
=/ cru=(unit crew) (~(get by cez.ruf) +.w)
|
||||
?~ cru out
|
||||
@ -3582,7 +3582,7 @@
|
||||
$(pax (scag (dec (lent pax)) `path`pax))
|
||||
::
|
||||
++ may-read
|
||||
|= {who=ship car=care yon=aeon pax=path}
|
||||
|= [who=ship car=care yon=aeon pax=path]
|
||||
^- ?
|
||||
?+ car
|
||||
(allowed-by who pax per.red)
|
||||
@ -3597,7 +3597,7 @@
|
||||
=+ len=(lent pax)
|
||||
=- (levy ~(tap in -) |=(p=path (allowed-by who p per.red)))
|
||||
%+ roll ~(tap in (~(del in ~(key by q.yak)) pax))
|
||||
|= {p=path s=(set path)}
|
||||
|= [p=path s=(set path)]
|
||||
?. =(pax (scag len p)) s
|
||||
%- ~(put in s)
|
||||
?: ?=(%z car) p
|
||||
@ -3605,18 +3605,18 @@
|
||||
==
|
||||
::
|
||||
++ may-write
|
||||
|= {w=ship p=path}
|
||||
|= [w=ship p=path]
|
||||
(allowed-by w p pew.red)
|
||||
::
|
||||
++ allowed-by
|
||||
|= {who=ship pax=path pes=regs}
|
||||
|= [who=ship pax=path pes=regs]
|
||||
^- ?
|
||||
=/ rul=real rul:(read-p-in pax pes)
|
||||
=/ in-list/?
|
||||
?| (~(has in p.who.rul) who)
|
||||
::
|
||||
%- ~(rep by q.who.rul)
|
||||
|= {{@ta cru=crew} out=_|}
|
||||
|= [[@ta cru=crew] out=_|]
|
||||
?: out &
|
||||
(~(has in cru) who)
|
||||
==
|
||||
@ -3632,9 +3632,9 @@
|
||||
=/ descendants=(list (pair path lobe))
|
||||
%+ turn
|
||||
%+ skim ~(tap by (~(del by q.yaki) pax))
|
||||
|= {paf=path lob=lobe}
|
||||
|= [paf=path lob=lobe]
|
||||
=(pax (scag len paf))
|
||||
|= {paf=path lob=lobe}
|
||||
|= [paf=path lob=lobe]
|
||||
[(slag len paf) lob]
|
||||
=+ us=(~(get by q.yaki) pax)
|
||||
?: &(?=(~ descendants) ?=(~ us))
|
||||
@ -3642,7 +3642,7 @@
|
||||
%+ roll
|
||||
^- (list (pair path lobe))
|
||||
[[~ ?~(us *lobe u.us)] descendants]
|
||||
|=({{path lobe} @uvI} (shax (jam +<)))
|
||||
|=([[path lobe] @uvI] (shax (jam +<)))
|
||||
:: +read-r: %x wrapped in a vase
|
||||
::
|
||||
++ read-r
|
||||
@ -3765,15 +3765,15 @@
|
||||
:: of the data is legit. We also never send the mime cache over the wire.
|
||||
::
|
||||
++ read-v
|
||||
|= {yon=aeon pax=path}
|
||||
^- (unit (unit {%dome (hypo dome:clay)}))
|
||||
|= [yon=aeon pax=path]
|
||||
^- (unit (unit [%dome (hypo dome:clay)]))
|
||||
?: (lth yon let.dom)
|
||||
:* ~ ~ %dome -:!>(*dome:clay)
|
||||
^- dome:clay
|
||||
:* ank=`[[%ank-in-old-v-not-implemented *ankh] ~ ~]
|
||||
let=yon
|
||||
hit=(molt (skim ~(tap by hit.dom) |=({p=@ud *} (lte p yon))))
|
||||
lab=(molt (skim ~(tap by lab.dom) |=({* p=@ud} (lte p yon))))
|
||||
hit=(molt (skim ~(tap by hit.dom) |=([p=@ud *] (lte p yon))))
|
||||
lab=(molt (skim ~(tap by lab.dom) |=([* p=@ud] (lte p yon))))
|
||||
== ==
|
||||
?: (gth yon let.dom)
|
||||
~
|
||||
@ -3814,7 +3814,7 @@
|
||||
:- ~
|
||||
%+ bind
|
||||
fil.ank:(descend-path:(zu ank.dom) pax)
|
||||
|=(a={p=lobe q=cage} [%& q.a])
|
||||
|=(a=[p=lobe q=cage] [%& q.a])
|
||||
=+ yak=(tako-to-yaki u.tak)
|
||||
=+ lob=(~(get by q.yak) pax)
|
||||
?~ lob
|
||||
@ -3843,8 +3843,8 @@
|
||||
:: Gets an arch (directory listing) at a node.
|
||||
::
|
||||
++ read-y
|
||||
|= {yon=aeon pax=path}
|
||||
^- (unit (unit {%arch (hypo arch)}))
|
||||
|= [yon=aeon pax=path]
|
||||
^- (unit (unit [%arch (hypo arch)]))
|
||||
?: =(0 yon)
|
||||
``[%arch -:!>(*arch) *arch]
|
||||
=+ tak=(~(get by hit.dom) yon)
|
||||
@ -3862,17 +3862,17 @@
|
||||
%+ turn
|
||||
^- (list (pair path lobe))
|
||||
%+ skim ~(tap by (~(del by q.yak) pax))
|
||||
|= {paf=path lob=lobe}
|
||||
|= [paf=path lob=lobe]
|
||||
=(pax (scag len paf))
|
||||
|= {paf=path lob=lobe}
|
||||
|= [paf=path lob=lobe]
|
||||
=+ pat=(slag len paf)
|
||||
[?>(?=(^ pat) i.pat) ~]
|
||||
::
|
||||
:: Gets a recursive hash of a node and all its children.
|
||||
::
|
||||
++ read-z
|
||||
|= {yon=aeon pax=path}
|
||||
^- (unit (unit {%uvi (hypo @uvI)}))
|
||||
|= [yon=aeon pax=path]
|
||||
^- (unit (unit [%uvi (hypo @uvI)]))
|
||||
?: =(0 yon)
|
||||
``uvi+[-:!>(*@uvI) *@uvI]
|
||||
=+ tak=(~(get by hit.dom) yon)
|
||||
@ -4006,7 +4006,7 @@
|
||||
::
|
||||
%crow
|
||||
=/ des ~(tap by dos.rom.ruf)
|
||||
=| rus=(map desk {r=regs w=regs})
|
||||
=| rus=(map desk [r=regs w=regs])
|
||||
|^
|
||||
?~ des [[hen %give %croz rus]~ ..^^$]
|
||||
=+ per=(filter-rules per.q.i.des)
|
||||
@ -4020,7 +4020,7 @@
|
||||
^+ pes
|
||||
=- (~(gas in *regs) -)
|
||||
%+ skim ~(tap by pes)
|
||||
|= {p=path r=rule}
|
||||
|= [p=path r=rule]
|
||||
(~(has in who.r) |+nom.req)
|
||||
--
|
||||
::
|
||||
@ -4116,7 +4116,7 @@
|
||||
==
|
||||
%+ turn
|
||||
(skim ~(tap by mon.ruf) (corl (cury test pot) tail))
|
||||
|= {pon=term bem=beam}
|
||||
|= [pon=term bem=beam]
|
||||
[u.hez.ruf %give %ogre pon]
|
||||
::
|
||||
%park
|
||||
@ -4468,7 +4468,7 @@
|
||||
==
|
||||
+$ rind-3
|
||||
$: nix=@ud
|
||||
bom=(map @ud {p=duct q=rave})
|
||||
bom=(map @ud [p=duct q=rave])
|
||||
fod=(map duct @ud)
|
||||
haw=(map mood (unit cage))
|
||||
==
|
||||
@ -4523,7 +4523,7 @@
|
||||
== ::
|
||||
+$ rind-2
|
||||
$: nix=@ud :: request index
|
||||
bom=(map @ud {p=duct q=rave}) :: outstanding
|
||||
bom=(map @ud [p=duct q=rave]) :: outstanding
|
||||
fod=(map duct @ud) :: current requests
|
||||
haw=(map mood (unit cage)) :: simple cache
|
||||
pud=update-qeu-2 :: active updates
|
||||
|
@ -4,10 +4,10 @@
|
||||
|= pit=vase
|
||||
=, dill
|
||||
=> |% :: interface tiles
|
||||
++ gill (pair ship term) :: general contact
|
||||
+$ gill (pair ship term) :: general contact
|
||||
-- ::
|
||||
=> |% :: console protocol
|
||||
++ axle ::
|
||||
+$ axle ::
|
||||
$: %4 ::TODO replace ducts with session ids ::
|
||||
hey=(unit duct) :: default duct
|
||||
dug=(map duct axon) :: conversations
|
||||
@ -17,7 +17,7 @@
|
||||
$~ (~(put by *(map @tas log-level)) %hole %soft) :: quiet packet crashes
|
||||
(map @tas log-level) ::
|
||||
== ::
|
||||
++ axon :: dill per duct
|
||||
+$ axon :: dill per duct
|
||||
$: ram=term :: console program
|
||||
tem=(unit (list dill-belt)) :: pending, reverse
|
||||
wid=_80 :: terminal width
|
||||
@ -27,11 +27,11 @@
|
||||
+$ log-level ?(%hush %soft %loud) :: none, line, full
|
||||
-- => ::
|
||||
|% :: protocol outward
|
||||
++ mess ::
|
||||
$% {%dill-belt p=(hypo dill-belt)} ::
|
||||
+$ mess ::
|
||||
$% [%dill-belt p=(hypo dill-belt)] ::
|
||||
== ::
|
||||
++ move {p=duct q=(wind note gift:able)} :: local move
|
||||
++ note :: out request $->
|
||||
+$ move [p=duct q=(wind note gift:able)] :: local move
|
||||
+$ note :: out request $->
|
||||
$~ [%d %verb ~] ::
|
||||
$% $: %c ::
|
||||
$> $? %merg :: merge desks
|
||||
@ -64,7 +64,7 @@
|
||||
== ::
|
||||
task:able:jael ::
|
||||
== == ::
|
||||
++ sign :: in result $<-
|
||||
+$ sign :: in result $<-
|
||||
$~ [%j %init *@p] ::
|
||||
$% $: %b ::
|
||||
$% $>(%writ gift:able:clay) :: XX %slip
|
||||
@ -102,7 +102,7 @@
|
||||
=| moz=(list move)
|
||||
|_ [hen=duct axon]
|
||||
++ abet :: resolve
|
||||
^- {(list move) axle}
|
||||
^- [(list move) axle]
|
||||
[(flop moz) all(dug (~(put by dug.all) hen +<+))]
|
||||
::
|
||||
++ call :: receive input
|
||||
@ -127,7 +127,7 @@
|
||||
==
|
||||
::
|
||||
++ crud
|
||||
|= {err=@tas tac=(list tank)}
|
||||
|= [err=@tas tac=(list tank)]
|
||||
:: unknown errors default to %loud
|
||||
::
|
||||
=/ lev=log-level (~(gut by veb.all) err %loud)
|
||||
@ -261,7 +261,7 @@
|
||||
(deal /sync %poke %kiln-ota !>(`syn))
|
||||
::
|
||||
++ take :: receive
|
||||
|= {tea=wire sih=sign}
|
||||
|= [tea=wire sih=sign]
|
||||
^+ +>
|
||||
?- sih
|
||||
[%j %init *]
|
||||
@ -269,14 +269,14 @@
|
||||
::
|
||||
+>(moz :_(moz [hen %give +.sih]))
|
||||
::
|
||||
{%g %onto *}
|
||||
[%g %onto *]
|
||||
:: ~& [%take-gall-onto +>.sih]
|
||||
?- -.+>.sih
|
||||
%| (crud %onto p.p.+>.sih)
|
||||
%& (done %blit [%lin (tuba "{<p.p.sih>}")]~)
|
||||
==
|
||||
::
|
||||
{%g %unto *}
|
||||
[%g %unto *]
|
||||
:: ~& [%take-gall-unto +>.sih]
|
||||
?- -.+>.sih
|
||||
%poke-ack ?~(p.p.+>.sih +>.$ (crud %coup u.p.p.+>.sih))
|
||||
@ -287,18 +287,18 @@
|
||||
%fact (from ;;(dill-blit q:`vase`+>+>.sih))
|
||||
==
|
||||
::
|
||||
{%c %note *}
|
||||
[%c %note *]
|
||||
(from %out (tuba p.sih ' ' ~(ram re q.sih)))
|
||||
::
|
||||
{?(%b %c) %writ *}
|
||||
[?(%b %c) %writ *]
|
||||
init
|
||||
::
|
||||
{?(%b %c) %mere *}
|
||||
[?(%b %c) %mere *]
|
||||
?: ?=(%& -.p.sih)
|
||||
mere
|
||||
(mean >%dill-mere-fail< >p.p.p.sih< q.p.p.sih)
|
||||
::
|
||||
{%d %blit *}
|
||||
[%d %blit *]
|
||||
(done +.sih)
|
||||
==
|
||||
--
|
||||
@ -528,7 +528,7 @@
|
||||
++ stay all
|
||||
::
|
||||
++ take :: process move
|
||||
|= {tea=wire hen=duct dud=(unit goof) hin=(hypo sign)}
|
||||
|= [tea=wire hen=duct dud=(unit goof) hin=(hypo sign)]
|
||||
^+ [*(list move) ..^$]
|
||||
?^ dud
|
||||
~|(%dill-take-dud (mean tang.u.dud))
|
||||
|
@ -419,7 +419,7 @@
|
||||
:: +render-tang-to-marl: renders a tang and adds <br/> tags between each line
|
||||
::
|
||||
++ render-tang-to-marl
|
||||
|= {wid=@u tan=tang}
|
||||
|= [wid=@u tan=tang]
|
||||
^- marl
|
||||
=/ raw=(list tape) (zing (turn tan |=(a=tank (wash 0^wid a))))
|
||||
::
|
||||
@ -429,7 +429,7 @@
|
||||
:: +render-tang-to-wall: renders tang as text lines
|
||||
::
|
||||
++ render-tang-to-wall
|
||||
|= {wid=@u tan=tang}
|
||||
|= [wid=@u tan=tang]
|
||||
^- wall
|
||||
(zing (turn tan |=(a=tank (wash 0^wid a))))
|
||||
:: +wall-to-octs: text to binary output
|
||||
|
@ -272,7 +272,7 @@
|
||||
:: =seed
|
||||
:: spon=ship
|
||||
:: czar=(map ship [=rift =life =pass])
|
||||
:: turf=(list turf)}
|
||||
:: turf=(list turf)
|
||||
:: bloq=@ud
|
||||
:: node=purl
|
||||
:: ==
|
||||
@ -433,7 +433,7 @@
|
||||
(sources:~(feel su hen our now pki etn) [whos source]:tac)
|
||||
::
|
||||
:: cancel all trackers from duct
|
||||
:: {%nuke whos=(set ship)}
|
||||
:: [%nuke whos=(set ship)]
|
||||
::
|
||||
%nuke
|
||||
=/ ships=(list ship)
|
||||
@ -522,13 +522,13 @@
|
||||
+>.$
|
||||
::
|
||||
:: watch private keys
|
||||
:: {%private-keys ~}
|
||||
:: [%private-keys ~]
|
||||
::
|
||||
%private-keys
|
||||
(curd abet:~(private-keys ~(feed su hen our now pki etn) hen))
|
||||
::
|
||||
:: authenticated remote request
|
||||
:: {%west p=ship q=path r=*}
|
||||
:: [%west p=ship q=path r=*]
|
||||
::
|
||||
%plea
|
||||
=* her ship.tac
|
||||
@ -656,7 +656,7 @@
|
||||
+>.$(moz [move moz])
|
||||
::
|
||||
++ exec :: mass gift
|
||||
|= {yen=(set duct) cad=card}
|
||||
|= [yen=(set duct) cad=card]
|
||||
=/ noy ~(tap in yen)
|
||||
|- ^+ this-su
|
||||
?~ noy this-su
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user