Merge remote-tracking branch 'origin/na-release/candidate' into m/flagday-keyfile

This commit is contained in:
Philip Monk 2020-12-01 14:02:37 -08:00
commit e69804a5ae
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
207 changed files with 11573 additions and 8865 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:35d8930b9b35364605196d99766ec713154af9105ce7b9fabfaa50e8ca29a5fd oid sha256:c55d8f37ad4014bf92f04d0a4a74235f5514de84dad4dca58c40ae2900d06be2
size 4448128 size 4788607

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:e5c82dea80aa7c5593f43fa4294db7974211abceedd907663da73889857642e7 oid sha256:85a4e1625d528b5fdc88faeff4fd288a23d6fbf1c11a846fc8f8d5b3cd38370f
size 1309381 size 2118873

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:4365f9440cbd9253e5ffc37d10bf27d1ef9ce00853034611eb6b9813a12c486b oid sha256:d7225be3d29183c74892d556fde2e06a416584e386ece002e81386437ab65770
size 6430657 size 6897081

View File

@ -26,24 +26,27 @@ done
# Update :lens, :dojo and dependencies # Update :lens, :dojo and dependencies
# FIXME: reduce this list # FIXME: reduce this list
cp $ARVO/app/lens.hoon ./pier/home/app/ cp $ARVO/app/lens.hoon ./pier/home/app/
cp $ARVO/app/dojo.hoon ./pier/home/app/ cp $ARVO/app/dojo.hoon ./pier/home/app/
cp $ARVO/lib/base64.hoon ./pier/home/lib/ cp $ARVO/lib/base64.hoon ./pier/home/lib/
cp $ARVO/lib/server.hoon ./pier/home/lib/ cp $ARVO/lib/plume.hoon ./pier/home/lib/
cp $ARVO/lib/sole.hoon ./pier/home/lib/ cp $ARVO/lib/server.hoon ./pier/home/lib/
cp $ARVO/lib/xray.hoon ./pier/home/lib/ cp $ARVO/lib/sole.hoon ./pier/home/lib/
cp $ARVO/lib/xray.hoon ./pier/home/lib/
cp $ARVO/lib/pprint.hoon ./pier/home/lib/ cp $ARVO/lib/pprint.hoon ./pier/home/lib/
mkdir -p ./pier/home/mar/lens/ mkdir -p ./pier/home/mar/lens/
cp $ARVO/mar/lens/* ./pier/home/mar/lens/ cp $ARVO/mar/lens/* ./pier/home/mar/lens/
cp $ARVO/sur/lens.hoon ./pier/home/sur/ cp $ARVO/sur/lens.hoon ./pier/home/sur/
cp $ARVO/sur/sole.hoon ./pier/home/sur/ cp $ARVO/sur/plum.hoon ./pier/home/sur/
cp $ARVO/sur/sole.hoon ./pier/home/sur/
cp $ARVO/sur/xray.hoon ./pier/home/sur/
# Update +solid and its dependencies # Update +solid and its dependencies
cp $ARVO/lib/pill.hoon ./pier/home/lib/ cp $ARVO/lib/pill.hoon ./pier/home/lib/
cp $ARVO/gen/solid.hoon ./pier/home/gen/ cp $ARVO/gen/solid.hoon ./pier/home/gen/
chmod -R u+rw ./pier/home/ chmod -R u+rw ./pier/home/

View File

@ -1269,7 +1269,7 @@
?:(p.timez add sub) ?:(p.timez add sub)
=+ dat=(yore when) =+ dat=(yore when)
=/ t =/ t
|= a/@ |= a=@
%+ weld %+ weld
?:((lth a 10) "0" ~) ?:((lth a 10) "0" ~)
(scow %ud a) (scow %ud a)

View File

@ -10,17 +10,17 @@
:::: :: :::: :::: :: ::::
:: :: :: :: :: ::
=> |% :: external structures => |% :: external structures
++ id @tasession :: session id +$ id @tasession :: session id
++ house :: all state +$ house :: all state
$: $6 $: %6
egg/@u :: command count egg=@u :: command count
hoc/(map id session) :: conversations hoc=(map id session) :: conversations
acl/(set ship) :: remote access whitelist acl=(set ship) :: remote access whitelist
== :: == ::
++ session :: per conversation +$ session :: per conversation
$: say/sole-share :: command-line state $: say=sole-share :: command-line state
dir/beam :: active path dir=beam :: active path
poy/(unit dojo-project) :: working poy=(unit dojo-project) :: working
$: :: sur: structure imports $: :: sur: structure imports
:: ::
sur=(list cable:clay) sur=(list cable:clay)
@ -28,75 +28,75 @@
:: ::
lib=(list cable:clay) lib=(list cable:clay)
== ==
var/(map term cage) :: variable state var=(map term cage) :: variable state
old/(set term) :: used TLVs old=(set term) :: used TLVs
buf/tape :: multiline buffer buf=tape :: multiline buffer
== :: == ::
++ monkey :: per conversation +$ monkey :: per conversation
$: say/sole-share :: command-line state $: say=sole-share :: command-line state
dir/beam :: active path dir=beam :: active path
poy/(unit dojo-project) :: working poy=(unit dojo-project) :: working
var/(map term cage) :: variable state var=(map term cage) :: variable state
old/(set term) :: used TLVs old=(set term) :: used TLVs
buf/tape :: multiline buffer buf=tape :: multiline buffer
== :: == ::
++ dojo-command :: +$ dojo-command ::
$^ (pair dojo-sink dojo-source) :: route value $^ (pair dojo-sink dojo-source) :: route value
{$brev p/term} :: unbind variable [%brev p=term] :: unbind variable
:: ::
++ dojo-sink :: +$ dojo-sink ::
$% {$flat p/path} :: atom to unix $% [%flat p=path] :: atom to unix
{$pill p/path} :: noun to unix pill [%pill p=path] :: noun to unix pill
:: {$tree p/path} :: noun to unix tree :: [%tree p=path] :: noun to unix tree
{$file p/beam} :: save to clay [%file p=beam] :: save to clay
$: $http :: http outbound $: %http :: http outbound
p/?($post $put) p=?(%post %put)
r/@t r=@t
== ==
{$poke p/goal} :: poke app [%poke p=goal] :: poke app
{$show p/?($0 $1 $2 $3 $4 $5)} :: val/type/hoon/xray [%show p=?(%0 %1 %2 %3 %4 %5)] :: val/type/hoon/xray
{$verb p/term} :: store variable [%verb p=term] :: store variable
== :: == ::
++ dojo-source :: construction node +$ dojo-source :: construction node
$: p/@ud :: assembly index $: p=@ud :: assembly index
q/dojo-build :: general build q=dojo-build :: general build
== :: == ::
++ dojo-build :: one arvo step +$ dojo-build :: one arvo step
$~ [%ex *hoon] $~ [%ex *hoon]
$% {$ur p/@t} :: http GET request $% [%ur p=@t] :: http GET request
{$ge p/dojo-model} :: generator [%ge p=dojo-model] :: generator
{$te p/term q/(list dojo-source)} :: thread [%te p=term q=(list dojo-source)] :: thread
{$dv p/path} :: core from source [%dv p=path] :: core from source
{$ex p/hoon} :: hoon expression [%ex p=hoon] :: hoon expression
{$sa p/mark} :: example mark value [%sa p=mark] :: example mark value
{$as p/mark q/dojo-source} :: simple transmute [%as p=mark q=dojo-source] :: simple transmute
{$do p/hoon q/dojo-source} :: gate apply [%do p=hoon q=dojo-source] :: gate apply
{$tu p/(list dojo-source)} :: tuple [%tu p=(list dojo-source)] :: tuple
== :: == ::
++ dojo-model :: data construction +$ dojo-model :: data construction
$: p/dojo-server :: core source $: p=dojo-server :: core source
q/dojo-config :: configuration q=dojo-config :: configuration
== :: == ::
++ dojo-server :: numbered device +$ dojo-server :: numbered device
$: p/@ud :: assembly index $: p=@ud :: assembly index
q/path :: gate path q=path :: gate path
== :: == ::
++ dojo-config :: configuration +$ dojo-config :: configuration
$: p/(list dojo-source) :: by order $: p=(list dojo-source) :: by order
q/(map term (unit dojo-source)) :: by keyword q=(map term (unit dojo-source)) :: by keyword
== :: == ::
++ dojo-project :: construction state +$ dojo-project :: construction state
$: mad/dojo-command :: operation $: mad=dojo-command :: operation
num/@ud :: number of tasks num=@ud :: number of tasks
cud/(unit dojo-source) :: now solving cud=(unit dojo-source) :: now solving
pux/(unit path) :: working pux=(unit path) :: working
pro/(unit vase) :: prompting loop pro=(unit vase) :: prompting loop
per/(unit sole-edit) :: pending reverse per=(unit sole-edit) :: pending reverse
job/(map @ud dojo-build) :: problems job=(map @ud dojo-build) :: problems
rez/(map @ud cage) :: results rez=(map @ud cage) :: results
== :: == ::
++ bead {p/(set beam) q/cage} :: computed result +$ bead [p=(set beam) q=cage] :: computed result
++ goal {p/ship q/term} :: flat application +$ goal [p=ship q=term] :: flat application
-- --
=> =>
|% |%
@ -130,7 +130,7 @@
++ parse-variable ++ parse-variable
|* [sym=rule src=rule] |* [sym=rule src=rule]
%+ cook %+ cook
|= {a/term b/(unit dojo-source)} |= [a=term b=(unit dojo-source)]
^- dojo-command ^- dojo-command
?~(b [%brev a] [[%verb a] u.b]) ?~(b [%brev a] [[%verb a] u.b])
;~(plug sym (punt src)) ;~(plug sym (punt src))
@ -146,7 +146,7 @@
:: ::
;~ pfix col ;~ pfix col
%+ cook %+ cook
|= {a/goal b/$^(dojo-model dojo-source)} |= [a=goal b=$^(dojo-model dojo-source)]
?@ -.b [[%poke a] b] ?@ -.b [[%poke a] b]
(to-command a b) (to-command a b)
;~ plug ;~ plug
@ -183,7 +183,7 @@
;~(plug (cold %pill dot) (most fas sym)) ;~(plug (cold %pill dot) (most fas sym))
;~(plug (cold %http lus) (stag %post parse-url)) ;~(plug (cold %http lus) (stag %post parse-url))
;~(plug (cold %http hep) (stag %put parse-url)) ;~(plug (cold %http hep) (stag %put parse-url))
(stag %show (cook $?($1 $2 $3 $4 $5) (cook lent (stun [1 5] wut)))) (stag %show (cook $?(%1 %2 %3 %4 %5) (cook lent (stun [1 5] wut))))
== ==
:: ::
++ parse-cables ++ parse-cables
@ -224,7 +224,7 @@
== ==
:: ::
++ parse-goal ++ parse-goal
%+ cook |=(a/goal a) %+ cook |=(a=goal a)
;~ pose ;~ pose
;~ plug ;~ plug
;~(pfix sig fed:ag) ;~(pfix sig fed:ag)
@ -248,7 +248,7 @@
:: ::
=? a &(?=(^ a) =('' i.a)) =? a &(?=(^ a) =('' i.a))
t.a t.a
(fall (de-beam:format a) [`beak`[p q r]:dir (flop a)]) (fall (de-beam:format a) [`beak`[p q r]:dir a])
=+ vez=hoon-parser =+ vez=hoon-parser
(sear plex:vez (stag %clsg poor:vez)) (sear plex:vez (stag %clsg poor:vez))
:: ::
@ -316,7 +316,7 @@
++ xsell `$-(vase tank)`vase-to-tank:pprint ++ xsell `$-(vase tank)`vase-to-tank:pprint
:: ::
++ he :: per session ++ 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 ++ he-beam
^- beam ^- beam
@ -363,31 +363,31 @@
[%pass u.pux %arvo %c %warp ship desk ~] [%pass u.pux %arvo %c %warp ship desk ~]
:: ::
++ dy-errd :: reject change, abet ++ dy-errd :: reject change, abet
|= {rev/(unit sole-edit) err/@u} |= [rev=(unit sole-edit) err=@u]
^+ +>+> ^+ +>+>
(he-errd(poy `+>+<) rev err) (he-errd(poy `+>+<) rev err)
:: ::
++ dy-diff :: send effects, abet ++ dy-diff :: send effects, abet
|= fec/sole-effect |= fec=sole-effect
^+ +>+> ^+ +>+>
(he-diff(poy `+>+<) fec) (he-diff(poy `+>+<) fec)
:: ::
++ dy-rash :: send effects, amok ++ dy-rash :: send effects, amok
|= fec/sole-effect |= fec=sole-effect
^+ +>+> ^+ +>+>
(he-diff(poy ~) fec) (he-diff(poy ~) fec)
:: ::
++ dy-init-command :: ++dojo-command ++ dy-init-command :: ++dojo-command
|= mad/dojo-command |= mad=dojo-command
^+ [mad +>] ^+ [mad +>]
?@ -.mad [mad +>.$] ?@ -.mad [mad +>.$]
=. q.mad =. q.mad
?+(-.p.mad q.mad $http [0 %as %mime q.mad]) ?+(-.p.mad q.mad %http [0 %as %mime q.mad])
=^ src +>.$ (dy-init-source q.mad) =^ src +>.$ (dy-init-source q.mad)
[mad(q src) +>.$] [mad(q src) +>.$]
:: ::
++ dy-init-source :: ++dojo-source ++ dy-init-source :: ++dojo-source
|= src/dojo-source |= src=dojo-source
^+ [src +>] ^+ [src +>]
=^ bul +> (dy-init-build q.src) =^ bul +> (dy-init-build q.src)
=: p.src num =: p.src num
@ -396,48 +396,48 @@
[src +>.$(num +(num), job (~(put by job) -.src +.src))] [src +>.$(num +(num), job (~(put by job) -.src +.src))]
:: ::
++ dy-init-source-unit :: (unit dojo-source) ++ dy-init-source-unit :: (unit dojo-source)
|= urc/(unit dojo-source) |= urc=(unit dojo-source)
^+ [urc +>] ^+ [urc +>]
?~ urc [~ +>] ?~ urc [~ +>]
=^ src +> (dy-init-source u.urc) =^ src +> (dy-init-source u.urc)
[`src +>.$] [`src +>.$]
:: ::
++ dy-init-build :: ++dojo-build ++ dy-init-build :: ++dojo-build
|= bul/dojo-build |= bul=dojo-build
^+ [bul +>] ^+ [bul +>]
?- -.bul ?- -.bul
$ex [bul +>.$] %ex [bul +>.$]
$dv [bul +>.$] %dv [bul +>.$]
$sa [bul +>.$] %sa [bul +>.$]
$as =^(mor +>.$ (dy-init-source q.bul) [bul(q mor) +>.$]) %as =^(mor +>.$ (dy-init-source q.bul) [bul(q mor) +>.$])
$do =^(mor +>.$ (dy-init-source q.bul) [bul(q mor) +>.$]) %do =^(mor +>.$ (dy-init-source q.bul) [bul(q mor) +>.$])
$ge =^(mod +>.$ (dy-init-model p.bul) [[%ge mod] +>.$]) %ge =^(mod +>.$ (dy-init-model p.bul) [[%ge mod] +>.$])
$te =^(mod +>.$ (dy-init-ordered q.bul) [bul(q mod) +>.$]) %te =^(mod +>.$ (dy-init-ordered q.bul) [bul(q mod) +>.$])
$ur [bul +>.$] %ur [bul +>.$]
$tu =^(dof +>.$ (dy-init-ordered p.bul) [[%tu dof] +>.$]) %tu =^(dof +>.$ (dy-init-ordered p.bul) [[%tu dof] +>.$])
== ==
:: ::
++ dy-init-model :: ++dojo-model ++ dy-init-model :: ++dojo-model
|= mol/dojo-model |= mol=dojo-model
^+ [mol +>] ^+ [mol +>]
=^ one +>.$ (dy-init-server p.mol) =^ one +>.$ (dy-init-server p.mol)
=^ two +>.$ (dy-init-config q.mol) =^ two +>.$ (dy-init-config q.mol)
[[one two] +>.$] [[one two] +>.$]
:: ::
++ dy-init-server :: ++dojo-server ++ dy-init-server :: ++dojo-server
|= srv/dojo-server |= srv=dojo-server
=. p.srv num =. p.srv num
[srv +>.$(num +(num), job (~(put by job) num [%dv [%gen q.srv]]))] [srv +>.$(num +(num), job (~(put by job) num [%dv [%gen q.srv]]))]
:: ::
++ dy-init-config :: prepare config ++ dy-init-config :: prepare config
|= cig/dojo-config |= cig=dojo-config
^+ [cig +>] ^+ [cig +>]
=^ ord +>.$ (dy-init-ordered p.cig) =^ ord +>.$ (dy-init-ordered p.cig)
=^ key +>.$ (dy-init-named q.cig) =^ key +>.$ (dy-init-named q.cig)
[[ord key] +>.$] [[ord key] +>.$]
:: ::
++ dy-init-ordered :: (list dojo-source) ++ dy-init-ordered :: (list dojo-source)
|= ord/(list dojo-source) |= ord=(list dojo-source)
^+ [ord +>] ^+ [ord +>]
?~ ord [~ +>.$] ?~ ord [~ +>.$]
=^ fir +>.$ (dy-init-source i.ord) =^ fir +>.$ (dy-init-source i.ord)
@ -445,7 +445,7 @@
[[fir mor] +>.$] [[fir mor] +>.$]
:: ::
++ dy-init-named :: (map @tas dojo-src) ++ dy-init-named :: (map @tas dojo-src)
|= key/(map term (unit dojo-source)) |= key=(map term (unit dojo-source))
^+ [key +>.$] ^+ [key +>.$]
?~ key [~ +>.$] ?~ key [~ +>.$]
=^ top +>.$ (dy-init-source-unit q.n.key) =^ top +>.$ (dy-init-source-unit q.n.key)
@ -458,31 +458,31 @@
=^(dam . (dy-init-command mad) +(mad dam)) =^(dam . (dy-init-command mad) +(mad dam))
:: ::
++ dy-hand :: complete step ++ dy-hand :: complete step
|= cag/cage |= cag=cage
^+ +>+> ^+ +>+>
?> ?=(^ cud) ?> ?=(^ cud)
(dy-step(cud ~, rez (~(put by rez) p.u.cud cag)) +(p.u.cud)) (dy-step(cud ~, rez (~(put by rez) p.u.cud cag)) +(p.u.cud))
:: ::
++ dy-meal :: vase to cage ++ dy-meal :: vase to cage
|= vax/vase |= vax=vase
?. &(?=(@ -.q.vax) ((sane %tas) -.q.vax)) ?. &(?=(@ -.q.vax) ((sane %tas) -.q.vax))
~& %dy-meal-cage ~& %dy-meal-cage
(dy-rash %bel ~) (dy-rash %bel ~)
(dy-hand -.q.vax (slot 3 vax)) (dy-hand -.q.vax (slot 3 vax))
:: ::
++ dy-made-edit :: sole edit ++ dy-made-edit :: sole edit
|= cag/cage |= cag=cage
^+ +>+> ^+ +>+>
?> ?=(^ per) ?> ?=(^ per)
?: ?| ?=(^ q.q.cag) ?: ?| ?=(^ q.q.cag)
=((lent buf.say) q.q.cag) =((lent buf.say) q.q.cag)
!&(?=($del -.u.per) =(+(p.u.per) (lent buf.say))) !&(?=(%del -.u.per) =(+(p.u.per) (lent buf.say)))
== ==
dy-abet(per ~) dy-abet(per ~)
(dy-errd(per ~) per q.q.cag) (dy-errd(per ~) per q.q.cag)
:: ::
++ dy-done :: dialog submit ++ dy-done :: dialog submit
|= txt/tape |= txt=tape
?: |(?=(^ per) ?=(^ pux) ?=(~ pro)) ?: |(?=(^ per) ?=(^ pux) ?=(~ pro))
~& %dy-no-prompt ~& %dy-no-prompt
(dy-diff %bel ~) (dy-diff %bel ~)
@ -493,8 +493,8 @@
(dy-made-dial %noun p.res) (dy-made-dial %noun p.res)
:: ::
++ dy-cast ++ dy-cast
|* {typ/_* bun/vase} |* [typ=_* bun=vase]
|= a/vase ^- typ |= a=vase ^- typ
~| [p.bun p.a] ~| [p.bun p.a]
?> (~(nest ut p.bun) & p.a) ?> (~(nest ut p.bun) & p.a)
;;(typ q.a) ;;(typ q.a)
@ -503,51 +503,51 @@
^+ +> ^+ +>
:: XX needs filter :: XX needs filter
:: ::
?: ?=({$show $3} -.mad) ?: ?=([%show %3] -.mad)
(dy-rash %tan (dy-show-source q.mad) ~) (dy-rash %tan (dy-show-source q.mad) ~)
?: ?=($brev -.mad) ?: ?=(%brev -.mad)
=. var (~(del by var) p.mad) =. var (~(del by var) p.mad)
=< dy-amok =< dy-amok
?+ p.mad . ?+ p.mad .
$?($eny $now $our) !! $?(%eny %now %our) !!
$lib .(lib ~) %lib .(lib ~)
$sur .(sur ~) %sur .(sur ~)
$dir .(dir [[our.hid %home ud+0] /]) %dir .(dir [[our.hid %home ud+0] /])
== ==
=+ cay=(~(got by rez) p.q.mad) =+ cay=(~(got by rez) p.q.mad)
?- -.p.mad ?- -.p.mad
$verb %verb
=. var (~(put by var) p.p.mad cay) =. var (~(put by var) p.p.mad cay)
~| bad-set+[p.p.mad p.q.cay] ~| bad-set+[p.p.mad p.q.cay]
=< dy-amok =< dy-amok
?+ p.p.mad . ?+ p.p.mad .
$eny ~|(%entropy-is-eternal !!) %eny ~|(%entropy-is-eternal !!)
$now ~|(%time-is-immutable !!) %now ~|(%time-is-immutable !!)
$our ~|(%self-is-immutable !!) %our ~|(%self-is-immutable !!)
$lib %lib
%_ . %_ .
lib lib
((dy-cast (list cable:clay) !>(*(list cable:clay))) q.cay) ((dy-cast (list cable:clay) !>(*(list cable:clay))) q.cay)
== ==
:: ::
$sur %sur
%_ . %_ .
sur sur
((dy-cast (list cable:clay) !>(*(list cable:clay))) q.cay) ((dy-cast (list cable:clay) !>(*(list cable:clay))) q.cay)
== ==
:: ::
$dir =+ ^= pax ^- path %dir =+ ^= pax ^- path
=+ pax=((dy-cast path !>(*path)) q.cay) =+ pax=((dy-cast path !>(*path)) q.cay)
?: ?=(~ pax) ~[(scot %p our.hid) %home '0'] ?: ?=(~ pax) ~[(scot %p our.hid) %home '0']
?: ?=({@ ~} pax) ~[i.pax %home '0'] ?: ?=([@ ~] pax) ~[i.pax %home '0']
?: ?=({@ @ ~} pax) ~[i.pax i.t.pax '0'] ?: ?=([@ @ ~] pax) ~[i.pax i.t.pax '0']
pax pax
=. dir (need (de-beam:format pax)) =. dir (need (de-beam:format pax))
=- +>(..dy (he-diff %tan - ~)) =- +>(..dy (he-diff %tan - ~))
rose+[" " `~]^~[leaf+"=%" (smyt (en-beam:format he-beak s.dir))] rose+[" " `~]^~[leaf+"=%" (smyt (en-beam:format he-beak s.dir))]
== ==
:: ::
$poke %poke
%- he-card(poy ~) %- he-card(poy ~)
:* %pass :* %pass
/poke /poke
@ -557,22 +557,22 @@
cay cay
== ==
:: ::
$file %file
%- he-card(poy ~) %- he-card(poy ~)
:* %pass /file %arvo %c :* %pass /file %arvo %c
%info (foal:space:userlib (en-beam:format p.p.mad) cay) %info (foal:space:userlib (en-beam:format p.p.mad) cay)
== ==
:: ::
$flat %flat
?^ q.q.cay ?^ q.q.cay
(dy-rash %tan [%leaf "not an atom"]~) (dy-rash %tan [%leaf "not an atom"]~)
(dy-rash %sav p.p.mad q.q.cay) (dy-rash %sav p.p.mad q.q.cay)
:: ::
$pill %pill
(dy-rash %sag p.p.mad q.q.cay) (dy-rash %sag p.p.mad q.q.cay)
:: ::
$http %http
?> ?=($mime p.cay) ?> ?=(%mime p.cay)
=+ mim=;;(mime q.q.cay) =+ mim=;;(mime q.q.cay)
%+ dy-request /show %+ dy-request /show
:* ?:(=(%put p.p.mad) %'PUT' %'POST') :* ?:(=(%put p.p.mad) %'PUT' %'POST')
@ -581,7 +581,7 @@
`q.mim `q.mim
== ==
:: ::
$show %show
|^ (prnt cay note) |^ (prnt cay note)
++ prnt ?: (gte p.p.mad 4) ++ prnt ?: (gte p.p.mad 4)
dy-xprint dy-xprint
@ -591,7 +591,7 @@
%0 ~ %0 ~
%1 [[%rose [~ " " ~] (skol p.q.cay) ~] maar] %1 [[%rose [~ " " ~] (skol p.q.cay) ~] maar]
%2 [[%rose [~ " " ~] (dy-show-type-noun p.q.cay) ~] maar] %2 [[%rose [~ " " ~] (dy-show-type-noun p.q.cay) ~] maar]
::%3 handled above ::%3 handled above
%4 ~ %4 ~
%5 [[%rose [~ " " ~] (xskol p.q.cay) ~] maar] %5 [[%rose [~ " " ~] (xskol p.q.cay) ~] maar]
== ==
@ -600,22 +600,22 @@
-- --
== ==
:: ::
++ dy-show |=(cay/cage (dy-print cay ~)) ++ dy-show |=(cay=cage (dy-print cay ~))
:: ::
:: Print a value (given as a cage) and a note (given as a tang). :: Print a value (given as a cage) and a note (given as a tang).
:: ::
++ dy-xprint ++ dy-xprint
|= {cay/cage tan/tang} |= [cay=cage tan=tang]
%+ dy-rash %tan %+ dy-rash %tan
%- welp :_ tan %- welp :_ tan
?+ p.cay [(xsell q.cay)]~ ?+ p.cay [(xsell q.cay)]~
$tang ;;(tang q.q.cay) %tang ;;(tang q.q.cay)
$httr %httr
=+ hit=;;(httr:eyre q.q.cay) =+ hit=;;(httr:eyre q.q.cay)
=- (flop (turn `wall`- |=(a/tape leaf+(dash:us a '' ~)))) =- (flop (turn `wall`- |=(a=tape leaf+(dash:us a '' ~))))
:- "HTTP {<p.hit>}" :- "HTTP {<p.hit>}"
%+ weld %+ weld
(turn q.hit |=({a/@t b/@t} "{(trip a)}: {(trip b)}")) (turn q.hit |=([a=@t b=@t] "{(trip a)}: {(trip b)}"))
:- i="" :- i=""
t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip) t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip)
== ==
@ -623,39 +623,39 @@
:: Print a value (given as a cage) and a note (given as a tang). :: Print a value (given as a cage) and a note (given as a tang).
:: ::
++ dy-print ++ dy-print
|= {cay/cage tan/tang} |= [cay=cage tan=tang]
%+ dy-rash %tan %+ dy-rash %tan
%- welp :_ tan %- welp :_ tan
?+ p.cay [(sell q.cay)]~ ?+ p.cay [(sell q.cay)]~
$tang ;;(tang q.q.cay) %tang ;;(tang q.q.cay)
$httr %httr
=+ hit=;;(httr:eyre q.q.cay) =+ hit=;;(httr:eyre q.q.cay)
=- (flop (turn `wall`- |=(a/tape leaf+(dash:us a '' ~)))) =- (flop (turn `wall`- |=(a=tape leaf+(dash:us a '' ~))))
:- "HTTP {<p.hit>}" :- "HTTP {<p.hit>}"
%+ weld %+ weld
(turn q.hit |=({a/@t b/@t} "{(trip a)}: {(trip b)}")) (turn q.hit |=([a=@t b=@t] "{(trip a)}: {(trip b)}"))
:- i="" :- i=""
t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip) t=(turn `wain`?~(r.hit ~ (to-wain:format q.u.r.hit)) trip)
== ==
++ dy-show-type-noun ++ dy-show-type-noun
|= a/type ^- tank |= a=type ^- tank
=- >[-]< =- >[-]<
|- ^- $? $% {$atom @tas (unit @)} |- ^- $? $% [%atom @tas (unit @)]
{$cell _$ _$} [%cell _$ _$]
{$face $@(term tune) _$} [%face $@(term tune) _$]
{$fork (set _$)} [%fork (set _$)]
{$hold _$ hoon} [%hold _$ hoon]
== ==
wain :: "<|core|>" wain :: "<|core|>"
$?($noun $void) $?(%noun %void)
== ==
?+ a a ?+ a a
{$face ^} a(q $(a q.a)) [%face ^] a(q $(a q.a))
{$cell ^} a(p $(a p.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))))) [%fork *] a(p (silt (turn ~(tap in p.a) |=(b=type ^$(a b)))))
{$hint *} !! [%hint *] !!
{$core ^} `wain`/core [%core ^] `wain`/core
{$hold *} a(p $(a p.a)) [%hold *] a(p $(a p.a))
== ==
:: ::
:: XX needs filter :: XX needs filter
@ -668,42 +668,42 @@
::$? hoon ::$? hoon
;: jank-bucwut ;: jank-bucwut
hoon hoon
$^ {dy-shown dy-shown} $^ [dy-shown dy-shown]
$% {$ur cord} $% [%ur cord]
{$sa mark} [%sa mark]
{$as mark dy-shown} [%as mark dy-shown]
{$do hoon dy-shown} [%do hoon dy-shown]
{$te term (list dy-shown)} [%te term (list dy-shown)]
{$ge path (list dy-shown) (map term (unit dy-shown))} [%ge path (list dy-shown) (map term (unit dy-shown))]
{$dv path} [%dv path]
== ==
== ==
:: ::
++ dy-show-source ++ dy-show-source
|= a/dojo-source ^- tank |= a=dojo-source ^- tank
=- >[-]< =- >[-]<
=+ `{@ bil/dojo-build}`a =+ `[@ bil=dojo-build]`a
|- ^- dy-shown |- ^- dy-shown
?- -.bil ?- -.bil
$?($ur $dv $sa) bil $?(%ur %dv %sa) bil
$ex ?. ?=({$cltr *} p.bil) p.bil %ex ?. ?=([%cltr *] p.bil) p.bil
|- ^- hoon |- ^- hoon
?~ p.p.bil !! ?~ p.p.bil !!
?~ t.p.p.bil i.p.p.bil ?~ t.p.p.bil i.p.p.bil
[i.p.p.bil $(p.p.bil t.p.p.bil)] [i.p.p.bil $(p.p.bil t.p.p.bil)]
$tu ?~ p.bil !! %tu ?~ p.bil !!
|- |-
?~ t.p.bil ^$(bil q.i.p.bil) ?~ t.p.bil ^$(bil q.i.p.bil)
[^$(bil q.i.p.bil) $(p.bil t.p.bil)] [^$(bil q.i.p.bil) $(p.bil t.p.bil)]
$as bil(q $(bil q.q.bil)) %as bil(q $(bil q.q.bil))
$do bil(q $(bil q.q.bil)) %do bil(q $(bil q.q.bil))
$te bil(q (turn q.bil ..$)) %te bil(q (turn q.bil ..$))
$ge :+ %ge q.p.p.bil %ge :+ %ge q.p.p.bil
[(turn p.q.p.bil ..$) (~(run by q.q.p.bil) (lift ..$))] [(turn p.q.p.bil ..$) (~(run by q.q.p.bil) (lift ..$))]
== ==
:: ::
++ dy-edit :: handle edit ++ dy-edit :: handle edit
|= cal/sole-change |= cal=sole-change
^+ +>+> ^+ +>+>
=^ dat say (~(transceive sole say) cal) =^ dat say (~(transceive sole say) cal)
?: |(?=(^ per) ?=(^ pux) ?=(~ pro)) ?: |(?=(^ per) ?=(^ pux) ?=(~ pro))
@ -718,18 +718,18 @@
(dy-made-edit %noun p.res) (dy-made-edit %noun p.res)
:: ::
++ dy-type :: sole action ++ dy-type :: sole action
|= act/sole-action |= act=sole-action
?- -.dat.act ?- -.dat.act
$det (dy-edit +.dat.act) %det (dy-edit +.dat.act)
$ret (dy-done (tufa buf.say)) %ret (dy-done (tufa buf.say))
$clr dy-stop %clr dy-stop
$tab +>+> %tab +>+>
== ==
:: ::
++ dy-cage |=(num/@ud (~(got by rez) num)) :: known cage ++ dy-cage |=(num=@ud (~(got by rez) num)) :: known cage
++ dy-vase |=(num/@ud q:(dy-cage num)) :: known vase ++ dy-vase |=(num=@ud q:(dy-cage num)) :: known vase
++ dy-sore ++ dy-sore
|= src/(list dojo-source) |= src=(list dojo-source)
^- vase ^- vase
?~ src ?~ src
!>(~) !>(~)
@ -742,7 +742,7 @@
?. (~(nest ut [%cell [%atom %$ ~] %noun]) | p.q.cay) ?. (~(nest ut [%cell [%atom %$ ~] %noun]) | p.q.cay)
:: naked generator; takes one argument :: naked generator; takes one argument
:: ::
?. &(?=({* ~} p.cig) ?=(~ q.cig)) ?. &(?=([* ~] p.cig) ?=(~ q.cig))
~|(%one-argument !!) ~|(%one-argument !!)
=/ res (mule |.((slam q.cay (dy-vase p.i.p.cig)))) =/ res (mule |.((slam q.cay (dy-vase p.i.p.cig))))
?: ?=(%| -.res) ?: ?=(%| -.res)
@ -810,7 +810,7 @@
(slam gat sam) (slam gat sam)
:: ::
++ dy-made-dial :: dialog product ++ dy-made-dial :: dialog product
|= cag/cage |= cag=cage
^+ +>+> ^+ +>+>
?. ?=(^ q.q.cag) ?. ?=(^ q.q.cag)
(dy-errd ~ q.q.cag) (dy-errd ~ q.q.cag)
@ -832,11 +832,11 @@
== ==
:: ::
++ dy-made-gent :: generator product ++ dy-made-gent :: generator product
|= cag/cage |= cag=cage
(dy-meal q.cag) (dy-meal q.cag)
:: ::
++ dy-made-noun :: generator product ++ dy-made-noun :: generator product
|= cag/cage |= cag=cage
(dy-hand %noun q.cag) (dy-hand %noun q.cag)
:: ::
++ dy-wool-poke ++ dy-wool-poke
@ -869,7 +869,7 @@
:: ::
%as %as
=/ cag=cage (dy-cage p.q.bil) =/ cag=cage (dy-cage p.q.bil)
=+ .^(=tube:clay cc+(en-beam:format he-beak /[p.bil]/[p.cag])) =+ .^(=tube:clay cc+(en-beam:format he-beak /[p.cag]/[p.bil]))
(dy-hand p.bil (tube q.cag)) (dy-hand p.bil (tube q.cag))
:: ::
%do %do
@ -896,14 +896,14 @@
:: ::
++ dy-hoon-var ++ dy-hoon-var
=+ ^= ope =+ ^= ope
|= gen/hoon ^- hoon |= gen=hoon ^- hoon
?: ?=(?($sgld $sgbn) -.gen) ?: ?=(?(%sggl %sggr) -.gen)
$(gen q.gen) $(gen q.gen)
=+ ~(open ap gen) =+ ~(open ap gen)
?.(=(gen -) $(gen -) gen) ?.(=(gen -) $(gen -) gen)
|= gen/hoon ^- (unit cage) |= gen=hoon ^- (unit cage)
=. gen (ope gen) =. gen (ope gen)
?: ?=({$cnts {@ ~} ~} gen) ?: ?=([%cnts [@ ~] ~] gen)
(~(get by var) i.p.gen) (~(get by var) i.p.gen)
~ ~
:: +dy-mere: execute hoon and complete construction step :: +dy-mere: execute hoon and complete construction step
@ -933,7 +933,7 @@
(slap sut hoon) (slap sut hoon)
:: ::
++ dy-step :: advance project ++ dy-step :: advance project
|= nex/@ud |= nex=@ud
^+ +>+> ^+ +>+>
?> ?=(~ cud) ?> ?=(~ cud)
?: =(nex num) ?: =(nex num)
@ -944,19 +944,19 @@
-- --
:: ::
++ he-dope ++ he-dope
|= txt/tape :: |= txt=tape ::
^- (each (unit (each dojo-command tape)) hair) :: prefix+result ^- (each (unit (each dojo-command tape)) hair) :: prefix+result
=+ len=+((lent txt)) :: line length =+ len=+((lent txt)) :: line length
=. txt (weld buf `tape`(weld txt "\0a")) :: =. txt (weld buf `tape`(weld txt "\0a")) ::
=+ vex=((full parse-command-line:he-parser) [1 1] txt) =+ vex=((full parse-command-line:he-parser) [1 1] txt)
?: =(q.p.vex len) :: matched to line end ?: =(q.p.vex len) :: matched to line end
[%& ~] :: [%& ~] ::
?: =(p.p.vex +((lent (skim txt |=(a/@ =(10 a)))))) :: parsed all lines ?: =(p.p.vex +((lent (skim txt |=(a=@ =(10 a)))))) :: parsed all lines
[%& ~ ?~(q.vex [%| txt] [%& p.u.q.vex])] :: new buffer+complete [%& ~ ?~(q.vex [%| txt] [%& p.u.q.vex])] :: new buffer+complete
[%| p.p.vex (dec q.p.vex)] :: syntax error [%| p.p.vex (dec q.p.vex)] :: syntax error
:: ::
++ he-duke :: ++he-dope variant ++ he-duke :: ++he-dope variant
|= txt/tape |= txt=tape
^- (each (unit (each dojo-command tape)) @ud) ^- (each (unit (each dojo-command tape)) @ud)
=+ foy=(he-dope txt) =+ foy=(he-dope txt)
?- -.foy ?- -.foy
@ -975,7 +975,7 @@
%_(+> moz [card moz]) %_(+> moz [card moz])
:: ::
++ he-diff :: emit update ++ he-diff :: emit update
|= fec/sole-effect |= fec=sole-effect
^+ +> ^+ +>
(he-card %give %fact ~[/sole/[id]] %sole-effect !>(fec)) (he-card %give %fact ~[/sole/[id]] %sole-effect !>(fec))
:: ::
@ -984,7 +984,7 @@
?~(poy . ~(dy-stop dy u.poy)) ?~(poy . ~(dy-stop dy u.poy))
:: ::
++ he-peer :: subscribe to ++ he-peer :: subscribe to
|= pax/path |= pax=path
?>(=(~ pax) he-prom) ?>(=(~ pax) he-prom)
:: ::
++ he-pine :: restore prompt ++ he-pine :: restore prompt
@ -993,7 +993,7 @@
he-prom:he-pone he-prom:he-pone
:: ::
++ he-errd :: reject update ++ 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 =+ red=(fall rev [%nop ~]) :: required for error location sync
=^ lic say (~(transmit sole say) red) =^ lic say (~(transmit sole say) red)
(he-diff %mor [%det lic] [%err err] ~) (he-diff %mor [%det lic] [%err err] ~)
@ -1014,7 +1014,7 @@
"/" ?:(=(%home q.dir) "=" (trip q.dir)) "/" ?:(=(%home q.dir) "=" (trip q.dir))
"/" ?:(=([%ud 0] r.dir) "=" (scow r.dir)) "/" ?:(=([%ud 0] r.dir) "=" (scow r.dir))
== ==
?:(=(~ s.dir) "" (spud (flop s.dir))) ?:(=(~ s.dir) "" (spud s.dir))
:: ::
++ he-prom :: send prompt ++ he-prom :: send prompt
%- he-diff %- he-diff
@ -1034,9 +1034,9 @@
== ==
:: ::
++ he-unto :: result from agent ++ he-unto :: result from agent
|= {way/wire cit/sign:agent:gall} |= [way=wire cit=sign:agent:gall]
^+ +> ^+ +>
?. ?=($poke-ack -.cit) ?. ?=(%poke-ack -.cit)
~& [%strange-unto cit] ~& [%strange-unto cit]
+> +>
?~ p.cit ?~ p.cit
@ -1087,16 +1087,16 @@
%. [%httr !>((to-httr:iris response-header.response full-file.response))] %. [%httr !>((to-httr:iris response-header.response full-file.response))]
=+ dye=~(. dy u.poy(pux ~)) =+ dye=~(. dy u.poy(pux ~))
?+ way !! ?+ way !!
{$hand ~} dy-hand:dye [%hand ~] dy-hand:dye
{$show ~} dy-show:dye [%show ~] dy-show:dye
== ==
:: ::
++ he-lens ++ he-lens
|= com/command:lens |= com=command:lens
^+ +> ^+ +>
=/ source=dojo-source =/ source=dojo-source
=| num/@ =| num=@
=- ?. ?=($send-api -.sink.com) :: XX num is incorrect =- ?. ?=(%send-api -.sink.com) :: XX num is incorrect
sor sor
:- 0 :- 0
:+ %as `mark`(cat 3 api.sink.com '-poke') :+ %as `mark`(cat 3 api.sink.com '-poke')
@ -1112,12 +1112,12 @@
|- ^- dojo-source |- ^- dojo-source
:- num :- num
?- -.source.com ?- -.source.com
$data [%ex %sand %t data.source.com] %data [%ex %sand %t data.source.com]
$dojo %dojo
%+ rash command.source.com %+ rash command.source.com
(ifix [(punt gap) (punt gap)] parse-build:he-parser) (ifix [(punt gap) (punt gap)] parse-build:he-parser)
:: ::
$clay %clay
:- %ex :- %ex
^- hoon ^- hoon
:+ %dtkt :+ %dtkt
@ -1127,9 +1127,9 @@
%+ rash pax.source.com %+ rash pax.source.com
rood:(vang | /(scot %p our.hid)/home/(scot %da now.hid)) rood:(vang | /(scot %p our.hid)/home/(scot %da now.hid))
:: ::
$url [%ur (crip (en-purl:html url.source.com))] %url [%ur (crip (en-purl:html url.source.com))]
$api !! %api !!
$get-api %get-api
:- %ex :- %ex
^- hoon ^- hoon
:+ %dtkt :+ %dtkt
@ -1139,27 +1139,27 @@
[%sand %ta (scot %p our.hid)] [%sand %ta (scot %p our.hid)]
[%sand %tas api.source.com] [%sand %tas api.source.com]
[%sand %ta (scot %da now.hid)] [%sand %ta (scot %da now.hid)]
(turn endpoint.source.com |=(a/@t [%sand %ta a])) (turn endpoint.source.com |=(a=@t [%sand %ta a]))
== ==
:: ::
$listen-api !! %listen-api !!
$export !! %export !!
$import !! %import !!
$export-all !! %export-all !!
$import-all !! %import-all !!
$as %as
:* %as mar.source.com :* %as mar.source.com
$(num +(num), source.com next.source.com) $(num +(num), source.com next.source.com)
== ==
:: ::
$hoon %hoon
:* %do :* %do
%+ rash code.source.com %+ rash code.source.com
tall:(vang | /(scot %p our.hid)/home/(scot %da now.hid)) tall:(vang | /(scot %p our.hid)/home/(scot %da now.hid))
$(num +(num), source.com next.source.com) $(num +(num), source.com next.source.com)
== ==
:: ::
$tuple %tuple
:- %tu :- %tu
|- ^- (list dojo-source) |- ^- (list dojo-source)
?~ next.source.com ?~ next.source.com
@ -1168,31 +1168,31 @@
:- ^$(source.com i.next.source.com) :- ^$(source.com i.next.source.com)
$(next.source.com t.next.source.com) $(next.source.com t.next.source.com)
== ==
=+ |- ^- sink/dojo-sink =+ |- ^- sink=dojo-sink
?- -.sink.com ?- -.sink.com
$stdout [%show %0] %stdout [%show %0]
$output-file $(sink.com [%command (cat 3 '@' pax.sink.com)]) %output-file $(sink.com [%command (cat 3 '@' pax.sink.com)])
$output-pill $(sink.com [%command (cat 3 '.' pax.sink.com)]) %output-pill $(sink.com [%command (cat 3 '.' pax.sink.com)])
$output-clay [%file (need (de-beam:format pax.sink.com))] %output-clay [%file (need (de-beam:format pax.sink.com))]
$url [%http %post (crip (en-purl:html url.sink.com))] %url [%http %post (crip (en-purl:html url.sink.com))]
$to-api !! %to-api !!
$send-api [%poke our.hid api.sink.com] %send-api [%poke our.hid api.sink.com]
$command (rash command.sink.com parse-sink:he-parser) %command (rash command.sink.com parse-sink:he-parser)
$app [%poke our.hid app.sink.com] %app [%poke our.hid app.sink.com]
== ==
(he-plan sink source) (he-plan sink source)
:: ::
++ he-like :: accept line ++ he-like :: accept line
|= buf/(list @c) |= buf=(list @c)
=(%& -:(he-dope (tufa buf))) =(%& -:(he-dope (tufa buf)))
:: ::
++ he-stir :: apply change ++ he-stir :: apply change
|= cal/sole-change |= cal=sole-change
^+ +> ^+ +>
:: ~& [%his-clock ler.cal] :: ~& [%his-clock ler.cal]
:: ~& [%our-clock ven.say] :: ~& [%our-clock ven.say]
=^ dat say (~(transceive sole say) cal) =^ dat say (~(transceive sole say) cal)
?. ?& ?=($del -.dat) ?. ?& ?=(%del -.dat)
=(+(p.dat) (lent buf.say)) =(+(p.dat) (lent buf.say))
== ==
+>.$ +>.$
@ -1203,13 +1203,13 @@
(he-errd `dat q.p.foy) (he-errd `dat q.p.foy)
:: ::
++ he-plan :: execute command ++ he-plan :: execute command
|= mad/dojo-command |= mad=dojo-command
^+ +> ^+ +>
?> ?=(~ poy) ?> ?=(~ poy)
he-pine:(dy-step:~(dy-init dy %*(. *dojo-project mad mad)) 0) he-pine:(dy-step:~(dy-init dy %*(. *dojo-project mad mad)) 0)
:: ::
++ he-done :: parse command ++ he-done :: parse command
|= txt/tape |= txt=tape
^+ +> ^+ +>
?~ txt ?~ txt
=< he-prom(buf ~) =< he-prom(buf ~)
@ -1431,19 +1431,19 @@
-- --
:: ::
++ he-type :: apply input ++ he-type :: apply input
|= act/sole-action |= act=sole-action
^+ +> ^+ +>
?^ poy ?^ poy
he-pine:(~(dy-type dy u.poy) act) he-pine:(~(dy-type dy u.poy) act)
?- -.dat.act ?- -.dat.act
$det (he-stir +.dat.act) %det (he-stir +.dat.act)
$ret (he-done (tufa buf.say)) %ret (he-done (tufa buf.say))
$clr he-pine(buf "") %clr he-pine(buf "")
$tab (he-tab +.dat.act) %tab (he-tab +.dat.act)
== ==
:: ::
++ he-lame :: handle error ++ he-lame :: handle error
|= {wut/term why/tang} |= [wut=term why=tang]
^+ +> ^+ +>
%- (slog (flop `tang`[>%dojo-lame wut< why])) %- (slog (flop `tang`[>%dojo-lame wut< why]))
?^ poy ?^ poy
@ -1460,10 +1460,10 @@
:: ::
^- cage ^- cage
:- %noun :- %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 %+ sloop
%- ~(rep by var) %- ~(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) (sloop b(p face+[a p.b]) c)
!>([our=our now=now eny=eny]:hid) !>([our=our now=now eny=eny]:hid)
-- --

View File

@ -67,7 +67,7 @@
|- ^+ [fex this] |- ^+ [fex this]
?~ daz [fex this] ?~ daz [fex this]
=/ dap-pax=path /app/[i.daz]/hoon =/ dap-pax=path /app/[i.daz]/hoon
=/ dap-arch .^(arch cy+(en-beam now-beak (flop dap-pax))) =/ dap-arch .^(arch cy+(en-beam now-beak dap-pax))
?~ fil.dap-arch ?~ fil.dap-arch
$(daz t.daz) $(daz t.daz)
=/ sing=card =/ sing=card

View File

@ -147,7 +147,7 @@
|= [wir=wire err=(unit tang)] |= [wir=wire err=(unit tang)]
^- (quip card _state) ^- (quip card _state)
?~ err ?~ err
=/ req/request:http (request-wttr location) =/ req=request:http (request-wttr location)
=/ out *outbound-config:iris =/ out *outbound-config:iris
:_ state(timer `(add now.bol ~h3)) :_ state(timer `(add now.bol ~h3))
:~ [%pass /[(scot %da now.bol)] %arvo %i %request req out] :~ [%pass /[(scot %da now.bol)] %arvo %i %request req out]

View File

@ -1,6 +1,6 @@
:: :acme domain validation request handler :: :acme domain validation request handler
:: ::
|= [[now=@da eny=@ bek=beak] $~ $~] |= [[now=@da eny=@ bek=beak] ~ ~]
|= [authorized=? =request:http] |= [authorized=? =request:http]
^- simple-payload:http ^- simple-payload:http
=/ url=(unit (pair pork:eyre quay:eyre)) =/ url=(unit (pair pork:eyre quay:eyre))

View File

@ -8,8 +8,9 @@
:::: ::::
!: !:
:- %say :- %say
|= $: {now/@da * bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{~ try/_| ~} arg=$@(~ [top=path ~])
~
== ==
:: ::
:: we're creating an event series E whose lifecycle can be computed :: we're creating an event series E whose lifecycle can be computed
@ -153,7 +154,9 @@
:: ::
:: sys: root path to boot system, `/~me/[desk]/now/sys` :: sys: root path to boot system, `/~me/[desk]/now/sys`
:: ::
=+ sys=`path`/(scot %p p.bec)/[q.bec]/(scot %da now)/sys =/ sys=path
?^ arg top.arg
/(scot %p p.bec)/[q.bec]/(scot %da now)/sys
:: ::
:: compiler-source: hoon source file producing compiler, `sys/hoon` :: compiler-source: hoon source file producing compiler, `sys/hoon`
:: ::
@ -186,6 +189,13 @@
== ==
:: a pill is a 3-tuple of event-lists: [boot kernel userspace] :: a pill is a 3-tuple of event-lists: [boot kernel userspace]
:: ::
=/ bas=path (flop (tail (flop sys)))
:+ boot-ova :+ boot-ova
(module-ova:pill sys) :~ :~ //arvo
[(file-ovum:pill (en-beam:format bec /)) ~] %what
[/sys/hoon hoon/compiler-source]
[/sys/arvo hoon/arvo-source]
==
(file-ovum2:pill bas)
==
[(file-ovum:pill bas) ~]

View File

@ -8,10 +8,10 @@
:::: ::::
:: ::
:- %say :- %say
|= {^ {arg/(list path)} vane/?($g $c)} |= [^ [arg=(list path)] vane=?(%g %c)]
=- tang+(flop `tang`(zing -)) =- tang+(flop `tang`(zing -))
%+ turn arg %+ turn arg
|= pax/path |= pax=path
^- tang ^- tang
=+ ark=.^(arch (cat 3 vane %y) pax) =+ ark=.^(arch (cat 3 vane %y) pax)
?^ fil.ark ?^ fil.ark
@ -22,7 +22,7 @@
~ ~
[rose+[" " `~]^~[leaf+"~" (smyt pax)]]~ [rose+[" " `~]^~[leaf+"~" (smyt pax)]]~
:: ::
{{@t ~} ~ ~} [[@t ~] ~ ~]
$(pax (welp pax /[p.n.dir.ark])) $(pax (welp pax /[p.n.dir.ark]))
:: ::
* *

View File

@ -3,7 +3,7 @@
:::: /hoon/code/gen :::: /hoon/code/gen
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
~ ~
~ ~
== ==

View File

@ -2,7 +2,7 @@
:: ::
:: outer gate is a standard generator :: outer gate is a standard generator
:: ::
|= [[now=@da eny=@ bek=beak] $~ $~] |= [[now=@da eny=@ bek=beak] ~ ~]
:: ::
:: :- %build :: :- %build
|= [authorized=? request:http] |= [authorized=? request:http]

View File

@ -1,132 +0,0 @@
:: Produce a glass pill
::
:::: /hoon/glass/gen
::
/? 310
::
::::
::
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
*
==
=< [%noun ~]
=> |%
++ wasp :: arvo effect
$% {$wack p/@uvJ} :: add entropy
{$what p/(list (pair path (pair term noun)))} :: reset reptile
{$whom p/@p} :: id and boot
==
--
::
:: deterministic test
::
=. eny 0v0
::
:: build arvo with existing compiler
::
|^ ^- *
::
:: neo: root path to boot system, `/~me/[desk]/now/neo`
::
=+ neo=`path`/(scot %p p.bec)/[q.bec]/(scot %da now)/neo
::
:: arvo-source: hoon source file producing arvo kernel, `neo/arvo`
::
=+ arvo-source=.^(@t %cx (welp neo /arvo/hoon))
::
:: arvo-twig: parsed arvo source
::
~& [%parsing `@p`(mug arvo-source)]
=+ arvo-twig=(ream arvo-source)
~& %parsed
::
:: arvo-kernel: a living urbit
::
~& [%compiling `@p`(mug arvo-twig)]
=+ arvo-kernel=+:(slap !>(..ream) arvo-twig)
~& %compiled
::
:: events: list of events to feed our urbit
::
~& %loading
=+ events=main-events
~& [%loaded `@p`(mug events)]
::
:: execute events
::
=+ number=0
|- ^- *
?~ events arvo-kernel
~& number+number
%= $
events t.events
number +(number)
arvo-kernel .*(arvo-kernel(+< i.events) -.arvo-kernel)
==
::
++ main-events
=. now ~2017.3.1
=+ mov=main-moves
|- ^- (list (pair @da ovum))
?~ mov ~
:- [now i.mov]
$(mov t.mov, now (add now (bex 48)))
::
++ main-moves
^- (list ovum)
:~ [[%$ ~] [%what boot-files]]
:: [[%$ ~] [%whom ~zod]]
==
++ boot-files
^- (list (pair path (pair term noun)))
::
:: userspace:
::
:: /app %gall applications
:: /gen :dojo generators
:: /lib %ford libraries
:: /mar %ford marks
:: /sur %ford structures
:: /ren %ford renderers
:: /web %eyre web content
:: /sys system files
:: /neo new system files
::
(user-files /neo ~)
::
++ user-files :: userspace loading
|= :: sal: all spurs to load from
::
sal/(list spur)
^- (list (pair path (pair term noun)))
::
:: hav: all user files
::
=| hav/(list (pair path (pair term noun)))
|- ^+ hav
?~ sal ~
=. hav $(sal t.sal)
::
:: tyl: spur
::
=/ tyl i.sal
|- ^+ hav
::
:: pax: full path at `tyl`
:: lon: directory at `tyl`
::
=/ pax (en-beam:format bec tyl)
=/ lon .^(arch %cy pax)
=? hav ?=(^ fil.lon)
::
:: install only hoon files for now
::
?. ?=({$hoon *} tyl) hav
:_(hav [(flop `path`t.tyl) [%hoon .^(@t %cx pax)]])
::
=/ all ~(tap by dir.lon)
|- ^+ hav
?~ all hav
$(all t.all, hav ^$(tyl [p.i.all tyl]))
--

View File

@ -8,6 +8,6 @@
:::: ::::
:: ::
:- %say :- %say
|= {^ {{txt/@tas ~} ~}} |= [^ [[txt=@tas ~] ~]]
:- %noun :- %noun
(crip (weld "hello, " (trip txt))) (crip (weld "hello, " (trip txt)))

View File

@ -8,7 +8,7 @@
:: ::
|% |%
++ path-heps ++ path-heps
|= a/path ^- tape |= a=path ^- tape
?~ a "" ?~ a ""
|- ^- tape |- ^- tape
%+ welp (trip i.a) %+ welp (trip i.a)
@ -16,13 +16,13 @@
['-' $(a t.a)] ['-' $(a t.a)]
:: ::
++ rend ++ rend
|= {a/@thoon b/path} ^- tank |= [a=@thoon b=path] ^- tank
=; c/(pair tape tape) =; c=(pair tape tape)
=/ tab (sub 10 (mod (lent "{p.c} ") 10)) =/ tab (sub 10 (mod (lent "{p.c} ") 10))
[%palm [" {(reap tab ' ')}" ``~] leaf+p.c leaf+q.c ~] [%palm [" {(reap tab ' ')}" ``~] leaf+p.c leaf+q.c ~]
:- ?- b :- ?- b
~ "/" :: XX !! maybe? ~ "/" :: XX !! maybe?
{$hood ^} "|{(path-heps t.b)}" [%hood ^] "|{(path-heps t.b)}"
^ "+{(path-heps b)}" :: XX deal with :graph-store|foo ^ "+{(path-heps b)}" :: XX deal with :graph-store|foo
== ==
=/ c (to-wain:format a) =/ c (to-wain:format a)
@ -32,17 +32,17 @@
(trip i.c) (trip i.c)
:: ::
++ read-at ++ read-at
|= {len/@u pax/path} |= [len=@u pax=path]
|= {nam/@t ark/arch} ^- (unit {@t path}) |= [nam=@t ark=arch] ^- (unit [@t path])
?. (~(has by dir.ark) %hoon) ~ ?. (~(has by dir.ark) %hoon) ~
%+ bind (file:space:userlib (welp pax /[nam]/hoon)) %+ bind (file:space:userlib (welp pax /[nam]/hoon))
|= a/* ^- {cord path} |= a=* ^- [cord path]
[;;(@t a) (welp (slag len pax) /[nam])] [;;(@t a) (welp (slag len pax) /[nam])]
-- --
:: ::
:- %say :- %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 =/ pax=path /(scot %p our)/home/(scot %da now)/gen :: XX hardcoded
=+ len=(lent pax) =+ len=(lent pax)
=. pax ?~(typ pax (welp pax /[p.typ])) =. pax ?~(typ pax (welp pax /[p.typ]))
:- %tang %- flop ^- tang :- %tang %- flop ^- tang
@ -53,12 +53,12 @@
(drop (bind red rend)) (drop (bind red rend))
|- ^- tang |- ^- tang
=+ =< arl=~(tap by (~(urn by dir.ark) .)) =+ =< arl=~(tap by (~(urn by dir.ark) .))
|=({a/@t ~} .^(arch cy+(welp pax /[a]))) |=([a=@t ~] .^(arch cy+(welp pax /[a])))
%+ welp %+ welp
=/ dir/(list {@ path}) =/ dir=(list [@ path])
(murn arl (read-at len pax)) (murn arl (read-at len pax))
`tang`(turn (sort dir aor) rend) `tang`(turn (sort dir aor) rend)
%- zing ^- (list tang) %- zing ^- (list tang)
%+ turn (sort arl aor) %+ turn (sort arl aor)
|= {a/@t b/arch} |= [a=@t b=arch]
^$(pax (welp pax /[a]), ark b) ^$(pax (welp pax /[a]), ark b)

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{mon/term ~} [mon=term ~]
~ ~
== ==
:- %kiln-commit :- %kiln-commit

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/(list term) ~} [arg=(list term) ~]
== ==
:+ %helm-reload-desk %base :+ %helm-reload-desk %base
arg arg

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{mon/term ~} [mon=term ~]
auto=_| auto=_|
== ==
:- %kiln-commit :- %kiln-commit

View File

@ -5,7 +5,7 @@
/? 310 /? 310
:- %say :- %say
=, space:userlib =, space:userlib
|= {^ {input/path output/path ~} ~} |= [^ [input=path output=path ~] ~]
:- %kiln-info :- %kiln-info
?. =(-:(flop input) -:(flop output)) ?. =(-:(flop input) -:(flop output))
["Can't move to a different mark" ~] ["Can't move to a different mark" ~]

View File

@ -0,0 +1,4 @@
:- %say
|= [^ [dap=term wake=$@(~ [%wake ~])] ~]
=/ mode ?@(wake %idle %jolt)
[%helm-pass %g %fade dap mode]

View File

@ -9,8 +9,8 @@
:: ::
=, sole =, sole
:- %say :- %say
|= $: {now/@da eny/@ bec/beak} |= $: [now=@da eny=@ bec=beak]
{~ ~} [~ ~]
== ==
~& %drum-exit ~& %drum-exit
[%drum-exit ~] [%drum-exit ~]

View File

@ -0,0 +1,17 @@
:: Drum: destroy app
::
:::: /hoon/fade/hood/gen
::
/? 310
::
::::
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[arg=[@ $@(~ [@ ~])] ~]
==
:- %drum-fade
?> ((sane %tas) -.arg)
?@ +.arg [q.bec -.arg]
?> ((sane %tas) +<.arg)
[-.arg +<.arg]

View File

@ -4,4 +4,4 @@
:: ::
/? 310 /? 310
:- %say :- %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)])

View File

@ -10,26 +10,26 @@
:: ::
=, generators =, generators
:- %ask :- %ask
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/$@(~ {dom/path ~})} [arg=$@(~ [dom=path ~])]
~ ~
== ==
^- (sole-result:sole {$write-sec-atom p/host:eyre q/@}) ^- (sole-result:sole [%write-sec-atom p=host:eyre q=@])
=- ?~ arg - =- ?~ arg -
(fun.q.q [%& dom.arg]) (fun.q.q [%& dom.arg])
%+ prompt %+ prompt
[%& %oauth-hostname "api hostname: https://"] [%& %oauth-hostname "api hostname: https://"]
%+ parse thos:de-purl:html %+ parse thos:de-purl:html
|= hot/host:eyre |= hot=host:eyre
?: ?=(%| -.hot) ?: ?=(%| -.hot)
~|(%ips-unsupported !!) ~|(%ips-unsupported !!)
%+ prompt %+ prompt
[%& %oauth-client "client id: "] [%& %oauth-client "client id: "]
%+ parse (boss 256 (star prn)) %+ parse (boss 256 (star prn))
|= cid/@t |= cid=@t
%+ prompt %+ prompt
[%& %oauth-secret "client secret: "] [%& %oauth-secret "client secret: "]
%+ parse (boss 256 (star prn)) %+ parse (boss 256 (star prn))
|= cis/@t |= cis=@t
%+ produce %write-sec-atom :: XX typed pair %+ produce %write-sec-atom :: XX typed pair
[hot (of-wain:format cid cis ~)] [hot (of-wain:format cid cis ~)]

View File

@ -12,11 +12,11 @@
=, html =, html
=, format =, format
:- %ask :- %ask
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/$@(~ {jon/json ~})} [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" %+ print leaf+"Accepting credentials for https://*.googleapis.com"
=+ hot=[%& /com/googleapis] =+ hot=[%& /com/googleapis]
=- ?~ arg - =- ?~ arg -
@ -24,9 +24,9 @@
%+ prompt %+ prompt
[%& %oauth-json "json credentials: "] [%& %oauth-json "json credentials: "]
%+ parse apex:de-json %+ parse apex:de-json
|= jon/json |= jon=json
=+ ~| bad-json+jon =+ ~| 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 rep=(ot web+(ot 'client_id'^so 'client_secret'^so ~) ~):dejs-soft:format
%+ produce %write-sec-atom :: XX typed pair %+ produce %write-sec-atom :: XX typed pair
[hot (of-wain:format cid cis ~)] [hot (of-wain:format cid cis ~)]

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/{syd/desk lab/@tas ~} ~} [arg=[syd=desk lab=@tas ~] ~]
== ==
:- %kiln-label :- %kiln-label
[syd lab]:arg [syd lab]:arg

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ byk/beak} |= $: [now=@da eny=@uvJ byk=beak]
{arg/$?({dap/term ~} {who/ship dap/term ~}) ~} [arg=$?([dap=term ~] [who=ship dap=term ~]) ~]
== ==
:- %drum-link :- %drum-link
?~ +.arg ?~ +.arg

View File

@ -7,7 +7,7 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/~ ~} [arg=~ ~]
== ==
[%helm-mass ~] [%helm-mass ~]

View File

@ -7,40 +7,40 @@
=, clay =, clay
:: ::
|% |%
++ beaky {knot knot knot ~} +$ beaky [knot knot knot ~]
++ sorc ?({bek/beaky ~} {her/@p sud/@tas ~}) +$ sorc ?([bek=beaky ~] [her=@p sud=@tas ~])
-- --
:: ::
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bek/beak} |= $: [now=@da eny=@uvJ bek=beak]
{arg/{?(~ sorc {syd/$@(desk beaky) sorc})} cas/case gem/?(germ $auto)} [arg=[?(~ sorc [syd=$@(desk beaky) sorc])] cas=case gem=?(germ %auto)]
== ==
=* our p.bek =* our p.bek
|^ :- %kiln-merge |^ :- %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 ?- arg
~ ((slog (turn help-text |=(=@t leaf+(trip t)))) ~) ~ ((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]) =+(arg [sud ?.(=(our her) her (sein:title p.bek now her)) sud (opt-case da+now) gem])
:: ::
{^ ~} [^ ~]
=+ (pars bek.arg) =+ (pars bek.arg)
[dez ?.(=(our who) who (sein:title p.bek now who)) dez (opt-case caz) gem] [dez ?.(=(our who) who (sein:title p.bek now who)) dez (opt-case caz) gem]
:: ::
{* @ @ ~} [* @ @ ~]
:- (pars-src syd.arg) :- (pars-src syd.arg)
=+(arg [her sud (opt-case da+now) gem]) =+(arg [her sud (opt-case da+now) gem])
:: ::
{* ^ ~} [* ^ ~]
:- (pars-src syd.arg) :- (pars-src syd.arg)
=+((pars bek.arg) [who dez (opt-case caz) gem]) =+((pars bek.arg) [who dez (opt-case caz) gem])
== ==
++ opt-case |=(a/case ?:(=(*case cas) a cas)) :: override ++ 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 ++ pars-src
|= syd/$@(desk beaky) |= syd=$@(desk beaky)
?@ syd syd ?@ syd syd
=+ (pars syd) =+ (pars syd)
~| [%into-foreign who `path`syd] ~| [%into-foreign who `path`syd]

View File

@ -16,9 +16,9 @@
^- (unit [=ship =udiff:point:able:jael]) ^- (unit [=ship =udiff:point:able:jael])
=* our p.bec =* our p.bec
=/ ran (clan:title our) =/ ran (clan:title our)
?: ?=({?($earl $pawn)} ran) ?: ?=([?(%earl %pawn)] ran)
%- %- slog :_ ~ %- %- slog :_ ~
leaf+"can't manage a moon from a {?:(?=($earl ran) "moon" "comet")}" leaf+"can't manage a moon from a {?:(?=(%earl ran) "moon" "comet")}"
~ ~
=/ seg=ship (sein:title our now mon) =/ seg=ship (sein:title our now mon)
?. =(our seg) ?. =(our seg)

View File

@ -17,9 +17,9 @@
^- (unit [=ship =udiff:point:able:jael]) ^- (unit [=ship =udiff:point:able:jael])
=* our p.bec =* our p.bec
=/ ran (clan:title our) =/ ran (clan:title our)
?: ?=({?($earl $pawn)} ran) ?: ?=([?(%earl %pawn)] ran)
%- %- slog :_ ~ %- %- slog :_ ~
leaf+"can't manage a moon from a {?:(?=($earl ran) "moon" "comet")}" leaf+"can't manage a moon from a {?:(?=(%earl ran) "moon" "comet")}"
~ ~
=/ seg=ship (sein:title our now mon) =/ seg=ship (sein:title our now mon)
?. =(our seg) ?. =(our seg)

View File

@ -16,9 +16,9 @@
^- (unit [=ship =udiff:point:able:jael]) ^- (unit [=ship =udiff:point:able:jael])
=* our p.bec =* our p.bec
=/ ran (clan:title our) =/ ran (clan:title our)
?: ?=({?($earl $pawn)} ran) ?: ?=([?(%earl %pawn)] ran)
%- %- slog :_ ~ %- %- slog :_ ~
leaf+"can't create a moon from a {?:(?=($earl ran) "moon" "comet")}" leaf+"can't create a moon from a {?:(?=(%earl ran) "moon" "comet")}"
~ ~
=/ mon=ship =/ mon=ship
?^ arg ?^ arg

View File

@ -7,11 +7,11 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{{pax/path pot/$@(~ {v/@tas ~})} ~} [[pax=path pot=$@(~ [v=@tas ~])] ~]
== ==
?~ pot ?~ pot
=+ bem=(need (de-beam:format pax)) =+ bem=(need (de-beam:format pax))
$(pot ~[?^(s.bem i.s.bem q.bem)]) $(pot ~[?^(s.bem (rear s.bem) q.bem)])
:- %kiln-mount :- %kiln-mount
[pax v.pot] [pax v.pot]

View File

@ -5,7 +5,7 @@
/? 310 /? 310
=, space:userlib =, space:userlib
:- %say :- %say
|= {^ {input/path output/path ~} ~} |= [^ [input=path output=path ~] ~]
:- %kiln-info :- %kiln-info
?. =(-:(flop input) -:(flop output)) ?. =(-:(flop input) -:(flop output))
["Can't move to a different mark" ~] ["Can't move to a different mark" ~]

View File

@ -7,7 +7,7 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/~ ~} [arg=~ ~]
== ==
[%helm-pack ~] [%helm-pack ~]

View File

@ -0,0 +1,3 @@
:- %say
|= [^ [=note-arvo ~] ~]
[%helm-pass note-arvo]

View File

@ -4,8 +4,8 @@
:: ::
/? 310 /? 310
:- %say :- %say
|= $: {now/@da eny/@ bec/beak} |= $: [now=@da eny=@ bec=beak]
{{exp/@ud ~} ~} [[exp=@ud ~] ~]
== ==
=+ rab=(~(raw og eny) (bex exp)) =+ rab=(~(raw og eny) (bex exp))
~& [%random-bytes (met 3 rab) `@p`(mug rab)] ~& [%random-bytes (met 3 rab) `@p`(mug rab)]

View File

@ -3,8 +3,8 @@
:::: /gen/hood/private/hoon :::: /gen/hood/private/hoon
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/{des/desk may/?($~ {pax/path $~})} $~} [arg=[des=desk may=?(~ [pax=path ~])] ~]
== ==
:- %kiln-permission :- %kiln-permission
[des ?~(may / pax.may) |]:arg [des ?~(may / pax.may) |]:arg

View File

@ -3,8 +3,8 @@
:::: /gen/hood/public/hoon :::: /gen/hood/public/hoon
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/{des/desk may/?($~ {pax/path $~})} $~} [arg=[des=desk may=?(~ [pax=path ~])] ~]
== ==
:- %kiln-permission :- %kiln-permission
[des ?~(may / pax.may) &]:arg [des ?~(may / pax.may) &]:arg

View File

@ -7,7 +7,7 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/~ ~} [arg=~ ~]
== ==
[%helm-reload ~[%c]] [%helm-reload ~[%c]]

View File

@ -7,7 +7,7 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/~ ~} [arg=~ ~]
== ==
[%helm-reload ~[%z %a %b %c %d %e %g %i %j]] [%helm-reload ~[%z %a %b %c %d %e %g %i %j]]

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/{desk (list term)} ~} [arg=[desk (list term)] ~]
== ==
:- %helm-reload-desk :- %helm-reload-desk
arg arg

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/(list term) ~} [arg=(list term) ~]
== ==
:- %helm-reload :- %helm-reload
arg arg

View File

@ -7,7 +7,7 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/~ ~} [arg=~ ~]
== ==
[%helm-reset ~] [%helm-reset ~]

View File

@ -4,4 +4,4 @@
:: ::
/? 310 /? 310
:- %say :- %say
|=({^ {input/path ~} ~} kiln-rm+input) |=([^ [input=path ~] ~] kiln-rm+input)

View File

@ -4,4 +4,4 @@
:: ::
/? 310 /? 310
:- %say :- %say
|=({^ {where/path tym/@da eve/@t ~} ~} kiln-schedule+[where tym eve]) |=([^ [where=path tym=@da eve=@t ~] ~] kiln-schedule+[where tym eve])

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/{@ $@(~ {@ ~})} ~} [arg=[@ $@(~ [@ ~])] ~]
== ==
:- %drum-start :- %drum-start
?> ((sane %tas) -.arg) ?> ((sane %tas) -.arg)

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/{syd/@tas her/@p sud/@tas ~} ~} [arg=[syd=@tas her=@p sud=@tas ~] ~]
== ==
:- %kiln-sync :- %kiln-sync
[syd her sud]:arg [syd her sud]:arg

View File

@ -7,5 +7,5 @@
:::: ::::
:: ::
:- %say :- %say
|= {{now/@da eny/@uvJ bec/beak} ~ ~} |= [[now=@da eny=@uvJ bec=beak] ~ ~]
[%kiln-syncs ~] [%kiln-syncs ~]

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/{syd/@tas her/@p sud/@tas ~} ~} [arg=[syd=@tas her=@p sud=@tas ~] ~]
== ==
:- %kiln-track :- %kiln-track
[syd her sud]:arg [syd her sud]:arg

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ byk/beak} |= $: [now=@da eny=@uvJ byk=beak]
{arg/$?({dap/term ~} {who/ship dap/term ~}) ~} [arg=$?([dap=term ~] [who=ship dap=term ~]) ~]
== ==
:- %drum-unlink :- %drum-unlink
?~ +.arg ?~ +.arg

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{{mon/$@(term {knot path}) ~} ~} [[mon=$@(term [knot path]) ~] ~]
== ==
:- %kiln-unmount :- %kiln-unmount
mon mon

View File

@ -7,8 +7,8 @@
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: [now=@da eny=@uvJ bec=beak]
{arg/{syd/@tas her/@p sud/@tas ~} ~} [arg=[syd=@tas her=@p sud=@tas ~] ~]
== ==
:- %kiln-unsync :- %kiln-unsync
[syd her sud]:arg [syd her sud]:arg

View File

@ -9,8 +9,8 @@
:: ::
=, sole =, sole
:- %say :- %say
|= $: {now/@da eny/@ bec/beak} |= $: [now=@da eny=@ bec=beak]
{~ ~} [~ ~]
== ==
~& %helm-verb ~& %helm-verb
[%helm-verb ~] [%helm-verb ~]

View File

@ -7,11 +7,15 @@
:::: ::::
!: !:
:- %say :- %say
|= [[now=@da * bec=beak] *] |= $: [now=@da eny=@uvJ bec=beak]
arg=$@(~ [top=path ~])
~
==
:- %noun :- %noun
:: sys: root path to boot system, `/~me/[desk]/now/sys` :: sys: root path to boot system, `/~me/[desk]/now/sys`
:: ::
=/ sys=path =/ sys=path
?^ arg top.arg
/(scot %p p.bec)/[q.bec]/(scot %da now)/sys /(scot %p p.bec)/[q.bec]/(scot %da now)/sys
:: compiler-source: hoon source file producing compiler, `sys/hoon` :: compiler-source: hoon source file producing compiler, `sys/hoon`
:: ::
@ -33,8 +37,8 @@
:: Parsed with a static path for reproducibility. :: Parsed with a static path for reproducibility.
:: ::
=/ whole-hoon=hoon =/ whole-hoon=hoon
:+ %tsbn compiler-hoon :+ %tsgr compiler-hoon
:+ %tsld (rain /sys/arvo/hoon arvo-source) :+ %tsgl (rain /sys/arvo/hoon arvo-source)
[%$ 7] [%$ 7]
:: compile the whole schmeer :: compile the whole schmeer
:: ::
@ -48,8 +52,12 @@
:: we include a static path for reproducibility. :: we include a static path for reproducibility.
:: ::
=/ zuse-ovo=ovum =/ zuse-ovo=ovum
:- /vane/zuse :~ //arvo
[%veer %$ /sys/zuse/hoon .^(@ %cx (weld sys /zuse/hoon))] %what
[/sys/hoon hoon/compiler-source]
[/sys/arvo hoon/arvo-source]
[/sys/zuse hoon/.^(@ %cx (weld sys /zuse/hoon))]
==
:: installed: Arvo gate (formal instance) with %zuse installed :: installed: Arvo gate (formal instance) with %zuse installed
:: ::
:: The :zuse-ovo event occurs at a defaulted date for reproducibility. :: The :zuse-ovo event occurs at a defaulted date for reproducibility.

View File

@ -12,7 +12,7 @@
%+ print leaf+"generating keys for {(scow %p who)}, life #{(scow %ud life)}" %+ print leaf+"generating keys for {(scow %p who)}, life #{(scow %ud life)}"
%+ prompt [%| %pope-pass "passphrase: "] %+ prompt [%| %pope-pass "passphrase: "]
%+ parse (boss 256 (star prn)) %+ parse (boss 256 (star prn))
|= fra/@t |= fra=@t
=/ bur (shaz (add who (shaz fra))) =/ bur (shaz (add who (shaz fra)))
=/ cub (pit:nu:crub:crypto 512 bur) =/ cub (pit:nu:crub:crypto 512 bur)
:: ::

View File

@ -9,6 +9,6 @@
:: ::
~& % ~& %
:- %say :- %say
|= {^ {arg/path ~} vane/?($g $c)} |= [^ [arg=path ~] vane=?(%g %c)]
=+ lon=.^(arch (cat 3 vane %y) arg) =+ lon=.^(arch (cat 3 vane %y) arg)
tang+[?~(dir.lon leaf+"~" (show-dir vane arg dir.lon))]~ tang+[?~(dir.lon leaf+"~" (show-dir vane arg dir.lon))]~

View File

@ -1,319 +0,0 @@
:: Produce a metal pill
::
:::: /hoon/metal/gen
::
/? 310
::
::::
!:
:- %say
|= $: {now/@da * bec/beak}
{{who/@p ~} try/_| ~}
==
::
:: we're creating an event series E whose lifecycle can be computed
:: with the urbit lifecycle formula L, `[2 [0 3] [0 2]]`. that is:
:: if E is the list of events processed by a computer in its life,
:: its final state is S, where S is nock(E L).
::
:: in practice, the first five nouns in E are: two boot formulas,
:: a hoon compiler as a nock formula, the same compiler as source,
:: and the arvo kernel as source.
::
:: after the first five special events, we enter an iterative
:: sequence of regular events which continues for the rest of the
:: computer's life. during this sequence, each state is a function
:: that, passed the next event, produces the next state.
::
:: each event is a `[date wire type data]` tuple, where `date` is a
:: 128-bit Urbit date; `wire` is an opaque path which output can
:: match to track causality; `type` is a symbol describing the type
:: of input; and `data` is input data specific to `type`.
::
:: in real life we don't actually run the lifecycle loop,
:: since real life is updated incrementally and also cares
:: about things like output. we couple to the internal
:: structure of the state machine and work directly with
:: the underlying arvo engine.
::
:: this arvo core, which is at `+7` (Lisp `cddr`) of the state
:: function (see its public interface in `sys/arvo`), gives us
:: extra features, like output, which are relevant to running
:: a real-life urbit vm, but don't affect the formal definition.
::
:: so a real-life urbit interpreter is coupled to the shape of
:: the arvo core. it becomes very hard to change this shape.
:: fortunately, it is not a very complex interface.
::
:- %noun
::
:: boot-one: lifecycle formula
::
=+ ^= boot-one
::
:: event 1 is the lifecycle formula which computes the final
:: state from the full event sequence.
::
:: the formal urbit state is always just a gate (function)
:: which, passed the next event, produces the next state.
::
=> [boot-formula=* full-sequence=*]
!= ::
:: first we use the boot formula (event 1) to set up
:: the pair of state function and main sequence. the boot
:: formula peels off the first n (currently 3) events
:: to set up the lifecycle loop.
::
=+ [state-gate main-sequence]=.*(full-sequence boot-formula)
::
:: in this lifecycle loop, we replace the state function
:: with its product, called on the next event, until
:: we run out of events.
::
|- ?@ main-sequence
state-gate
%= $
main-sequence +.main-sequence
state-gate .*(state-gate [%9 2 %10 [6 %1 -.main-sequence] %0 1])
==
::
:: boot-two: startup formula
::
=+ ^= boot-two
::
:: event 2 is the startup formula, which verifies the compiler
:: and starts the main lifecycle.
::
=> :* :: event 3: a formula producing the hoon compiler
::
compiler-formula=**
::
:: event 4: hoon compiler source, compiling to event 2
::
compiler-source=*@t
::
:: event 5: arvo kernel source
::
arvo-source=*@t
::
:: events 6..n: main sequence with normal semantics
::
main-sequence=**
==
!= :_ main-sequence
::
:: activate the compiler gate. the product of this formula
:: is smaller than the formula. so you might think we should
:: save the gate itself rather than the formula producing it.
:: but we have to run the formula at runtime, to register jets.
::
:: as always, we have to use raw nock as we have no type.
:: the gate is in fact ++ride.
::
~> %slog.[0 leaf+"1-b"]
=+ ^= compiler-gate
.*(0 compiler-formula)
::
:: compile the compiler source, producing (pair span nock).
:: the compiler ignores its input so we use a trivial span.
::
~> %slog.[0 leaf+"1-c"]
=+ ^= compiler-tool
.*(compiler-gate [%9 2 %10 [6 %1 [%noun compiler-source]] %0 1])
::
:: switch to the second-generation compiler. we want to be
:: able to generate matching reflection nouns even if the
:: language changes -- the first-generation formula will
:: generate last-generation spans for `!>`, etc.
::
~> %slog.[0 leaf+"1-d"]
=. compiler-gate .*(0 +:compiler-tool)
::
:: get the span (type) of the kernel core, which is the context
:: of the compiler gate. we just compiled the compiler,
:: so we know the span (type) of the compiler gate. its
:: context is at tree address `+>` (ie, `+7` or Lisp `cddr`).
:: we use the compiler again to infer this trivial program.
::
~> %slog.[0 leaf+"1-e"]
=+ ^= kernel-span
-:.*(compiler-gate [%9 2 %10 [6 %1 [-.compiler-tool '+>']] %0 1])
::
:: compile the arvo source against the kernel core.
::
~> %slog.[0 leaf+"1-f"]
=+ ^= kernel-tool
.*(compiler-gate [%9 2 %10 [6 %1 [kernel-span arvo-source]] %0 1])
::
:: create the arvo kernel, whose subject is the kernel core.
::
~> %slog.[0 leaf+"1-g"]
.*(+>:compiler-gate +:kernel-tool)
::
:: sys: root path to boot system, `/~me/[desk]/now/sys`
::
=+ sys=`path`/(scot %p p.bec)/[q.bec]/(scot %da now)/sys
::
:: compiler-source: hoon source file producing compiler, `sys/hoon`
::
=+ compiler-source=.^(@t %cx (welp sys /hoon/hoon))
::
:: compiler-twig: compiler as hoon expression
::
~& %metal-parsing
=+ compiler-twig=(ream compiler-source)
~& %metal-parsed
::
:: compiler-formula: compiler as nock formula
::
~& %metal-compiling
=+ compiler-formula=q:(~(mint ut %noun) %noun compiler-twig)
~& %metal-compiled
::
:: arvo-source: hoon source file producing arvo kernel, `sys/arvo`
::
=+ arvo-source=.^(@t %cx (welp sys /arvo/hoon))
::
:: main-moves: installation actions
::
=+ ^= main-moves
|^ ^- (list ovum)
:~ ::
:: configure identity
::
[[%name (scot %p who) ~] [%veal who]]
::
:: sys/zuse: standard library
::
(vent %$ /zuse)
::
:: sys/vane/ames: network
::
(vent %a /vane/ames)
::
:: sys/vane/behn: timer
::
(vent %b /vane/behn)
::
:: sys/vane/clay: revision control
::
(vent %c /vane/clay)
::
:: sys/vane/dill: console
::
(vent %d /vane/dill)
::
:: sys/vane/eyre: web
::
(vent %e /vane/eyre)
::
:: sys/vane/gall: applications
::
(vent %g /vane/gall)
::
:: sys/vane/jael: security
::
(vent %j /vane/jael)
::
:: legacy boot event
::
[[%$ %term '1' ~] [%boot %sith who `@uw`who &]]
::
:: userspace:
::
:: /app %gall applications
:: /gen :dojo generators
:: /lib %ford libraries
:: /mar %ford marks
:: /sur %ford structures
:: /ren %ford renderers
:: /web %eyre web content
:: /sys system files
::
(user /app /gen /lib /mar /ren /sec /sur /sys /web ~)
==
:: ::
++ user :: userspace loading
|= :: sal: all spurs to load from
::
sal/(list spur)
^- ovum
::
:: hav: all user files
::
=; hav ~& user-files+(lent hav)
[[%$ %sync ~] [%into %$ & hav]]
=| hav/mode:clay
|- ^+ hav
?~ sal ~
=. hav $(sal t.sal)
::
:: tyl: spur
::
=/ tyl i.sal
|- ^+ hav
::
:: pax: full path at `tyl`
:: lon: directory at `tyl`
::
=/ pax (en-beam:format bec tyl)
=/ lon .^(arch %cy pax)
=? hav ?=(^ fil.lon)
?. ?=({$hoon *} tyl)
::
:: install only hoon files for now
::
hav
::
:: cot: file as plain-text octet-stream
::
=; cot [[(flop `path`tyl) `[/text/plain cot]] hav]
^- octs
?- tyl
{$hoon *}
=/ dat .^(@t %cx pax)
[(met 3 dat) dat]
==
=/ all ~(tap by dir.lon)
|- ^- mode:clay
?~ all hav
$(all t.all, hav ^$(tyl [p.i.all tyl]))
::
++ vent
|= {abr/term den/path}
=+ pax=(weld sys den)
=+ txt=.^(@ %cx (welp pax /hoon))
`ovum`[[%vane den] [%veer abr pax txt]]
--
::
:: main-events: full events with advancing times
::
=. now ~2017.3.1
=+ ^= main-events
|- ^- (list (pair @da ovum))
?~ main-moves ~
:- [now i.main-moves]
$(main-moves t.main-moves, now (add now (bex 48)))
::
~? try
~& %metal-testing
=+ ^= yop
^- @p
%- mug
.* :* boot-one
boot-two
compiler-formula
compiler-source
arvo-source
main-events
==
[2 [0 3] [0 2]]
[%metal-tested yop]
::
:* boot-one
boot-two
compiler-formula
compiler-source
arvo-source
main-events
==

View File

@ -35,7 +35,7 @@
:: compile arvo against hoon, with our current compiler :: compile arvo against hoon, with our current compiler
:: ::
=/ whole-hoon=hoon =/ whole-hoon=hoon
[%tsbn compiler-hoon [%tsbn [%$ 7] (rain arvo-path arvo-src)]] [%tsgr compiler-hoon [%tsgr [%$ 7] (rain arvo-path arvo-src)]]
~& %solid-parsed ~& %solid-parsed
=/ whole-formula q:(~(mint ut %noun) %noun whole-hoon) =/ whole-formula q:(~(mint ut %noun) %noun whole-hoon)
~& %solid-arvo ~& %solid-arvo
@ -64,7 +64,14 @@
=/ installed =/ installed
=< q =< q
%^ spin %^ spin
(module-ova:pill sys) ^- (list ovum)
:~ :~ //arvo
%what
[/sys/hoon hoon/compiler-src]
[/sys/arvo hoon/arvo-src]
==
(file-ovum2:pill (flop (tail (flop sys))))
==
.*(0 arvo-formula) .*(0 arvo-formula)
|= [ovo=ovum ken=*] |= [ovo=ovum ken=*]
[~ (slum ken [now ovo])] [~ (slum ken [now ovo])]

View File

@ -5,5 +5,5 @@
[%tang >timers< ~] [%tang >timers< ~]
.^ (list [date=@da =duct]) .^ (list [date=@da =duct])
%bx %bx
(en-beam:format [p.bec %$ r.bec] /timers/debug) (en-beam:format [p.bec %$ r.bec] /debug/timers)
== ==

View File

@ -16,9 +16,9 @@
:: dep: depth in chain :: dep: depth in chain
:: ind: index at depth :: ind: index at depth
:: pif: parent fingerprint (4 bytes) :: pif: parent fingerprint (4 bytes)
|_ [prv=@ pub=pont cad=@ dep=@ud ind=@ud pif=@] |_ [prv=@ pub=point.ecc cad=@ dep=@ud ind=@ud pif=@]
:: ::
+= keyc [key=@ cai=@] :: prv/pub key + chain code +$ keyc [key=@ cai=@] :: prv/pub key + chain code
:: ::
:: elliptic curve operations and values :: elliptic curve operations and values
:: ::
@ -26,7 +26,7 @@
:: ::
++ ser-p compress-point.ecc ++ ser-p compress-point.ecc
:: ::
++ n ^n:ecc ++ n n:t.ecc
:: ::
:: core initialization :: core initialization
:: ::
@ -46,7 +46,7 @@
+>(pub (decompress-point.ecc key), cad cai) +>(pub (decompress-point.ecc key), cad cai)
:: ::
++ from-public-point ++ from-public-point
|= [pon=pont cai=@] |= [pon=point.ecc cai=@]
+>(pub pon, cad cai) +>(pub pon, cad cai)
:: ::
++ from-extended ++ from-extended
@ -67,9 +67,9 @@
?> =(0 x) :: sanity check ?> =(0 x) :: sanity check
%. [d i p] %. [d i p]
=< set-metadata =< set-metadata
=+ v=(scag 4 t) =+ v=(swag [1 3] t)
?: =("xprv" v) (from-private k c) ?: =("prv" v) (from-private k c)
?: =("xpub" v) (from-public k c) ?: =("pub" v) (from-public k c)
!! !!
:: ::
++ set-metadata ++ set-metadata
@ -150,7 +150,7 @@
:: rare exception, invalid key, go to the next one :: rare exception, invalid key, go to the next one
?: (gte left n) $(i +(i)) ::TODO or child key is "point at infinity" ?: (gte left n) $(i +(i)) ::TODO or child key is "point at infinity"
%_ +>.$ %_ +>.$
pub (jc-add.ecc (point left) pub) pub (add-points.ecc (point left) pub)
cad right cad right
dep +(dep) dep +(dep)
ind i ind i
@ -168,12 +168,24 @@
++ identity (hash160 public-key) ++ identity (hash160 public-key)
++ fingerprint (cut 3 [16 4] identity) ++ fingerprint (cut 3 [16 4] identity)
:: ::
++ address
|= network=?(%main %regtest %testnet)
^- @uc
:: removes checksum
::
%^ rsh 3 4
%+ en-base58check
[4 (version-bytes network %pub %.n)]
[20 identity]
::
++ prv-extended ++ prv-extended
%+ en-b58c-bip32 0x488.ade4 |= network=?(%main %regtest %testnet)
%+ en-b58c-bip32 (version-bytes network %prv %.y)
(build-extended private-key) (build-extended private-key)
:: ::
++ pub-extended ++ pub-extended
%+ en-b58c-bip32 0x488.b21e |= network=?(%main %regtest %testnet)
%+ en-b58c-bip32 (version-bytes network %pub %.y)
(build-extended public-key) (build-extended public-key)
:: ::
++ build-extended ++ build-extended
@ -188,6 +200,7 @@
:: ::
++ en-b58c-bip32 ++ en-b58c-bip32
|= [v=@ k=@] |= [v=@ k=@]
%- en-base58:mimes:html
(en-base58check [4 v] [74 k]) (en-base58check [4 v] [74 k])
:: ::
:: base58check :: base58check
@ -196,7 +209,6 @@
:: v: version bytes :: v: version bytes
:: d: data :: d: data
|= [v=byts d=byts] |= [v=byts d=byts]
%- en-base58:mimes:html
=+ p=[(add wid.v wid.d) (can 3 ~[d v])] =+ p=[(add wid.v wid.d) (can 3 ~[d v])]
=- (can 3 ~[4^- p]) =- (can 3 ~[4^- p])
%^ rsh 3 28 %^ rsh 3 28
@ -213,4 +225,19 @@
++ hash160 ++ hash160
|= d=@ |= d=@
(ripemd-160:ripemd:crypto 32 (sha-256:sha d)) (ripemd-160:ripemd:crypto 32 (sha-256:sha d))
::
++ version-bytes
|= [network=?(%main %regtest %testnet) type=?(%pub %prv) bip32=?]
^- @ux
|^
?- type
%pub ?:(bip32 xpub-key pay-to-pubkey)
%prv ?:(bip32 xprv-key private-key)
==
::
++ pay-to-pubkey ?:(=(network %main) 0x0 0x6f)
++ private-key ?:(=(network %main) 0x80 0xef)
++ xpub-key ?:(=(network %main) 0x488.b21e 0x435.87cf)
++ xprv-key ?:(=(network %main) 0x488.ade4 0x435.8394)
--
-- --

View File

@ -168,8 +168,8 @@
(cu (cury slav %uv) so) (cu (cury slav %uv) so)
:: ::
++ re :: recursive reparsers ++ re :: recursive reparsers
|* {gar/* sef/_|.(fist:dejs-soft:format)} |* [gar=* sef=_|.(fist:dejs-soft:format)]
|= jon/json |= jon=json
^- (unit _gar) ^- (unit _gar)
=- ~! gar ~! (need -) - =- ~! gar ~! (need -) -
((sef) jon) ((sef) jon)

View File

@ -2,8 +2,8 @@
/+ base64, group-store, resource /+ base64, group-store, resource
|% |%
++ nu :: parse number as hex ++ nu :: parse number as hex
|= jon/json |= jon=json
?> ?=({$s *} jon) ?> ?=([%s *] jon)
(rash p.jon hex) (rash p.jon hex)
:: ::
++ hook-update-to-json ++ hook-update-to-json

View File

@ -1,50 +1,50 @@
|% |%
++ static :: freeze .mdh hoon subset ++ static :: freeze .mdh hoon subset
|= gen/hoon ^- {inf/(map term dime) elm/manx} |= gen=hoon ^- [inf=(map term dime) elm=manx]
?+ -.gen ?+ -.gen
=/ gen ~(open ap gen) =/ gen ~(open ap gen)
?: =(gen ^gen) ~|([%cram-dynamic -.gen] !!) ?: =(gen ^gen) ~|([%cram-dynamic -.gen] !!)
$(gen gen) $(gen gen)
:: ::
$xray [~ (single (shut gen))] %xray [~ (single (shut gen))]
^ [(malt (frontmatter p.gen)) (single (shut q.gen))] ^ [(malt (frontmatter p.gen)) (single (shut q.gen))]
== ==
:: ::
++ single :: unwrap one-elem marl ++ single :: unwrap one-elem marl
|= xml/marl ^- manx |= xml=marl ^- manx
?: ?=({* ~} xml) i.xml ?: ?=([* ~] xml) i.xml
~|(%many-elems !!) ~|(%many-elems !!)
:: ::
++ shut-mart :: xml attrs ++ 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 ++ shut :: as xml constant
|= gen/hoon ^- marl |= gen=hoon ^- marl
?+ -.gen ~|([%bad-xml -.gen] !!) ?+ -.gen ~|([%bad-xml -.gen] !!)
$dbug $(gen q.gen) %dbug $(gen q.gen)
:: ::
$xray %xray
[[n.g.p.gen (turn a.g.p.gen shut-mart)] $(gen [%mcts c.p.gen])]~ [[n.g.p.gen (turn a.g.p.gen shut-mart)] $(gen [%mcts c.p.gen])]~
:: ::
$mcts %mcts
?~ p.gen ~ ?~ p.gen ~
=- (weld - $(p.gen t.p.gen)) =- (weld - $(p.gen t.p.gen))
?^ -.i.p.gen $(gen [%xray i.p.gen]) ?^ -.i.p.gen $(gen [%xray i.p.gen])
~| [%shut-tuna -.i.p.gen] ~| [%shut-tuna -.i.p.gen]
?+ -.i.p.gen !! ?+ -.i.p.gen !!
$manx ?>(?=($xray -.p.i.p.gen) $(gen p.i.p.gen)) %manx ?>(?=(%xray -.p.i.p.gen) $(gen p.i.p.gen))
$marl ?>(?=($mcts -.p.i.p.gen) $(gen p.i.p.gen)) %marl ?>(?=(%mcts -.p.i.p.gen) $(gen p.i.p.gen))
== ==
== ==
:: ::
:: ::
++ frontmatter :: parse ~[[%foo 1] [%bar ~s2]] ++ frontmatter :: parse ~[[%foo 1] [%bar ~s2]]
|= gen/hoon ^- (list {term dime}) |= gen=hoon ^- (list [term dime])
?: ?=({$bust $null} gen) ~ ?: ?=([%bust %null] gen) ~
?: ?=($dbug -.gen) $(gen q.gen) ?: ?=(%dbug -.gen) $(gen q.gen)
?. ?=($clsg -.gen) ~|([%bad-frontmatter -.gen] !!) ?. ?=(%clsg -.gen) ~|([%bad-frontmatter -.gen] !!)
%+ turn p.gen %+ turn p.gen
|= gen/hoon |= gen=hoon
?. ?=(^ -.gen) ?. ?=(^ -.gen)
=/ gen ~(open ap gen) =/ gen ~(open ap gen)
?: =(gen ^gen) ~|([%bad-frontmatter-elem -.gen] !!) ?: =(gen ^gen) ~|([%bad-frontmatter-elem -.gen] !!)
@ -54,8 +54,8 @@
[q.hed (as-dime q.gen)] [q.hed (as-dime q.gen)]
:: ::
++ as-dime :: %foo ~.foo 0vbar etc ++ as-dime :: %foo ~.foo 0vbar etc
|= gen/hoon ^- dime |= gen=hoon ^- dime
?: ?=($dbug -.gen) $(gen q.gen) ?: ?=(%dbug -.gen) $(gen q.gen)
?. ?=({?($rock $sand) @ @} gen) ~|([%bad-literal gen] !!) ?. ?=([?(%rock %sand) @ @] gen) ~|([%bad-literal gen] !!)
+.gen +.gen
-- --

View File

@ -175,7 +175,7 @@
:: advance until :: advance until
:: ::
++ till ++ till
|= tub/nail |= tub=nail
^- (like (list @D)) ^- (like (list @D))
?~ q.tub ?~ q.tub
(fail tub) (fail tub)

View File

@ -9,7 +9,7 @@
~+ ^- (map term cord) ~+ ^- (map term cord)
%- molt ^- (list (pair term cord)) %- molt ^- (list (pair term cord))
:- [%class 'className'] :- [%class 'className']
=- (rash - (more next (cook |=(a/tape [(crip (cass a)) (crip a)]) (star alf)))) =- (rash - (more next (cook |=(a=tape [(crip (cass a)) (crip a)]) (star alf))))
''' '''
accept acceptCharset accessKey action allowFullScreen allowTransparency alt accept acceptCharset accessKey action allowFullScreen allowTransparency alt
async autoComplete autoFocus autoPlay cellPadding cellSpacing charSet checked async autoComplete autoFocus autoPlay cellPadding cellSpacing charSet checked
@ -27,12 +27,12 @@
:: ::
:: special handling for <pre urb:codemirror>foo</pre> :: special handling for <pre urb:codemirror>foo</pre>
++ urb-codemirror :: render code blocks ++ urb-codemirror :: render code blocks
|= src/manx ^- manx |= src=manx ^- manx
?> ?=({{$pre *} _;/(**) ~} src) ?> ?=([[%pre *] _;/(**) ~] src)
;codemirror(value "{v.i.a.g.i.c.src}"); ;codemirror(value "{v.i.a.g.i.c.src}");
:: ::
++ elem-to-react-json :: serialize DOM as json ++ elem-to-react-json :: serialize DOM as json
|= src/manx ^- json |= src=manx ^- json
?: ?=(_;/(**) src) ?: ?=(_;/(**) src)
(tape:enjs v.i.a.g.src) (tape:enjs v.i.a.g.src)
=+ atr=(molt `(list (pair mane tape))`a.g.src) =+ atr=(molt `(list (pair mane tape))`a.g.src)
@ -42,14 +42,14 @@
c+a+(turn c.src ..$) c+a+(turn c.src ..$)
gn+s+(mane-to-cord n.g.src) gn+s+(mane-to-cord n.g.src)
=< ga+(pairs:enjs (turn a.g.src .)) =< ga+(pairs:enjs (turn a.g.src .))
|= {a/mane b/tape} ^- {cord json} |= [a=mane b=tape] ^- [cord json]
:_ (tape:enjs b) :_ (tape:enjs b)
?^ a (mane-to-cord a) ?^ a (mane-to-cord a)
(~(gut by react-attrs) a a) (~(gut by react-attrs) a a)
== ==
:: ::
++ mane-to-cord :: namespaced xml names ++ mane-to-cord :: namespaced xml names
|=(a/mane `cord`?@(a a (rap 3 -.a ':' +.a ~))) |=(a=mane `cord`?@(a a (rap 3 -.a ':' +.a ~)))
-- --
:: ::
:::: ::::

View File

@ -6,19 +6,19 @@
=, format =, format
|% |%
++ atr-lines ++ atr-lines
|= atr/(map cord cord) |= atr=(map cord cord)
%+ turn (sort ~(tap by atr) |=({{a/@ @} {b/@ @}} (aor a b))) %+ turn (sort ~(tap by atr) |=([[a=@ @] [b=@ @]] (aor a b)))
|= {k/cord v/cord} |= [k=cord v=cord]
(rap 3 k ': ' v ~) (rap 3 k ': ' v ~)
:: ::
++ atr-key ;~(sfix (star ;~(less col prn)) col ace) ++ atr-key ;~(sfix (star ;~(less col prn)) col ace)
++ print ++ print
|= {atr/(map cord cord) src/wain} |= [atr=(map cord cord) src=wain]
?~ atr src ?~ atr src
['---' (welp (atr-lines atr) '---' src)] ['---' (welp (atr-lines atr) '---' src)]
++ parse ++ parse
=| atr/(map cord cord) =| atr=(map cord cord)
|= wan/wain ^+ [atr mud=''] |= wan=wain ^+ [atr mud='']
?~ wan [~ ''] ?~ wan [~ '']
?^ (rush i.wan (star ace)) ?^ (rush i.wan (star ace))
$(wan t.wan) $(wan t.wan)
@ -30,6 +30,6 @@
$(wan t.wan) $(wan t.wan)
=- $(wan t.wan, atr (~(put by atr) (crip key) (crip val))) =- $(wan t.wan, atr (~(put by atr) (crip key) (crip val)))
~| malformed-attribute+i.t.wan ~| malformed-attribute+i.t.wan
^- {key/tape ^ val/tape} ^- [key=tape ^ val=tape]
+>:(atr-key 1^1 (trip i.t.wan)) +>:(atr-key 1^1 (trip i.t.wan))
-- --

View File

@ -2,21 +2,21 @@
=, sole =, sole
|% |%
++ produce :: construct result ++ produce :: construct result
|* pro/* :: |* pro=* ::
[p=*(list tank) q=[%& p=[~ u=pro]]] :: [p=*(list tank) q=[%& p=[~ u=pro]]] ::
:: :: :: ::
++ print :: add output tank ++ print :: add output tank
|* {tan/tank res/(sole-result)} :: |* [tan=tank res=(sole-result)] ::
?@ res res :: ?@ res res ::
[p=[i=tan t=p.res] q=q.res] :: [p=[i=tan t=p.res] q=q.res] ::
:: :: :: ::
++ prompt :: construct prompt ++ prompt :: construct prompt
|* {pom/sole-prompt mor/(sole-dialog)} :: |* [pom=sole-prompt mor=(sole-dialog)] ::
[p=*(list tank) q=[%| p=pom q=mor]] :: [p=*(list tank) q=[%| p=pom q=mor]] ::
:: :: :: ::
++ curl :: fetch url ++ curl :: fetch url
=| usr/knot :: =| usr=knot ::
|* {pul/_purl:eyre fun/$-(httr:eyre *)} :: |* [pul=_purl:eyre fun=$-(httr:eyre *)] ::
:- p=*(list tank) :: :- p=*(list tank) ::
q=[%| p=`usr q=[pul %get ~ ~] r=fun] :: q=[%| p=`usr q=[pul %get ~ ~] r=fun] ::
:: :: :: ::
@ -24,10 +24,10 @@
[p=*(list tank) q=[%& ~]] :: [p=*(list tank) q=[%& ~]] ::
:: :: :: ::
++ parse :: parse by rule ++ parse :: parse by rule
|* {sef/rule fun/$-(* *)} :: |* [sef=rule fun=$-(* *)] ::
|= txt/sole-input :: |= txt=sole-input ::
=+ vex=(sef [0 0] txt) :: =+ vex=(sef [0 0] txt) ::
?: |(!=((lent txt) q.p.vex) ?=($~ q.vex)) :: ?: |(!=((lent txt) q.p.vex) ?=(~ q.vex)) ::
q.p.vex :: q.p.vex ::
(fun p.u.q.vex) :: (fun p.u.q.vex) ::
-- --

View File

@ -7,13 +7,13 @@
|% |%
:: NOTE: move these functions to zuse :: NOTE: move these functions to zuse
++ nu :: parse number as hex ++ nu :: parse number as hex
|= jon/json |= jon=json
?> ?=({$s *} jon) ?> ?=([%s *] jon)
(rash p.jon hex) (rash p.jon hex)
:: ::
++ re :: recursive reparsers ++ re :: recursive reparsers
|* {gar/* sef/_|.(fist:dejs-soft:format)} |* [gar=* sef=_|.(fist:dejs-soft:format)]
|= jon/json |= jon=json
^- (unit _gar) ^- (unit _gar)
=- ~! gar ~! (need -) - =- ~! gar ~! (need -) -
((sef) jon) ((sef) jon)
@ -319,7 +319,7 @@
++ post ++ post
%- ot %- ot
:~ [%author (su ;~(pfix sig fed:ag))] :~ [%author (su ;~(pfix sig fed:ag))]
[%index index] [%index index]
[%time-sent di] [%time-sent di]
[%contents (ar content)] [%contents (ar content)]
[%hash (mu nu)] [%hash (mu nu)]
@ -375,7 +375,7 @@
++ uid ++ uid
%- ot %- ot
:~ [%resource dejs:res] :~ [%resource dejs:res]
[%index index] [%index index]
== ==
:: ::
++ index (su ;~(pfix fas (more fas dem))) ++ index (su ;~(pfix fas (more fas dem)))

View File

@ -1,18 +0,0 @@
/- *group-store
|%
++ groups-to-json
|= grp=groups
^- json
=, enjs:format
%- pairs
%+ turn ~(tap by grp)
|= [pax=^path =group]
^- [@t json]
:- (spat pax)
(set-to-array group ship:enjs:format)
::
++ set-to-array
|* {a/(set) b/$-(* json)}
^- json
[%a (turn ~(tap in a) b)]
--

View File

@ -295,7 +295,7 @@
|= [a=(map @t json) b=$-(@t @t)] |= [a=(map @t json) b=$-(@t @t)]
^+ a ^+ a
=- (malt -) =- (malt -)
|- |-
^- (list [@t json]) ^- (list [@t json])
?~ a ~ ?~ a ~
:- [(b p.n.a) q.n.a] :- [(b p.n.a) q.n.a]
@ -304,13 +304,13 @@
$(a r.a) $(a r.a)
:: ::
++ of ++ of
|* wer/(pole {cord fist}) |* wer=(pole [cord fist])
|= jon/json |= jon=json
?> ?=({$o {@ *} $~ $~} jon) ?> ?=([%o [@ *] ~ ~] jon)
|- |-
?- wer ?- wer
:: {{key/@t wit/*} t/*} :: [[key=@t wit=*] t=*]
{{key/@t *} t/*} [[key=@t *] t=*]
=> .(wer [[* wit] *]=wer) => .(wer [[* wit] *]=wer)
?: =(key.wer (enkebab p.n.p.jon)) ?: =(key.wer (enkebab p.n.p.jon))
[key.wer ~|(val+q.n.p.jon (wit.wer q.n.p.jon))] [key.wer ~|(val+q.n.p.jon (wit.wer q.n.p.jon))]

View File

@ -10,7 +10,7 @@
:: ::
++ index ++ index
^- $-(json index:graph-store) ^- $-(json index:graph-store)
(su ;~(pfix net (more net dem))) (su ;~(pfix fas (more fas dem)))
:: ::
++ graph-index ++ graph-index
%- ot %- ot

View File

@ -5,49 +5,49 @@
+$ state [%2 pith-2] +$ state [%2 pith-2]
:: ::
++ pith-2 :: ++ pith-2 ::
$: eel/(set gill:gall) :: connect to $: eel=(set gill:gall) :: connect to
ray/(set well:gall) :: ray=(set well:gall) ::
fur/(map dude:gall (unit server)) :: servers fur=(map dude:gall (unit server)) :: servers
bin/(map bone source) :: terminals bin=(map bone source) :: terminals
== :: == ::
:: :: :: ::
++ server :: running server ++ server :: running server
$: syd/desk :: app identity $: syd=desk :: app identity
cas/case :: boot case cas=case :: boot case
== :: == ::
++ kill :: kill ring ++ kill :: kill ring
$: pos/@ud :: ring position $: pos=@ud :: ring position
num/@ud :: number of entries num=@ud :: number of entries
max/_60 :: max entries max=_60 :: max entries
old/(list (list @c)) :: entries proper old=(list (list @c)) :: entries proper
== :: == ::
++ source :: input device ++ source :: input device
$: edg/_80 :: terminal columns $: edg=_80 :: terminal columns
off/@ud :: window offset off=@ud :: window offset
kil/kill :: kill buffer kil=kill :: kill buffer
inx/@ud :: ring index inx=@ud :: ring index
fug/(map gill:gall (unit target)) :: connections fug=(map gill:gall (unit target)) :: connections
mir/(pair @ud stub) :: mirrored terminal mir=(pair @ud stub) :: mirrored terminal
== :: == ::
++ history :: past input ++ history :: past input
$: pos/@ud :: input position $: pos=@ud :: input position
num/@ud :: number of entries num=@ud :: number of entries
lay/(map @ud (list @c)) :: editing overlay lay=(map @ud (list @c)) :: editing overlay
old/(list (list @c)) :: entries proper old=(list (list @c)) :: entries proper
== :: == ::
++ search :: reverse-i-search ++ search :: reverse-i-search
$: pos/@ud :: search position $: pos=@ud :: search position
str/(list @c) :: search string str=(list @c) :: search string
== :: == ::
++ target :: application target ++ target :: application target
$: $= blt :: curr & prev belts $: $= blt :: curr & prev belts
%+ pair %+ pair
(unit dill-belt:dill) (unit dill-belt:dill)
(unit dill-belt:dill) (unit dill-belt:dill)
ris/(unit search) :: reverse-i-search ris=(unit search) :: reverse-i-search
hit/history :: all past input hit=history :: all past input
pom/sole-prompt :: static prompt pom=sole-prompt :: static prompt
inp/sole-command :: input state inp=sole-command :: input state
== :: == ::
-- --
:: :: :: :: :: ::
@ -144,14 +144,14 @@
+$ any-state ^any-state :: proxy +$ any-state ^any-state :: proxy
++ on-init se-abet:this(eel (deft-fish our.hid)) ++ on-init se-abet:this(eel (deft-fish our.hid))
++ diff-sole-effect-phat :: app event ++ diff-sole-effect-phat :: app event
|= {way/wire fec/sole-effect} |= [way=wire fec=sole-effect]
=< se-abet =< se-view =< se-abet =< se-view
=+ gyl=(de-gill way) =+ gyl=(de-gill way)
?: (se-aint gyl) +>.$ ?: (se-aint gyl) +>.$
(se-diff gyl fec) (se-diff gyl fec)
:: ::
++ peer :: ++ peer ::
|= pax/path |= pax=path
~| [%drum-unauthorized our+our.hid src+src.hid] :: ourself ~| [%drum-unauthorized our+our.hid src+src.hid] :: ourself
?> (team:title our.hid src.hid) :: or our own moon ?> (team:title our.hid src.hid) :: or our own moon
=< se-abet =< se-view =< se-abet =< se-view
@ -169,26 +169,31 @@
[~ sat] [~ sat]
:: ::
++ poke-dill-belt :: terminal event ++ poke-dill-belt :: terminal event
|= bet/dill-belt:dill |= bet=dill-belt:dill
=< se-abet =< se-view =< se-abet =< se-view
(se-belt bet) (se-belt bet)
:: ::
++ poke-dill-blit :: terminal output ++ poke-dill-blit :: terminal output
|= bit/dill-blit:dill |= bit=dill-blit:dill
se-abet:(se-blit-sys bit) se-abet:(se-blit-sys bit)
:: ::
++ poke-start :: start app ++ poke-start :: start app
|= wel/well:gall |= wel=well:gall
=< se-abet =< se-view =< se-abet =< se-view
(se-born & wel) (se-born & wel)
:: ::
++ poke-fade :: fade app
|= wel=well:gall
=< se-abet =< se-view
(se-fade wel)
::
++ poke-link :: connect app ++ poke-link :: connect app
|= gyl/gill:gall |= gyl=gill:gall
=< se-abet =< se-view =< se-abet =< se-view
(se-link gyl) (se-link gyl)
:: ::
++ poke-unlink :: disconnect app ++ poke-unlink :: disconnect app
|= gyl/gill:gall |= gyl=gill:gall
=< se-abet =< se-view =< se-abet =< se-view
(se-drop:(se-pull gyl) & gyl) (se-drop:(se-pull gyl) & gyl)
:: ::
@ -197,7 +202,7 @@
se-abet:(se-blit-sys `dill-blit:dill`[%qit ~]) se-abet:(se-blit-sys `dill-blit:dill`[%qit ~])
:: ::
++ poke-put :: write file ++ poke-put :: write file
|= {pax/path txt/@} |= [pax=path txt=@]
se-abet:(se-blit-sys [%sav pax txt]) :: se-abet:(se-blit-sys [%sav pax txt]) ::
:: ::
++ poke ++ poke
@ -210,6 +215,7 @@
%drum-put =;(f (f !<(_+<.f vase)) poke-put) %drum-put =;(f (f !<(_+<.f vase)) poke-put)
%drum-set-boot-apps =;(f (f !<(_+<.f vase)) poke-set-boot-apps) %drum-set-boot-apps =;(f (f !<(_+<.f vase)) poke-set-boot-apps)
%drum-start =;(f (f !<(_+<.f vase)) poke-start) %drum-start =;(f (f !<(_+<.f vase)) poke-start)
%drum-fade =;(f (f !<(_+<.f vase)) poke-fade)
%drum-unlink =;(f (f !<(_+<.f vase)) poke-unlink) %drum-unlink =;(f (f !<(_+<.f vase)) poke-unlink)
== ==
:: ::
@ -256,7 +262,7 @@
..on-load ..on-load
:: ::
++ reap-phat :: ack connect ++ reap-phat :: ack connect
|= {way/wire saw/(unit tang)} |= [way=wire saw=(unit tang)]
=< se-abet =< se-view =< se-abet =< se-view
=+ gyl=(de-gill way) =+ gyl=(de-gill way)
?~ saw ?~ saw
@ -273,7 +279,7 @@
+>.sign-arvo +>.sign-arvo
:: ::
++ take-coup-phat :: ack poke ++ take-coup-phat :: ack poke
|= {way/wire saw/(unit tang)} |= [way=wire saw=(unit tang)]
=< se-abet =< se-view =< se-abet =< se-view
?~ saw +> ?~ saw +>
=+ gyl=(de-gill way) =+ gyl=(de-gill way)
@ -283,14 +289,14 @@
>[%drum-coup-fail src.hid gyl]< >[%drum-coup-fail src.hid gyl]<
:: ::
++ take-onto :: ack start ++ take-onto :: ack start
|= {way/wire saw/(each suss:gall tang)} |= [way=wire saw=(each suss:gall tang)]
=< se-abet =< se-view =< se-abet =< se-view
?> ?=({@ @ ~} way) ?> ?=([@ @ ~] way)
?> (~(has by fur) i.t.way) ?> (~(has by fur) i.t.way)
=/ wel/well:gall [i.way i.t.way] =/ wel=well:gall [i.way i.t.way]
?- saw ?- saw
{%| *} (se-dump p.saw) [%| *] (se-dump p.saw)
{%& *} ?> =(q.wel p.p.saw) [%& *] ?> =(q.wel p.p.saw)
:: =. +>.$ (se-text "live {<p.saw>}") :: =. +>.$ (se-text "live {<p.saw>}")
+>.$(fur (~(put by fur) q.wel `[p.wel %da r.p.saw])) +>.$(fur (~(put by fur) q.wel `[p.wel %da r.p.saw]))
== ==
@ -311,7 +317,7 @@
== ==
:: ::
++ quit-phat :: ++ quit-phat ::
|= way/wire |= way=wire
=< se-abet =< se-view =< se-abet =< se-view
=+ gyl=(de-gill way) =+ gyl=(de-gill way)
~& [%drum-quit src.hid gyl] ~& [%drum-quit src.hid gyl]
@ -321,7 +327,7 @@
:: :: :: :: :: ::
++ se-abet :: resolve ++ se-abet :: resolve
^- (quip card:agent:gall state) ^- (quip card:agent:gall state)
=. . se-subze:se-adze:se-adit =. . se-subze:se-adze:se-subit:se-adit
:_ sat(bin (~(put by bin) ost dev)) :_ sat(bin (~(put by bin) ost dev))
^- (list card:agent:gall) ^- (list card:agent:gall)
?~ biz (flop moz) ?~ biz (flop moz)
@ -386,6 +392,17 @@
$(priorities t.priorities) $(priorities t.priorities)
-- --
:: ::
++ se-subit :: downdate servers
=/ ruf=(list term) ~(tap in ~(key by fur))
|- ^+ this
?~ ruf
this
?: (~(has in ray) [%home i.ruf])
$(ruf t.ruf)
=/ wire [%drum %fade i.ruf ~]
=. this (se-emit %pass wire %arvo %g %fade i.ruf %slay)
$(ruf t.ruf, fur (~(del by fur) i.ruf))
::
++ se-adze :: update connections ++ se-adze :: update connections
^+ . ^+ .
%+ roll %+ roll
@ -396,7 +413,7 @@
?: =(b %dojo) %.y ?: =(b %dojo) %.y
(aor a b) (aor a b)
=< .(con +>) =< .(con +>)
|: $:{gil/gill:gall con/_.} ^+ con |: $:,[gil=gill:gall con=_.] ^+ con
=. +>.$ con =. +>.$ con
?: (~(has by fug) gil) ?: (~(has by fug) gil)
+>.$ +>.$
@ -408,7 +425,7 @@
^+ . ^+ .
%- ~(rep by bin) %- ~(rep by bin)
=< .(con +>) =< .(con +>)
|: $:{{ost/bone dev/source} con/_.} ^+ con |: $:,[[ost=bone dev=source] con=_.] ^+ con
=+ xeno=se-subze-local:%_(con ost ost, dev dev) =+ xeno=se-subze-local:%_(con ost ost, dev dev)
xeno(ost ost.con, dev dev.con, bin (~(put by bin) ost dev.xeno)) xeno(ost ost.con, dev dev.con, bin (~(put by bin) ost dev.xeno))
:: ::
@ -416,21 +433,21 @@
^+ . ^+ .
%- ~(rep by fug) %- ~(rep by fug)
=< .(con +>) =< .(con +>)
|: $:{{gil/gill:gall *} con/_.} ^+ con |: $:,[[gil=gill:gall *] con=_.] ^+ con
=. +>.$ con =. +>.$ con
?: (~(has in eel) gil) ?: (~(has in eel) gil)
+>.$ +>.$
(se-nuke gil) (se-nuke gil)
:: ::
++ se-aint :: ignore result ++ se-aint :: ignore result
|= gyl/gill:gall |= gyl=gill:gall
^- ? ^- ?
?. (~(has by bin) ost) & ?. (~(has by bin) ost) &
=+ gyr=(~(get by fug) gyl) =+ gyr=(~(get by fug) gyl)
|(?=(~ gyr) ?=(~ u.gyr)) |(?=(~ gyr) ?=(~ u.gyr))
:: ::
++ se-alas :: recalculate index ++ se-alas :: recalculate index
|= gyl/gill:gall |= gyl=gill:gall
=+ [xin=0 wag=se-amor] =+ [xin=0 wag=se-amor]
|- ^+ +>.^$ |- ^+ +>.^$
?~ wag +>.^$(inx 0) ?~ wag +>.^$(inx 0)
@ -440,7 +457,7 @@
++ se-amor :: live targets ++ se-amor :: live targets
^- (list gill:gall) ^- (list gill:gall)
%+ skim ~(tap in eel) %+ skim ~(tap in eel)
|=(a/gill:gall ?=({~ ~ *} (~(get by fug) a))) |=(a=gill:gall ?=([~ ~ *] (~(get by fug) a)))
:: ::
++ se-anon :: rotate index ++ se-anon :: rotate index
=+ wag=se-amor =+ wag=se-amor
@ -456,14 +473,14 @@
`(snag inx `(list gill:gall)`wag) `(snag inx `(list gill:gall)`wag)
:: ::
++ se-belt :: handle input ++ se-belt :: handle input
|= bet/dill-belt:dill |= bet=dill-belt:dill
^+ +> ^+ +>
?: ?=({?($cru $hey $rez $yow) *} bet) :: target-agnostic ?: ?=([?(%cru %hey %rez %yow) *] bet) :: target-agnostic
?- bet ?- bet
{$cru *} (se-dump:(se-text (trip p.bet)) q.bet) [%cru *] (se-dump:(se-text (trip p.bet)) q.bet)
{$hey *} +>(mir [0 ~]) :: refresh [%hey *] +>(mir [0 ~]) :: refresh
{$rez *} +>(edg (dec p.bet)) :: resize window [%rez *] +>(edg (dec p.bet)) :: resize window
{$yow *} ~&([%no-yow -.bet] +>) [%yow *] ~&([%no-yow -.bet] +>)
== ==
=+ gul=se-agon =+ gul=se-agon
?: |(?=(~ gul) (se-aint u.gul)) ?: |(?=(~ gul) (se-aint u.gul))
@ -481,8 +498,17 @@
eel (~(put in eel) [our.hid q.wel]) eel (~(put in eel) [our.hid q.wel])
== ==
:: ::
++ se-fade :: delete server
|= wel=well:gall
^+ +>
?. (~(has in ray) wel)
(se-text "[fade not running {<p.wel>}/{<q.wel>}]")
%= +>
ray (~(del in ray) wel)
==
::
++ se-drop :: disconnect ++ se-drop :: disconnect
|= {pej/? gyl/gill:gall} |= [pej=? gyl=gill:gall]
^+ +> ^+ +>
=+ lag=se-agon =+ lag=se-agon
?. (~(has by fug) gyl) +>.$ ?. (~(has by fug) gyl) +>.$
@ -497,7 +523,7 @@
+>.$ +>.$
:: ::
++ se-tab :: print tab completions ++ se-tab :: print tab completions
|= tl/(list {=cord =tank}) |= tl=(list [=cord =tank])
^+ +> ^+ +>
=/ lots (gth (lent tl) 10) =/ lots (gth (lent tl) 10)
=/ long =/ long
@ -526,10 +552,10 @@
leaf+tape leaf+tape
:: ::
++ se-dump :: print tanks ++ se-dump :: print tanks
|= tac/(list tank) |= tac=(list tank)
^+ +> ^+ +>
=/ wol/wall =/ wol=wall
(zing (turn (flop tac) |=(a/tank (~(win re a) [0 edg])))) (zing (turn (flop tac) |=(a=tank (~(win re a) [0 edg]))))
|- ^+ +>.^$ |- ^+ +>.^$
?~ wol +>.^$ ?~ wol +>.^$
?. ((sane %t) (crip i.wol)) :: XX upstream validation ?. ((sane %t) (crip i.wol)) :: XX upstream validation
@ -538,35 +564,35 @@
$(wol t.wol, +>.^$ (se-blit %out (tuba i.wol))) $(wol t.wol, +>.^$ (se-blit %out (tuba i.wol)))
:: ::
++ se-join :: confirm connection ++ se-join :: confirm connection
|= gyl/gill:gall |= gyl=gill:gall
^+ +> ^+ +>
=. +> (se-text "[linked to {<gyl>}]") =. +> (se-text "[linked to {<gyl>}]")
?> ?=(~ (~(got by fug) gyl)) ?> ?=(~ (~(got by fug) gyl))
(se-alas(fug (~(put by fug) gyl `*target)) gyl) (se-alas(fug (~(put by fug) gyl `*target)) gyl)
:: ::
++ se-nuke :: teardown connection ++ se-nuke :: teardown connection
|= gyl/gill:gall |= gyl=gill:gall
^+ +> ^+ +>
(se-drop:(se-pull gyl) & gyl) (se-drop:(se-pull gyl) & gyl)
:: ::
++ se-klin :: disconnect app ++ se-klin :: disconnect app
|= gyl/gill:gall |= gyl=gill:gall
+>(eel (~(del in eel) gyl)) +>(eel (~(del in eel) gyl))
:: ::
++ se-link :: connect to app ++ se-link :: connect to app
|= gyl/gill:gall |= gyl=gill:gall
+>(eel (~(put in eel) gyl)) +>(eel (~(put in eel) gyl))
:: ::
++ se-blit :: give output ++ se-blit :: give output
|= bil/dill-blit:dill |= bil=dill-blit:dill
+>(biz [bil biz]) +>(biz [bil biz])
:: ::
++ se-blit-sys :: output to system ++ se-blit-sys :: output to system
|= bil/dill-blit:dill ^+ +> |= bil=dill-blit:dill ^+ +>
(se-emit %give %fact ~[/drum] %dill-blit !>(bil)) (se-emit %give %fact ~[/drum] %dill-blit !>(bil))
:: ::
++ se-show :: show buffer, raw ++ se-show :: show buffer, raw
|= lin/(pair @ud stub) |= lin=(pair @ud stub)
^+ +> ^+ +>
?: =(mir lin) +> ?: =(mir lin) +>
=. +> ?:(=(p.mir p.lin) +> (se-blit %hop p.lin)) =. +> ?:(=(p.mir p.lin) +> (se-blit %hop p.lin))
@ -574,7 +600,7 @@
+>(mir lin) +>(mir lin)
:: ::
++ se-just :: adjusted buffer ++ se-just :: adjusted buffer
|= {pom/stub lin/(pair @ud (list @c))} |= [pom=stub lin=(pair @ud (list @c))]
^+ +> ^+ +>
=/ pol (lent-char:klr pom) =/ pol (lent-char:klr pom)
=/ pos (add pol p.lin) =/ pos (add pol p.lin)
@ -604,7 +630,7 @@
%_(+> moz [+< moz]) %_(+> moz [+< moz])
:: ::
++ se-text :: return text ++ se-text :: return text
|= txt/tape |= txt=tape
^+ +> ^+ +>
?. ((sane %t) (crip txt)) :: XX upstream validation ?. ((sane %t) (crip txt)) :: XX upstream validation
~& bad-text+<`*`txt> ~& bad-text+<`*`txt>
@ -612,82 +638,82 @@
(se-blit %out (tuba txt)) (se-blit %out (tuba txt))
:: ::
++ se-poke :: send a poke ++ 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-emit %pass (en-gill gyl) %agent gyl %poke par)
:: ::
++ se-peer :: send a peer ++ se-peer :: send a peer
|= gyl/gill:gall |= gyl=gill:gall
=/ =path /sole/(cat 3 'drum_' (scot %p our.hid)) =/ =path /sole/(cat 3 'drum_' (scot %p our.hid))
%- se-emit(fug (~(put by fug) gyl ~)) %- se-emit(fug (~(put by fug) gyl ~))
[%pass (en-gill gyl) %agent gyl %watch path] [%pass (en-gill gyl) %agent gyl %watch path]
:: ::
++ se-pull :: cancel subscription ++ se-pull :: cancel subscription
|= gyl/gill:gall |= gyl=gill:gall
(se-emit %pass (en-gill gyl) %agent gyl %leave ~) (se-emit %pass (en-gill gyl) %agent gyl %leave ~)
:: ::
++ se-tame :: switch connection ++ se-tame :: switch connection
|= gyl/gill:gall |= gyl=gill:gall
^+ ta ^+ ta
~(. ta gyl (need (~(got by fug) gyl))) ~(. ta gyl (need (~(got by fug) gyl)))
:: ::
++ se-diff :: receive results ++ 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-abet:(ta-fec:(se-tame gyl) fec)
:: ::
++ ta :: per target ++ ta :: per target
|_ {gyl/gill:gall target} :: app and state |_ [gyl=gill:gall target] :: app and state
++ ta-abet :: resolve ++ ta-abet :: resolve
^+ ..ta ^+ ..ta
..ta(fug (~(put by fug) gyl ``target`+<+)) ..ta(fug (~(put by fug) gyl ``target`+<+))
:: ::
++ ta-poke |=(a/cage +>(..ta (se-poke gyl a))) :: poke gyl ++ ta-poke |=(a=cage +>(..ta (se-poke gyl a))) :: poke gyl
:: ::
++ ta-act :: send action ++ ta-act :: send action
|= act/sole-action |= act=sole-action
^+ +> ^+ +>
(ta-poke %sole-action !>(act)) (ta-poke %sole-action !>(act))
:: ::
++ ta-id (cat 3 'drum_' (scot %p our.hid)) :: per-ship duct id ++ ta-id (cat 3 'drum_' (scot %p our.hid)) :: per-ship duct id
:: ::
++ ta-aro :: hear arrow ++ ta-aro :: hear arrow
|= key/?($d $l $r $u) |= key=?(%d %l %r %u)
^+ +> ^+ +>
=. ris ~ =. ris ~
?- key ?- key
$d ?. =(num.hit pos.hit) %d ?. =(num.hit pos.hit)
(ta-mov +(pos.hit)) (ta-mov +(pos.hit))
?: =(0 (lent buf.say.inp)) ?: =(0 (lent buf.say.inp))
ta-bel ta-bel
(ta-hom:ta-nex %set ~) (ta-hom:ta-nex %set ~)
$l ?: =(0 pos.inp) ta-bel %l ?: =(0 pos.inp) ta-bel
+>(pos.inp (dec pos.inp)) +>(pos.inp (dec pos.inp))
$r ?: =((lent buf.say.inp) pos.inp) %r ?: =((lent buf.say.inp) pos.inp)
ta-bel ta-bel
+>(pos.inp +(pos.inp)) +>(pos.inp +(pos.inp))
$u ?:(=(0 pos.hit) ta-bel (ta-mov (dec pos.hit))) %u ?:(=(0 pos.hit) ta-bel (ta-mov (dec pos.hit)))
== ==
:: ::
++ ta-bel :: beep ++ ta-bel :: beep
.(..ta (se-blit %bel ~), q.blt ~) :: forget belt .(..ta (se-blit %bel ~), q.blt ~) :: forget belt
:: ::
++ ta-belt :: handle input ++ ta-belt :: handle input
|= bet/dill-belt:dill |= bet=dill-belt:dill
^+ +> ^+ +>
?< ?=({?($cru $hey $rez $yow) *} bet) :: target-specific ?< ?=([?(%cru %hey %rez %yow) *] bet) :: target-specific
=. blt [q.blt `bet] :: remember belt =. blt [q.blt `bet] :: remember belt
?- bet ?- bet
{$aro *} (ta-aro p.bet) [%aro *] (ta-aro p.bet)
{$bac *} ta-bac [%bac *] ta-bac
{$ctl *} (ta-ctl p.bet) [%ctl *] (ta-ctl p.bet)
{$del *} ta-del [%del *] ta-del
{$met *} (ta-met p.bet) [%met *] (ta-met p.bet)
{$ret *} ta-ret [%ret *] ta-ret
{$txt *} (ta-txt p.bet) [%txt *] (ta-txt p.bet)
== ==
:: ::
++ ta-det :: send edit ++ ta-det :: send edit
|= ted/sole-edit |= ted=sole-edit
^+ +> ^+ +>
%^ ta-act %^ ta-act
ta-id ta-id
@ -707,50 +733,50 @@
(ta-hom %del (dec pos.inp)) (ta-hom %del (dec pos.inp))
:: ::
++ ta-ctl :: hear control ++ ta-ctl :: hear control
|= key/@ud |= key=@ud
^+ +> ^+ +>
=. ris ?.(?=(?($g $r) key) ~ ris) =. ris ?.(?=(?(%g %r) key) ~ ris)
?+ key ta-bel ?+ key ta-bel
$a +>(pos.inp 0) %a +>(pos.inp 0)
$b (ta-aro %l) %b (ta-aro %l)
$c ta-bel %c ta-bel
$d ?^ buf.say.inp %d ?^ buf.say.inp
ta-del ta-del
?: (~(has in (deft-fish our.hid)) gyl) ?: (~(has in (deft-fish our.hid)) gyl)
+>(..ta (se-blit qit+~)) :: quit pier +>(..ta (se-blit qit+~)) :: quit pier
+>(..ta (se-klin gyl)) :: unlink app +>(..ta (se-klin gyl)) :: unlink app
$e +>(pos.inp (lent buf.say.inp)) %e +>(pos.inp (lent buf.say.inp))
$f (ta-aro %r) %f (ta-aro %r)
$g ?~ ris ta-bel %g ?~ ris ta-bel
(ta-hom(pos.hit num.hit, ris ~) [%set ~]) (ta-hom(pos.hit num.hit, ris ~) [%set ~])
$i ta-tab %i ta-tab
$k =+ len=(lent buf.say.inp) %k =+ len=(lent buf.say.inp)
?: =(pos.inp len) ?: =(pos.inp len)
ta-bel ta-bel
(ta-kil %r [pos.inp (sub len pos.inp)]) (ta-kil %r [pos.inp (sub len pos.inp)])
$l +>(..ta (se-blit %clr ~)) %l +>(..ta (se-blit %clr ~))
$n (ta-aro %d) %n (ta-aro %d)
$p (ta-aro %u) %p (ta-aro %u)
$r ?~ ris %r ?~ ris
+>(ris `[pos.hit ~]) +>(ris `[pos.hit ~])
?: =(0 pos.u.ris) ?: =(0 pos.u.ris)
ta-bel ta-bel
(ta-ser ~) (ta-ser ~)
$t =+ len=(lent buf.say.inp) %t =+ len=(lent buf.say.inp)
?: |(=(0 pos.inp) (lth len 2)) ?: |(=(0 pos.inp) (lth len 2))
ta-bel ta-bel
=+ sop=(sub pos.inp ?:(=(len pos.inp) 2 1)) =+ sop=(sub pos.inp ?:(=(len pos.inp) 2 1))
(ta-hom (rep:edit [sop 2] (flop (swag [sop 2] buf.say.inp)))) (ta-hom (rep:edit [sop 2] (flop (swag [sop 2] buf.say.inp))))
$u ?: =(0 pos.inp) %u ?: =(0 pos.inp)
ta-bel ta-bel
(ta-kil %l [0 pos.inp]) (ta-kil %l [0 pos.inp])
$v ta-bel %v ta-bel
$w ?: =(0 pos.inp) %w ?: =(0 pos.inp)
ta-bel ta-bel
=+ sop=(ta-pos %l %ace pos.inp) =+ sop=(ta-pos %l %ace pos.inp)
(ta-kil %l [(sub pos.inp sop) sop]) (ta-kil %l [(sub pos.inp sop) sop])
$x +>(..ta se-anon) %x +>(..ta se-anon)
$y ?: =(0 num.kil) %y ?: =(0 num.kil)
ta-bel ta-bel
(ta-hom (cat:edit pos.inp ta-yan)) (ta-hom (cat:edit pos.inp ta-yan))
== ==
@ -762,78 +788,78 @@
(ta-hom %del pos.inp) (ta-hom %del pos.inp)
:: ::
++ ta-erl :: hear local error ++ ta-erl :: hear local error
|= pos/@ud |= pos=@ud
ta-bel(pos.inp (min pos (lent buf.say.inp))) ta-bel(pos.inp (min pos (lent buf.say.inp)))
:: ::
++ ta-err :: hear remote error ++ ta-err :: hear remote error
|= pos/@ud |= pos=@ud
(ta-erl (~(transpose sole say.inp) pos)) (ta-erl (~(transpose sole say.inp) pos))
:: ::
++ ta-fec :: apply effect ++ ta-fec :: apply effect
|= fec/sole-effect |= fec=sole-effect
^+ +> ^+ +>
?- fec ?- fec
{$bel *} ta-bel [%bel *] ta-bel
{$blk *} +> [%blk *] +>
{$clr *} +>(..ta (se-blit fec)) [%clr *] +>(..ta (se-blit fec))
{$det *} (ta-got +.fec) [%det *] (ta-got +.fec)
{$err *} (ta-err p.fec) [%err *] (ta-err p.fec)
{$klr *} +>(..ta (se-blit %klr (make:klr p.fec))) [%klr *] +>(..ta (se-blit %klr (make:klr p.fec)))
{$mor *} |- ^+ +>.^$ [%mor *] |- ^+ +>.^$
?~ p.fec +>.^$ ?~ p.fec +>.^$
$(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec)) $(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec))
{$nex *} ta-nex [%nex *] ta-nex
{$pro *} (ta-pro +.fec) [%pro *] (ta-pro +.fec)
{$tab *} +>(..ta (se-tab p.fec)) [%tab *] +>(..ta (se-tab p.fec))
{$tan *} +>(..ta (se-dump p.fec)) [%tan *] +>(..ta (se-dump p.fec))
{$sag *} +>(..ta (se-blit fec)) [%sag *] +>(..ta (se-blit fec))
{$sav *} +>(..ta (se-blit fec)) [%sav *] +>(..ta (se-blit fec))
{$txt *} +>(..ta (se-text p.fec)) [%txt *] +>(..ta (se-text p.fec))
{$url *} +>(..ta (se-blit fec)) [%url *] +>(..ta (se-blit fec))
== ==
:: ::
++ ta-dog :: change cursor ++ ta-dog :: change cursor
|= ted/sole-edit |= ted=sole-edit
%_ +> %_ +>
pos.inp pos.inp
=+ len=(lent buf.say.inp) =+ len=(lent buf.say.inp)
%+ min len %+ min len
|- ^- @ud |- ^- @ud
?- ted ?- ted
{$del *} ?:((gth pos.inp p.ted) (dec pos.inp) pos.inp) [%del *] ?:((gth pos.inp p.ted) (dec pos.inp) pos.inp)
{$ins *} ?:((gte pos.inp p.ted) +(pos.inp) pos.inp) [%ins *] ?:((gte pos.inp p.ted) +(pos.inp) pos.inp)
{$mor *} |- ^- @ud [%mor *] |- ^- @ud
?~ p.ted pos.inp ?~ p.ted pos.inp
$(p.ted t.p.ted, pos.inp ^$(ted i.p.ted)) $(p.ted t.p.ted, pos.inp ^$(ted i.p.ted))
{$nop *} pos.inp [%nop *] pos.inp
{$set *} len [%set *] len
== ==
== ==
:: ::
++ ta-off :: reset buffer offset ++ ta-off :: reset buffer offset
|= ted/sole-edit |= ted=sole-edit
=? off (any:edit ted |=(a/sole-edit ?=($set -.a))) 0 =? off (any:edit ted |=(a=sole-edit ?=(%set -.a))) 0
+> +>
:: ::
++ ta-got :: apply change ++ ta-got :: apply change
|= cal/sole-change |= cal=sole-change
=^ ted say.inp (~(receive sole say.inp) cal) =^ ted say.inp (~(receive sole say.inp) cal)
(ta-dog:(ta-off ted.cal) ted) (ta-dog:(ta-off ted.cal) ted)
:: ::
++ ta-hom :: local edit ++ ta-hom :: local edit
|= ted/sole-edit |= ted=sole-edit
^+ +> ^+ +>
=. +> (ta-det:(ta-off ted) ted) =. +> (ta-det:(ta-off ted) ted)
(ta-dog(say.inp (~(commit sole say.inp) ted)) ted) (ta-dog(say.inp (~(commit sole say.inp) ted)) ted)
:: ::
++ ta-jump :: buffer pos ++ ta-jump :: buffer pos
|= {dir/?($l $r) til/?($ace $edg $wrd) pos/@ud} |= [dir=?(%l %r) til=?(%ace %edg %wrd) pos=@ud]
^- @ud ^- @ud
%- ?:(?=($l dir) sub add) %- ?:(?=(%l dir) sub add)
[pos (ta-pos dir til pos)] [pos (ta-pos dir til pos)]
:: ::
++ ta-kil :: kill selection ++ ta-kil :: kill selection
|= {dir/?($l $r) sel/{@ @}} |= [dir=?(%l %r) sel=[@ @]]
^+ +> ^+ +>
=+ buf=(swag sel buf.say.inp) =+ buf=(swag sel buf.say.inp)
%. (cut:edit sel) %. (cut:edit sel)
@ -841,8 +867,8 @@
kil kil
?. ?& ?=(^ old.kil) ?. ?& ?=(^ old.kil)
?=(^ p.blt) ?=(^ p.blt)
?| ?=({$ctl ?($k $u $w)} u.p.blt) ?| ?=([%ctl ?(%k %u %w)] u.p.blt)
?=({$met ?($d $bac)} u.p.blt) ?=([%met ?(%d %bac)] u.p.blt)
== == == ==
%= kil :: prepend %= kil :: prepend
num +(num.kil) num +(num.kil)
@ -853,32 +879,32 @@
pos num.kil pos num.kil
old :_ t.old.kil old :_ t.old.kil
?- dir ?- dir
$l (welp buf i.old.kil) %l (welp buf i.old.kil)
$r (welp i.old.kil buf) %r (welp i.old.kil buf)
== == == ==
== ==
:: ::
++ ta-met :: meta key ++ ta-met :: meta key
|= key/@ud |= key=@ud
^+ +> ^+ +>
=. ris ~ =. ris ~
?+ key ta-bel ?+ key ta-bel
$dot ?. &(?=(^ old.hit) ?=(^ i.old.hit)) :: last "arg" from hist %dot ?. &(?=(^ old.hit) ?=(^ i.old.hit)) :: last "arg" from hist
ta-bel ta-bel
=+ old=`(list @c)`i.old.hit =+ old=`(list @c)`i.old.hit
=+ sop=(ta-jump(buf.say.inp old) %l %ace (lent old)) =+ sop=(ta-jump(buf.say.inp old) %l %ace (lent old))
(ta-hom (cat:edit pos.inp (slag sop old))) (ta-hom (cat:edit pos.inp (slag sop old)))
:: ::
$bac ?: =(0 pos.inp) :: kill left-word %bac ?: =(0 pos.inp) :: kill left-word
ta-bel ta-bel
=+ sop=(ta-pos %l %edg pos.inp) =+ sop=(ta-pos %l %edg pos.inp)
(ta-kil %l [(sub pos.inp sop) sop]) (ta-kil %l [(sub pos.inp sop) sop])
:: ::
$b ?: =(0 pos.inp) :: jump left-word %b ?: =(0 pos.inp) :: jump left-word
ta-bel ta-bel
+>(pos.inp (ta-jump %l %edg pos.inp)) +>(pos.inp (ta-jump %l %edg pos.inp))
:: ::
$c ?: =(pos.inp (lent buf.say.inp)) :: capitalize %c ?: =(pos.inp (lent buf.say.inp)) :: capitalize
ta-bel ta-bel
=+ sop=(ta-jump %r %wrd pos.inp) =+ sop=(ta-jump %r %wrd pos.inp)
%- ta-hom(pos.inp (ta-jump %r %edg sop)) %- ta-hom(pos.inp (ta-jump %r %edg sop))
@ -886,20 +912,20 @@
^- (list @c) ^- (list @) :: XX unicode ^- (list @c) ^- (list @) :: XX unicode
(cuss `tape``(list @)`(swag [sop 1] buf.say.inp)) (cuss `tape``(list @)`(swag [sop 1] buf.say.inp))
:: ::
$d ?: =(pos.inp (lent buf.say.inp)) :: kill right-word %d ?: =(pos.inp (lent buf.say.inp)) :: kill right-word
ta-bel ta-bel
(ta-kil %r [pos.inp (ta-pos %r %edg pos.inp)]) (ta-kil %r [pos.inp (ta-pos %r %edg pos.inp)])
:: ::
$f ?: =(pos.inp (lent buf.say.inp)) :: jump right-word %f ?: =(pos.inp (lent buf.say.inp)) :: jump right-word
ta-bel ta-bel
+>(pos.inp (ta-jump %r %edg pos.inp)) +>(pos.inp (ta-jump %r %edg pos.inp))
:: ::
$r %- ta-hom(lay.hit (~(put by lay.hit) pos.hit ~)) %r %- ta-hom(lay.hit (~(put by lay.hit) pos.hit ~))
:- %set :: revert hist edit :- %set :: revert hist edit
?: =(pos.hit num.hit) ~ ?: =(pos.hit num.hit) ~
(snag (sub num.hit +(pos.hit)) old.hit) (snag (sub num.hit +(pos.hit)) old.hit)
:: ::
$t =+ a=(ta-jump %r %edg pos.inp) :: transpose words %t =+ a=(ta-jump %r %edg pos.inp) :: transpose words
=+ b=(ta-jump %l %edg a) =+ b=(ta-jump %l %edg a)
=+ c=(ta-jump %l %edg b) =+ c=(ta-jump %l %edg b)
?: =(b c) ?: =(b c)
@ -912,10 +938,10 @@
(rep:edit prev (swag next buf.say.inp)) (rep:edit prev (swag next buf.say.inp))
== ==
:: ::
?($u $l) :: upper/lower case ?(%u %l) :: upper/lower case
?: =(pos.inp (lent buf.say.inp)) ?: =(pos.inp (lent buf.say.inp))
ta-bel ta-bel
=+ case=?:(?=($u key) cuss cass) =+ case=?:(?=(%u key) cuss cass)
=+ sop=(ta-jump %r %wrd pos.inp) =+ sop=(ta-jump %r %wrd pos.inp)
=+ sel=[sop (ta-pos %r %edg sop)] =+ sel=[sop (ta-pos %r %edg sop)]
%- ta-hom %- ta-hom
@ -923,10 +949,10 @@
^- (list @c) ^- (list @) :: XX unicode ^- (list @c) ^- (list @) :: XX unicode
(case `tape``(list @)`(swag sel buf.say.inp)) (case `tape``(list @)`(swag sel buf.say.inp))
:: ::
$y ?. ?& ?=(^ old.kil) :: rotate & yank %y ?. ?& ?=(^ old.kil) :: rotate & yank
?=(^ p.blt) ?=(^ p.blt)
?| ?=({$ctl $y} u.p.blt) ?| ?=([%ctl %y] u.p.blt)
?=({$met $y} u.p.blt) ?=([%met %y] u.p.blt)
== == == ==
ta-bel ta-bel
=+ las=(lent ta-yan) =+ las=(lent ta-yan)
@ -935,7 +961,7 @@
== ==
:: ::
++ ta-mov :: move in history ++ ta-mov :: move in history
|= sop/@ud |= sop=@ud
^+ +> ^+ +>
?: =(sop pos.hit) +> ?: =(sop pos.hit) +>
%- %= ta-hom %- %= ta-hom
@ -961,24 +987,24 @@
== ==
:: ::
++ ta-pos :: buffer pos offset ++ ta-pos :: buffer pos offset
|= {dir/?($l $r) til/?($ace $edg $wrd) pos/@ud} |= [dir=?(%l %r) til=?(%ace %edg %wrd) pos=@ud]
^- @ud ^- @ud
%- ?- til $ace ace:offset %- ?- til %ace ace:offset
$edg edg:offset %edg edg:offset
$wrd wrd:offset %wrd wrd:offset
== ==
?- dir $l (flop (scag pos buf.say.inp)) ?- dir %l (flop (scag pos buf.say.inp))
$r (slag pos buf.say.inp) %r (slag pos buf.say.inp)
== ==
:: ::
++ ta-pro :: set prompt ++ ta-pro :: set prompt
|= pom/sole-prompt |= pom=sole-prompt
%_ +> %_ +>
pom pom
%_ pom %_ pom
cad cad
;: welp ;: welp
?. ?=($earl (clan:title p.gyl)) ?. ?=(%earl (clan:title p.gyl))
(cite:title p.gyl) (cite:title p.gyl)
(scow %p p.gyl) (scow %p p.gyl)
:: ::
@ -996,7 +1022,7 @@
(ta-act ta-id %tab pos.inp) (ta-act ta-id %tab pos.inp)
:: ::
++ ta-ser :: reverse search ++ ta-ser :: reverse search
|= ext/(list @c) |= ext=(list @c)
^+ +> ^+ +>
?: |(?=(~ ris) =(0 pos.u.ris)) ?: |(?=(~ ris) =(0 pos.u.ris))
ta-bel ta-bel
@ -1013,15 +1039,15 @@
(ta-mov(str.u.ris tot, pos.u.ris u.sup) (dec u.sup)) (ta-mov(str.u.ris tot, pos.u.ris u.sup) (dec u.sup))
:: ::
++ ta-txt :: hear text ++ ta-txt :: hear text
|= txt/(list @c) |= txt=(list @c)
^+ +> ^+ +>
?^ ris ?^ ris
(ta-ser txt) (ta-ser txt)
(ta-hom (cat:edit pos.inp txt)) (ta-hom (cat:edit pos.inp txt))
:: ::
++ ta-vew :: computed prompt ++ ta-vew :: computed prompt
^- {pom/stub lin/(pair @ud (list @c))} ^- [pom=stub lin=(pair @ud (list @c))]
=; vew/(pair (list @c) styx) =; vew=(pair (list @c) styx)
[(make:klr q.vew) pos.inp p.vew] [(make:klr q.vew) pos.inp p.vew]
?: vis.pom ?: vis.pom
:- buf.say.inp :: default prompt :- buf.say.inp :: default prompt
@ -1040,7 +1066,7 @@
++ edit :: produce sole-edits ++ edit :: produce sole-edits
|% |%
++ cat :: mass insert ++ cat :: mass insert
|= {pos/@ud txt/(list @c)} |= [pos=@ud txt=(list @c)]
^- sole-edit ^- sole-edit
:- %mor :- %mor
|- ^- (list sole-edit) |- ^- (list sole-edit)
@ -1048,7 +1074,7 @@
[[%ins pos i.txt] $(pos +(pos), txt t.txt)] [[%ins pos i.txt] $(pos +(pos), txt t.txt)]
:: ::
++ cut :: mass delete ++ cut :: mass delete
|= {pos/@ud num/@ud} |= [pos=@ud num=@ud]
^- sole-edit ^- sole-edit
:- %mor :- %mor
|- ^- (list sole-edit) |- ^- (list sole-edit)
@ -1056,30 +1082,30 @@
[[%del pos] $(num (dec num))] [[%del pos] $(num (dec num))]
:: ::
++ rep :: mass replace ++ rep :: mass replace
|= {{pos/@ud num/@ud} txt/(list @c)} |= [[pos=@ud num=@ud] txt=(list @c)]
^- sole-edit ^- sole-edit
:~ %mor :~ %mor
(cut pos num) (cut pos num)
(cat pos txt) (cat pos txt)
== ==
++ any :: matches? ++ any :: matches?
|= {a/sole-edit b/$-(sole-edit ?)} |= [a=sole-edit b=$-(sole-edit ?)]
^- ? ^- ?
?. ?=($mor -.a) (b a) ?. ?=(%mor -.a) (b a)
(lien p.a |=(c/sole-edit ^$(a c))) (lien p.a |=(c=sole-edit ^$(a c)))
-- --
++ offset :: calculate offsets ++ offset :: calculate offsets
|% |%
++ alnm :: alpha-numeric ++ alnm :: alpha-numeric
|= a/@ ^- ? |= a=@ ^- ?
?| &((gte a '0') (lte a '9')) ?| &((gte a '0') (lte a '9'))
&((gte a 'A') (lte a 'Z')) &((gte a 'A') (lte a 'Z'))
&((gte a 'a') (lte a 'z')) &((gte a 'a') (lte a 'z'))
== ==
:: ::
++ ace :: next whitespace ++ ace :: next whitespace
|= a/(list @) |= a=(list @)
=| {b/_| i/@ud} =| [b=_| i=@ud]
|- ^- @ud |- ^- @ud
?~ a i ?~ a i
=/ c !=(32 i.a) =/ c !=(32 i.a)
@ -1088,8 +1114,8 @@
$(i +(i), a t.a) $(i +(i), a t.a)
:: ::
++ edg :: next word boundary ++ edg :: next word boundary
|= a/(list @) |= a=(list @)
=| {b/_| i/@ud} =| [b=_| i=@ud]
|- ^- @ud |- ^- @ud
?~ a i ?~ a i
=/ c (alnm i.a) =/ c (alnm i.a)
@ -1098,8 +1124,8 @@
$(i +(i), a t.a) $(i +(i), a t.a)
:: ::
++ wrd :: next or current word ++ wrd :: next or current word
|= a/(list @) |= a=(list @)
=| i/@ud =| i=@ud
|- ^- @ud |- ^- @ud
?: |(?=(~ a) (alnm i.a)) i ?: |(?=(~ a) (alnm i.a)) i
$(i +(i), a t.a) $(i +(i), a t.a)
@ -1109,22 +1135,22 @@
=, dill =, dill
|% |%
++ make :: stub from styx ++ make :: stub from styx
|= a/styx ^- stub |= a=styx ^- stub
=| b/stye =| b=stye
%+ reel %+ reel
|- ^- stub |- ^- stub
%- zing %+ turn a %- zing %+ turn a
|= a/$@(@t (pair styl styx)) |= a=$@(@t (pair styl styx))
?@ a [b (tuba (trip a))]~ ?@ a [b (tuba (trip a))]~
^$(a q.a, b (styd p.a b)) ^$(a q.a, b (styd p.a b))
:: ::
|= {a/(pair stye (list @c)) b/stub} |= [a=(pair stye (list @c)) b=stub]
?~ b [a ~] ?~ b [a ~]
?. =(p.a p.i.b) [a b] ?. =(p.a p.i.b) [a b]
[[p.a (weld q.a q.i.b)] t.b] [[p.a (weld q.a q.i.b)] t.b]
:: ::
++ styd :: stye from styl ++ styd :: stye from styl
|= {a/styl b/stye} ^+ b :: with inheritance |= [a=styl b=stye] ^+ b :: with inheritance
:+ ?~ p.a p.b :+ ?~ p.a p.b
?~ u.p.a ~ ?~ u.p.a ~
(~(put in p.b) u.p.a) (~(put in p.b) u.p.a)
@ -1132,18 +1158,18 @@
(fall q.q.a q.q.b) (fall q.q.a q.q.b)
:: ::
++ lent-char ++ lent-char
|= a/stub ^- @ |= a=stub ^- @
(roll (lnts-char a) add) (roll (lnts-char a) add)
:: ::
++ lnts-char :: stub pair tail lengths ++ lnts-char :: stub pair tail lengths
|= a/stub ^- (list @) |= a=stub ^- (list @)
%+ turn a %+ turn a
|= a/(pair stye (list @c)) |= a=(pair stye (list @c))
(lent q.a) (lent q.a)
:: ::
++ brek :: index + incl-len of ++ brek :: index + incl-len of
|= {a/@ b/(list @)} :: stub pair w/ idx a |= [a=@ b=(list @)] :: stub pair w= idx a
=| {c/@ i/@} =| [c=@ i=@]
|- ^- (unit (pair @ @)) |- ^- (unit (pair @ @))
?~ b ~ ?~ b ~
=. c (add c i.b) =. c (add c i.b)
@ -1152,7 +1178,7 @@
$(i +(i), b t.b) $(i +(i), b t.b)
:: ::
++ slag :: slag stub, keep stye ++ slag :: slag stub, keep stye
|= {a/@ b/stub} |= [a=@ b=stub]
^- stub ^- stub
=+ c=(lnts-char b) =+ c=(lnts-char b)
=+ i=(brek a c) =+ i=(brek a c)
@ -1165,7 +1191,7 @@
(^slag (sub (snag p.u.i c) (sub q.u.i a)) q.n) (^slag (sub (snag p.u.i c) (sub q.u.i a)) q.n)
:: ::
++ scag :: scag stub, keep stye ++ scag :: scag stub, keep stye
|= {a/@ b/stub} |= [a=@ b=stub]
^- stub ^- stub
=+ c=(lnts-char b) =+ c=(lnts-char b)
=+ i=(brek a c) =+ i=(brek a c)
@ -1179,7 +1205,7 @@
(^scag (sub (snag p.u.i c) (sub q.u.i a)) q.n) (^scag (sub (snag p.u.i c) (sub q.u.i a)) q.n)
:: ::
++ swag :: swag stub, keep stye ++ swag :: swag stub, keep stye
|= {{a/@ b/@} c/stub} |= [[a=@ b=@] c=stub]
(scag b (slag a c)) (scag b (slag a c))
-- --
-- --

View File

@ -108,6 +108,10 @@
|= ~ =< abet |= ~ =< abet
(emit %pass /pack %arvo %d %flog %pack ~) (emit %pass /pack %arvo %d %flog %pack ~)
:: ::
++ poke-pass
|= =note-arvo =< abet
(emit %pass /helm/pass %arvo note-arvo)
::
++ take-wake-automass ++ take-wake-automass
|= [way=wire error=(unit tang)] |= [way=wire error=(unit tang)]
?^ error ?^ error
@ -122,7 +126,7 @@
== ==
:: ::
++ poke-send-hi ++ poke-send-hi
|= {her/ship mes/(unit tape)} =< abet |= [her=ship mes=(unit tape)] =< abet
%- emit %- emit
:* %pass /helm/hi/(scot %p her) :* %pass /helm/hi/(scot %p her)
%agent [her %hood] %poke %agent [her %hood] %poke
@ -131,7 +135,7 @@
:: ::
:: ::
++ poke-hi ++ poke-hi
|= mes/@t |= mes=@t
~| %poke-hi-fail ~| %poke-hi-fail
?: =(%fail mes) ?: =(%fail mes)
~& %poke-hi-fail ~& %poke-hi-fail
@ -139,33 +143,33 @@
abet:(flog %text "< {<src.bowl>}: {(trip mes)}") abet:(flog %text "< {<src.bowl>}: {(trip mes)}")
:: ::
++ poke-atom ++ poke-atom
|= ato/@ |= ato=@
=+ len=(scow %ud (met 3 ato)) =+ len=(scow %ud (met 3 ato))
=+ gum=(scow %p (mug ato)) =+ gum=(scow %p (mug ato))
=< abet =< abet
(flog %text "< {<src.bowl>}: atom: {len} bytes, mug {gum}") (flog %text "< {<src.bowl>}: atom: {len} bytes, mug {gum}")
:: ::
++ coup-hi ++ coup-hi
|= {pax/path cop/(unit tang)} =< abet |= [pax=path cop=(unit tang)] =< abet
?> ?=({@t ~} pax) ?> ?=([@t ~] pax)
(flog %text "hi {(trip i.pax)} {?~(cop "" "un")}successful") (flog %text "hi {(trip i.pax)} {?~(cop "" "un")}successful")
:: ::
++ poke-reload |=(all/(list term) (poke-reload-desk %home all)) ++ poke-reload |=(all=(list term) (poke-reload-desk %home all))
++ poke-reload-desk :: reload vanes ++ poke-reload-desk :: reload vanes
|: $:{syd/desk all/(list term)} =< abet |: $:,[syd=desk all=(list term)] =< abet
%- emil %- emil
%+ turn all %+ turn all
=+ top=`path`/(scot %p our.bowl)/[syd]/(scot %da now.bowl) =+ top=`path`/(scot %p our.bowl)/[syd]/(scot %da now.bowl)
=/ van/(list {term ~}) =/ van=(list [term ~])
:- zus=[%zuse ~] :- zus=[%zuse ~]
~(tap by dir:.^(arch %cy (welp top /sys/vane))) ~(tap by dir:.^(arch %cy (welp top /sys/vane)))
|= nam/@tas |= nam=@tas
=. nam =. nam
?. =(1 (met 3 nam)) ?. =(1 (met 3 nam))
nam nam
=/ zaz/(list {p/knot ~}) =/ zaz=(list [p=knot ~])
(skim van |=({a/term ~} =(nam (end 3 1 a)))) (skim van |=([a=term ~] =(nam (end 3 1 a))))
?> ?=({{@ ~} ~} zaz) ?> ?=([[@ ~] ~] zaz)
`term`p.i.zaz `term`p.i.zaz
=+ tip=(end 3 1 nam) =+ tip=(end 3 1 nam)
=+ zus==('z' tip) =+ zus==('z' tip)
@ -247,6 +251,7 @@
%helm-meld =;(f (f !<(_+<.f vase)) poke-meld) %helm-meld =;(f (f !<(_+<.f vase)) poke-meld)
%helm-moon =;(f (f !<(_+<.f vase)) poke-moon) %helm-moon =;(f (f !<(_+<.f vase)) poke-moon)
%helm-pack =;(f (f !<(_+<.f vase)) poke-pack) %helm-pack =;(f (f !<(_+<.f vase)) poke-pack)
%helm-pass =;(f (f !<(_+<.f vase)) poke-pass)
%helm-rekey =;(f (f !<(_+<.f vase)) poke-rekey) %helm-rekey =;(f (f !<(_+<.f vase)) poke-rekey)
%helm-reload =;(f (f !<(_+<.f vase)) poke-reload) %helm-reload =;(f (f !<(_+<.f vase)) poke-reload)
%helm-reload-desk =;(f (f !<(_+<.f vase)) poke-reload-desk) %helm-reload-desk =;(f (f !<(_+<.f vase)) poke-reload-desk)
@ -276,5 +281,6 @@
?>(?=(%wake +<.sign-arvo) +>.sign-arvo) ?>(?=(%wake +<.sign-arvo) +>.sign-arvo)
[%serv *] %+ take-bound t.wire [%serv *] %+ take-bound t.wire
?>(?=(%bound +<.sign-arvo) +>.sign-arvo) ?>(?=(%bound +<.sign-arvo) +>.sign-arvo)
[%pass *] abet
== ==
-- --

View File

@ -73,7 +73,7 @@
?~(+< +> $(+< t.+<, +> (emit i.+<))) ?~(+< +> $(+< t.+<, +> (emit i.+<)))
:: ::
++ render ++ render
|= {mez/tape sud/desk who/ship syd/desk} |= [mez=tape sud=desk who=ship syd=desk]
:^ %palm [" " ~ ~ ~] leaf+(weld "kiln: " mez) :^ %palm [" " ~ ~ ~] leaf+(weld "kiln: " mez)
~[leaf+"from {<sud>}" leaf+"on {<who>}" leaf+"to {<syd>}"] ~[leaf+"from {<sud>}" leaf+"on {<who>}" leaf+"to {<syd>}"]
:: ::
@ -113,7 +113,7 @@
``noun+!>(ota) ``noun+!>(ota)
:: ::
++ poke-commit ++ poke-commit
|= [mon/kiln-commit auto=?] |= [mon=kiln-commit auto=?]
=< abet =< abet
=. +>.$ (emit %pass /commit %arvo %c [%dirk mon]) =. +>.$ (emit %pass /commit %arvo %c [%dirk mon])
?. auto ?. auto
@ -124,7 +124,7 @@
(emit %pass way.commit-timer %arvo %b [%wait nex.commit-timer]) (emit %pass way.commit-timer %arvo %b [%wait nex.commit-timer])
:: ::
++ poke-autocommit ++ poke-autocommit
|= [mon/kiln-commit auto=?] |= [mon=kiln-commit auto=?]
=< abet =< abet
=. +>.$ (emit %pass /commit %arvo %c [%dirk mon]) =. +>.$ (emit %pass /commit %arvo %c [%dirk mon])
?. auto ?. auto
@ -147,7 +147,7 @@
abet:(emit %pass /mount %arvo %c [%mont pot u.bem]) abet:(emit %pass /mount %arvo %c [%mont pot u.bem])
:: ::
++ poke-unmount ++ poke-unmount
|= mon/kiln-unmount |= mon=kiln-unmount
?^ mon ?^ mon
=+ bem=(de-beam mon) =+ bem=(de-beam mon)
?~ bem ?~ bem
@ -157,7 +157,7 @@
abet:(emit %pass /unmount-point %arvo %c [%ogre mon]) abet:(emit %pass /unmount-point %arvo %c [%ogre mon])
:: ::
++ poke-track :: ++ poke-track ::
|= hos/kiln-sync |= hos=kiln-sync
?: (~(has by syn) hos) ?: (~(has by syn) hos)
abet:(spam (render "already tracking" [sud her syd]:hos) ~) abet:(spam (render "already tracking" [sud her syd]:hos) ~)
abet:abet:start-track:(auto hos) abet:abet:start-track:(auto hos)
@ -271,7 +271,7 @@
=. ..abet (render-ket "OTA cancelled (1), retrying" ~) =. ..abet (render-ket "OTA cancelled (1), retrying" ~)
(poke-internal `[ship desk]:u.ota) (poke-internal `[ship desk]:u.ota)
=. ..abet (render-ket "downloading OTA update" ~) =. ..abet (render-ket "downloading OTA update" ~)
=? aeon.u.ota ?=($w p.p.u.p.sign-arvo) =? aeon.u.ota ?=(%w p.p.u.p.sign-arvo)
ud:;;(cass:clay q.q.r.u.p.sign-arvo) ud:;;(cass:clay q.q.r.u.p.sign-arvo)
%: emit %: emit
%pass (make-wire /download) %arvo %c %pass (make-wire /download) %arvo %c
@ -337,7 +337,7 @@
-- --
:: ::
++ poke-sync :: ++ poke-sync ::
|= hos/kiln-sync |= hos=kiln-sync
?: (~(has by syn) hos) ?: (~(has by syn) hos)
abet:(spam (render "already syncing" [sud her syd]:hos) ~) abet:(spam (render "already syncing" [sud her syd]:hos) ~)
abet:abet:start-sync:(auto hos) abet:abet:start-sync:(auto hos)
@ -361,10 +361,10 @@
?: =(0 ~(wyt by syn)) ?: =(0 ~(wyt by syn))
[%leaf "no other syncs configured"]~ [%leaf "no other syncs configured"]~
%+ turn ~(tap in ~(key by syn)) %+ turn ~(tap in ~(key by syn))
|=(a/kiln-sync (render "sync configured" [sud her syd]:a)) |=(a=kiln-sync (render "sync configured" [sud her syd]:a))
:: ::
++ poke-unsync :: ++ poke-unsync ::
|= hus/kiln-unsync |= hus=kiln-unsync
?. (~(has by syn) hus) ?. (~(has by syn) hus)
abet:(spam (render "not syncing" [sud her syd]:hus) ~) abet:(spam (render "not syncing" [sud her syd]:hus) ~)
%* . abet:abet:stop:(auto hus) %* . abet:abet:stop:(auto hus)
@ -381,13 +381,13 @@
abet:(emit %pass /cancel %arvo %c [%drop a]) abet:(emit %pass /cancel %arvo %c [%drop a])
:: ::
++ poke-info ++ poke-info
|= {mez/tape tor/(unit toro)} |= [mez=tape tor=(unit toro)]
?~ tor ?~ tor
abet:(spam leaf+mez ~) abet:(spam leaf+mez ~)
abet:(emit:(spam leaf+mez ~) %pass /kiln %arvo %c [%info u.tor]) abet:(emit:(spam leaf+mez ~) %pass /kiln %arvo %c [%info u.tor])
:: ::
++ poke-rm ++ poke-rm
|= a/path |= a=path
=+ b=.^(arch %cy a) =+ b=.^(arch %cy a)
?~ fil.b ?~ fil.b
=+ ~[leaf+"No such file:" leaf+"{<a>}"] =+ ~[leaf+"No such file:" leaf+"{<a>}"]
@ -395,19 +395,19 @@
(poke-info "removed" `(fray a)) (poke-info "removed" `(fray a))
:: ::
++ poke-label ++ poke-label
|= {syd/desk lab/@tas} |= [syd=desk lab=@tas]
=+ pax=/(scot %p our)/[syd]/[lab] =+ pax=/(scot %p our)/[syd]/[lab]
(poke-info "labeled {(spud pax)}" `[syd %| lab]) (poke-info "labeled {(spud pax)}" `[syd %| lab])
:: ::
++ poke-schedule ++ poke-schedule
|= {where/path tym/@da eve/@t} |= [where=path tym=@da eve=@t]
=. where (welp where /sched) =. where (welp where /sched)
%+ poke-info "scheduled" %+ poke-info "scheduled"
=+ old=;;((map @da cord) (fall (file where) ~)) =+ old=;;((map @da cord) (fall (file where) ~))
`(foal where %sched !>((~(put by old) tym eve))) `(foal where %sched !>((~(put by old) tym eve)))
:: ::
++ poke-permission ++ poke-permission
|= {syd/desk pax/path pub/?} |= [syd=desk pax=path pub=?]
=< abet =< abet
%- emit %- emit
=/ =rite [%r ~ ?:(pub %black %white) ~] =/ =rite [%r ~ ?:(pub %black %white) ~]
@ -447,7 +447,7 @@
abet:(emit %pass /kiln %arvo %g %sear ship) abet:(emit %pass /kiln %arvo %g %sear ship)
:: ::
++ done ++ done
|= {way/wire saw/(unit error:ames)} |= [way=wire saw=(unit error:ames)]
~? ?=(^ saw) [%kiln-nack u.saw] ~? ?=(^ saw) [%kiln-nack u.saw]
abet abet
:: ::
@ -481,24 +481,24 @@
?>(?=(%mere +<.sign-arvo) +>.sign-arvo) ?>(?=(%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 :: ++ 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) abet:abet:(mere:(take way) are)
:: ::
++ take-coup-fancy :: ++ take-coup-fancy ::
|= {way/wire saw/(unit tang)} |= [way=wire saw=(unit tang)]
abet:abet:(coup-fancy:(take way) saw) abet:abet:(coup-fancy:(take way) saw)
:: ::
++ take-coup-spam :: ++ take-coup-spam ::
|= {way/wire saw/(unit tang)} |= [way=wire saw=(unit tang)]
~? ?=(^ saw) [%kiln-spam-lame u.saw] ~? ?=(^ saw) [%kiln-spam-lame u.saw]
abet abet
:: ::
++ take-mere-sync :: ++ take-mere-sync ::
|= {way/wire mes/(each (set path) (pair term tang))} |= [way=wire mes=(each (set path) (pair term tang))]
?> ?=({@ @ @ *} way) ?> ?=([@ @ @ *] way)
=/ hos/kiln-sync =/ hos=kiln-sync
:* syd=(slav %tas i.way) :* syd=(slav %tas i.way)
her=(slav %p i.t.way) her=(slav %p i.t.way)
sud=(slav %tas i.t.t.way) sud=(slav %tas i.t.t.way)
@ -508,9 +508,9 @@
abet:abet:(mere:(auto hos) mes) abet:abet:(mere:(auto hos) mes)
:: ::
++ take-writ-find-ship :: ++ take-writ-find-ship ::
|= {way/wire rot/riot} |= [way=wire rot=riot]
?> ?=({@ @ @ *} way) ?> ?=([@ @ @ *] way)
=/ hos/kiln-sync =/ hos=kiln-sync
:* syd=(slav %tas i.way) :* syd=(slav %tas i.way)
her=(slav %p i.t.way) her=(slav %p i.t.way)
sud=(slav %tas i.t.t.way) sud=(slav %tas i.t.t.way)
@ -520,9 +520,9 @@
abet:abet:(take-find-ship:(auto hos) rot) abet:abet:(take-find-ship:(auto hos) rot)
:: ::
++ take-writ-sync :: ++ take-writ-sync ::
|= {way/wire rot/riot} |= [way=wire rot=riot]
?> ?=({@ @ @ *} way) ?> ?=([@ @ @ *] way)
=/ hos/kiln-sync =/ hos=kiln-sync
:* syd=(slav %tas i.way) :* syd=(slav %tas i.way)
her=(slav %p i.t.way) her=(slav %p i.t.way)
sud=(slav %tas i.t.t.way) sud=(slav %tas i.t.t.way)
@ -546,7 +546,7 @@
:: ::
:: ::
++ spam ++ spam
|= mes/(list tank) |= mes=(list tank)
((slog mes) ..spam) ((slog mes) ..spam)
:: ::
++ auto ++ auto
@ -557,7 +557,7 @@
..auto(syn (~(put by syn) [syd her sud] let)) ..auto(syn (~(put by syn) [syd her sud] let))
:: ::
++ blab ++ blab
|= new/(list card:agent:gall) |= new=(list card:agent:gall)
^+ +> ^+ +>
+>.$(moz (welp new moz)) +>.$(moz (welp new moz))
:: ::
@ -598,7 +598,7 @@
(render "on sync" sud her syd) (render "on sync" sud her syd)
~ ~
start-sync start-sync
=. let ?. ?=($w p.p.u.rot) let ud:;;(cass:clay q.q.r.u.rot) =. let ?. ?=(%w p.p.u.rot) let ud:;;(cass:clay q.q.r.u.rot)
=/ =wire /kiln/sync/merg/[syd]/(scot %p her)/[sud] =/ =wire /kiln/sync/merg/[syd]/(scot %p her)/[sud]
:: germ: merge mode for sync merges :: germ: merge mode for sync merges
:: ::
@ -648,7 +648,7 @@
q.p.mes q.p.mes
== ==
:: ::
$no-ali-disc %no-ali-disc
:~ (render "sync activated" sud her syd) :~ (render "sync activated" sud her syd)
leaf+"note: blank desk {<sud>} on {<her>}" leaf+"note: blank desk {<sud>} on {<her>}"
== ==
@ -658,7 +658,7 @@
-- --
:: ::
++ work :: state machine ++ work :: state machine
|= syd/desk |= syd=desk
=/ ,per-desk =/ ,per-desk
%+ ~(gut by rem) syd %+ ~(gut by rem) syd
=+ *per-desk =+ *per-desk
@ -668,7 +668,7 @@
..work(rem (~(put by rem) syd auto gem her sud cas)) ..work(rem (~(put by rem) syd auto gem her sud cas))
:: ::
++ blab ++ blab
|= new/(list card:agent:gall) |= new=(list card:agent:gall)
^+ +> ^+ +>
+>.$(moz (welp new moz)) +>.$(moz (welp new moz))
:: ::
@ -685,7 +685,7 @@
(blab [%pass /kiln/[syd] %arvo %c [%merg syd her sud cas gem]] ~) (blab [%pass /kiln/[syd] %arvo %c [%merg syd her sud cas gem]] ~)
:: ::
++ fancy-merge :: send to self ++ 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])] =/ =cage [%kiln-merge !>([syd her sud cas gem])]
%- blab :_ ~ %- blab :_ ~
@ -694,9 +694,9 @@
++ spam ::|=(tang ((slog +<) ..spam)) ++ spam ::|=(tang ((slog +<) ..spam))
|*(* +>(..work (^spam +<))) |*(* +>(..work (^spam +<)))
++ merge ++ merge
|= {her/@p sud/@tas cas/case gim/?($auto germ)} |= [her=@p sud=@tas cas=case gim=?(%auto germ)]
^+ +> ^+ +>
?. ?=($auto gim) ?. ?=(%auto gim)
perform(auto |, gem gim, her her, cas cas, sud sud) perform(auto |, gem gim, her her, cas cas, sud sud)
?: =(0 ud:.^(cass:clay %cw /(scot %p our)/[syd]/(scot %da now))) ?: =(0 ud:.^(cass:clay %cw /(scot %p our)/[syd]/(scot %da now)))
=> $(gim %init) => $(gim %init)
@ -705,7 +705,7 @@
.(auto &) .(auto &)
:: ::
++ coup-fancy ++ coup-fancy
|= saw/(unit tang) |= saw=(unit tang)
?~ saw ?~ saw
+> +>
=+ :- "failed to set up conflict resolution scratch space" =+ :- "failed to set up conflict resolution scratch space"
@ -713,7 +713,7 @@
lose:(spam leaf+-< leaf+-> u.saw) lose:(spam leaf+-< leaf+-> u.saw)
:: ::
++ mere ++ mere
|= are/(each (set path) (pair term tang)) |= are=(each (set path) (pair term tang))
^+ +> ^+ +>
?: =(%meld gem) ?: =(%meld gem)
?: ?=(%& -.are) ?: ?=(%& -.are)
@ -786,27 +786,27 @@
?+ gem ?+ gem
(spam leaf+"strange auto" >gem< ~) (spam leaf+"strange auto" >gem< ~)
:: ::
$init %init
=+ :- "auto merge failed on strategy %init" =+ :- "auto merge failed on strategy %init"
"I'm out of ideas" "I'm out of ideas"
lose:(spam leaf+-< leaf+-> [>p.p.are< q.p.are]) lose:(spam leaf+-< leaf+-> [>p.p.are< q.p.are])
:: ::
$fine %fine
?. ?=($bad-fine-merge p.p.are) ?. ?=(%bad-fine-merge p.p.are)
=+ "auto merge failed on strategy %fine" =+ "auto merge failed on strategy %fine"
lose:(spam leaf+- >p.p.are< q.p.are) lose:(spam leaf+- >p.p.are< q.p.are)
=> (spam leaf+"%fine merge failed, trying %meet" ~) => (spam leaf+"%fine merge failed, trying %meet" ~)
perform(gem %meet) perform(gem %meet)
:: ::
$meet %meet
?. ?=($meet-conflict p.p.are) ?. ?=(%meet-conflict p.p.are)
=+ "auto merge failed on strategy %meet" =+ "auto merge failed on strategy %meet"
lose:(spam leaf+- >p.p.are< q.p.are) lose:(spam leaf+- >p.p.are< q.p.are)
=> (spam leaf+"%meet merge failed, trying %mate" ~) => (spam leaf+"%meet merge failed, trying %mate" ~)
perform(gem %mate) perform(gem %mate)
:: ::
$mate %mate
?. ?=($mate-conflict p.p.are) ?. ?=(%mate-conflict p.p.are)
=+ "auto merge failed on strategy %mate" =+ "auto merge failed on strategy %mate"
lose:(spam leaf+- >p.p.are< q.p.are) lose:(spam leaf+- >p.p.are< q.p.are)
=> .(gem %meld) => .(gem %meld)
@ -824,11 +824,11 @@
== ==
:: ::
++ tape-to-tanks ++ tape-to-tanks
|= a/tape ^- (list tank) |= a=tape ^- (list tank)
(scan a (more (just '\0a') (cook |=(a/tape leaf+a) (star prn)))) (scan a (more (just '\0a') (cook |=(a=tape leaf+a) (star prn))))
:: ::
++ tanks-if-any ++ tanks-if-any
|= {a/tape b/(list path) c/tape} ^- (list tank) |= [a=tape b=(list path) c=tape] ^- (list tank)
?: =(~ b) ~ ?: =(~ b) ~
(welp (tape-to-tanks "\0a{c}{a}") >b< ~) (welp (tape-to-tanks "\0a{c}{a}") >b< ~)
-- --

View File

@ -1,7 +1,7 @@
/- *invite-store /- *invite-store
/+ resource /+ resource
|% |%
++ slan |=(mod/@tas |=(txt/@ta (need (slaw mod txt)))) ++ slan |=(mod=@tas |=(txt=@ta (need (slaw mod txt))))
:: ::
++ seri ::: serial ++ seri ::: serial
=, dejs:format =, dejs:format

View File

@ -34,11 +34,11 @@
:: :: ++apex:en-json:html :: :: ++apex:en-json:html
++ apex ++ apex
=, en-json:html =, en-json:html
|= {val/json sor/$-(^ ?) rez/tape} |= [val=json sor=$-(^ ?) rez=tape]
^- tape ^- tape
?~ val (weld "null" rez) ?~ val (weld "null" rez)
?- -.val ?- -.val
$a %a
:- '[' :- '['
=. rez [']' rez] =. rez [']' rez]
!. !.
@ -47,9 +47,9 @@
?~ t.p.val ^$(val i.p.val) ?~ t.p.val ^$(val i.p.val)
^$(val i.p.val, rez [',' $(p.val t.p.val)]) ^$(val i.p.val, rez [',' $(p.val t.p.val)])
:: ::
$b (weld ?:(p.val "true" "false") rez) %b (weld ?:(p.val "true" "false") rez)
$n (weld (trip p.val) rez) %n (weld (trip p.val) rez)
$s %s
:- '"' :- '"'
=. rez ['"' rez] =. rez ['"' rez]
=+ viz=(trip p.val) =+ viz=(trip p.val)
@ -57,11 +57,11 @@
|- ^- tape |- ^- tape
?~ viz rez ?~ viz rez
=+ hed=(jesc i.viz) =+ hed=(jesc i.viz)
?: ?=({@ $~} hed) ?: ?=([@ ~] hed)
[i.hed $(viz t.viz)] [i.hed $(viz t.viz)]
(weld hed $(viz t.viz)) (weld hed $(viz t.viz))
:: ::
$o %o
:- '{' :- '{'
=. rez ['}' rez] =. rez ['}' rez]
=/ viz =/ viz

View File

@ -9,7 +9,7 @@
:: Like +rose except also produces line number :: Like +rose except also produces line number
:: ::
++ lily ++ lily
|* {los/tape sab/rule} |* [los=tape sab=rule]
=+ vex=(sab [[1 1] los]) =+ vex=(sab [[1 1] los])
?~ q.vex ?~ q.vex
[%| p=p.vex(q (dec q.p.vex))] [%| p=p.vex(q (dec q.p.vex))]
@ -142,9 +142,8 @@
`['' (~(play ut sut) wing+t.p.gen)] `['' (~(play ut sut) wing+t.p.gen)]
:: ::
[^ *] (both p.gen q.gen) [^ *] (both p.gen q.gen)
[%ktcn *] loop(gen p.gen)
[%brcn *] (grow q.gen) [%brcn *] (grow q.gen)
[%brvt *] (grow q.gen) [%brpt *] (grow q.gen)
[%cnts *] [%cnts *]
|- ^- (unit [term type]) |- ^- (unit [term type])
=* inner-loop $ =* inner-loop $
@ -165,13 +164,13 @@
[%hand *] ~ [%hand *] ~
[%ktbr *] loop(gen p.gen) [%ktbr *] loop(gen p.gen)
[%ktls *] (both p.gen q.gen) [%ktls *] (both p.gen q.gen)
[%ktpd *] loop(gen p.gen) [%ktpm *] loop(gen p.gen)
[%ktsg *] loop(gen p.gen) [%ktsg *] loop(gen p.gen)
[%ktwt *] loop(gen p.gen) [%ktwt *] loop(gen p.gen)
[%note *] loop(gen q.gen) [%note *] loop(gen q.gen)
[%sgzp *] (both p.gen q.gen) [%sgzp *] (both p.gen q.gen)
[%sgbn *] loop(gen q.gen) :: should check for hoon in p.gen [%sggr *] loop(gen q.gen) :: should check for hoon in p.gen
[%tsbn *] (change p.gen q.gen) [%tsgr *] (change p.gen q.gen)
[%tscm *] [%tscm *]
%+ replace %+ replace
loop(gen p.gen) loop(gen p.gen)
@ -185,7 +184,7 @@
[%lost *] loop(gen p.gen) [%lost *] loop(gen p.gen)
[%zpmc *] (both p.gen q.gen) [%zpmc *] (both p.gen q.gen)
[%zpts *] loop(gen p.gen) [%zpts *] loop(gen p.gen)
[%zpvt *] (both q.gen r.gen) [%zppt *] (both q.gen r.gen)
[%zpzp *] ~ [%zpzp *] ~
* *
=+ doz=~(open ap gen) =+ doz=~(open ap gen)

View File

@ -1,32 +1,32 @@
:: Fast type printing that's easy on the eyes or your money back :: Fast type printing that's easy on the eyes or your money back
:: ::
=> |% => |%
++ cape {p/(map @ud wine) q/wine} +$ cape [p=(map @ud wine) q=wine]
++ wine +$ wine
$@ $? $noun $@ $? %noun
$path %path
$type %type
$void %void
$wall %wall
$wool %wool
$yarn %yarn
== ==
$% {$mato p/term} $% [%mato p=term]
{$gate p/hoon q/type r/wine} [%gate p=hoon q=type r=wine]
{$core p/(list @ta) q/wine} [%core p=(list @ta) q=wine]
{$face p/term q/wine} [%face p=term q=wine]
{$list p/term q/wine} [%list p=term q=wine]
{$pear p/term q/@} [%pear p=term q=@]
{$bswt p/(list wine)} [%bcwt p=(list wine)]
{$plot p/(list wine)} [%plot p=(list wine)]
{$stop p/@ud} [%stop p=@ud]
{$tree p/term q/wine} [%tree p=term q=wine]
{$unit p/term q/wine} [%unit p=term q=wine]
== ==
-- --
|_ sut/type |_ sut=type
++ dash ++ dash
|= {mil/tape lim/char lam/tape} |= [mil=tape lim=char lam=tape]
^- tape ^- tape
=/ esc (~(gas in *(set @tD)) lam) =/ esc (~(gas in *(set @tD)) lam)
:- lim :- lim
@ -41,33 +41,33 @@
[i.mil $(mil t.mil)] [i.mil $(mil t.mil)]
['\\' ~(x ne (rsh 2 1 i.mil)) ~(x ne (end 2 1 i.mil)) $(mil t.mil)] ['\\' ~(x ne (rsh 2 1 i.mil)) ~(x ne (end 2 1 i.mil)) $(mil t.mil)]
:: ::
++ deal |=(lum/* (dish dole lum)) ++ deal |=(lum=* (dish dole lum))
++ dial ++ dial
|= ham/cape |= ham=cape
=+ gid=*(set @ud) =+ gid=*(set @ud)
=| top-level=? :: don't need circumfix punctuation =| top-level=? :: don't need circumfix punctuation
=< `tank`-:$ =< `tank`-:$
|% |%
++ many ++ many
|= haz/(list wine) |= haz=(list wine)
^- {(list tank) (set @ud)} ^- [(list tank) (set @ud)]
?~ haz [~ gid] ?~ haz [~ gid]
=^ mor gid $(haz t.haz) =^ mor gid $(haz t.haz)
=^ dis gid ^$(q.ham i.haz) =^ dis gid ^$(q.ham i.haz)
[[dis mor] gid] [[dis mor] gid]
:: ::
++ $ ++ $
^- {tank (set @ud)} ^- [tank (set @ud)]
?- q.ham ?- q.ham
$noun :_(gid [%leaf '*' ~]) %noun :_(gid [%leaf '*' ~])
$path :_(gid [%leaf '/' ~]) %path :_(gid [%leaf '/' ~])
$type :_(gid [%leaf '#' 't' ~]) %type :_(gid [%leaf '#' 't' ~])
$void :_(gid [%leaf '#' '!' ~]) %void :_(gid [%leaf '#' '!' ~])
$wool :_(gid [%leaf '*' '"' '"' ~]) %wool :_(gid [%leaf '*' '"' '"' ~])
$wall :_(gid [%leaf '*' '\'' '\'' ~]) %wall :_(gid [%leaf '*' '\'' '\'' ~])
$yarn :_(gid [%leaf '"' '"' ~]) %yarn :_(gid [%leaf '"' '"' ~])
{$mato *} :_(gid [%leaf '@' (trip p.q.ham)]) [%mato *] :_(gid [%leaf '@' (trip p.q.ham)])
{$gate *} [%gate *]
=^ sam gid =^ sam gid
?. ?=([%plot * * *] r.q.ham) ?. ?=([%plot * * *] r.q.ham)
?: ?=(%plot -.r.q.ham) ?: ?=(%plot -.r.q.ham)
@ -92,7 +92,7 @@
== ==
~ ~
:: ::
{$core *} [%core *]
=^ sam gid =^ sam gid
?. ?=([%plot * * ~] q.q.ham) ?. ?=([%plot * * ~] q.q.ham)
`gid `gid
@ -114,26 +114,26 @@
[[%leaf (rip 3 i.p.q.ham)] $(p.q.ham t.p.q.ham)] [[%leaf (rip 3 i.p.q.ham)] $(p.q.ham t.p.q.ham)]
~ ~
:: ::
{$face *} [%face *]
=^ cox gid $(q.ham q.q.ham) =^ cox gid $(q.ham q.q.ham)
:_(gid [%palm [['=' ~] ~ ~ ~] [%leaf (trip p.q.ham)] cox ~]) :_(gid [%palm [['=' ~] ~ ~ ~] [%leaf (trip p.q.ham)] cox ~])
:: ::
{$list *} [%list *]
=^ cox gid $(q.ham q.q.ham) =^ cox gid $(q.ham q.q.ham)
:_(gid [%rose [" " (weld (trip p.q.ham) "(") ")"] cox ~]) :_(gid [%rose [" " (weld (trip p.q.ham) "(") ")"] cox ~])
:: ::
{$bswt *} [%bcwt *]
=^ coz gid (many p.q.ham) =^ coz gid (many p.q.ham)
:_(gid [%rose [[' ' ~] ['?' '(' ~] [')' ~]] coz]) :_(gid [%rose [[' ' ~] ['?' '(' ~] [')' ~]] coz])
:: ::
{$plot *} [%plot *]
=^ coz gid (many p.q.ham) =^ coz gid (many p.q.ham)
:_(gid [%rose [[' ' ~] ['[' ~] [']' ~]] coz]) :_(gid [%rose [[' ' ~] ['[' ~] [']' ~]] coz])
:: ::
{$pear *} [%pear *]
:_(gid [%leaf '$' ~(rend co [%$ p.q.ham q.q.ham])]) :_(gid [%leaf '$' ~(rend co [%$ p.q.ham q.q.ham])])
:: ::
{$stop *} [%stop *]
=+ num=~(rend co [%$ %ud p.q.ham]) =+ num=~(rend co [%$ %ud p.q.ham])
?: (~(has in gid) p.q.ham) ?: (~(has in gid) p.q.ham)
:_(gid [%leaf '#' num]) :_(gid [%leaf '#' num])
@ -144,26 +144,26 @@
== ==
:_(gid [%palm [['.' ~] ~ ~ ~] [%leaf ['^' '#' num]] cox ~]) :_(gid [%palm [['.' ~] ~ ~ ~] [%leaf ['^' '#' num]] cox ~])
:: ::
{$tree *} [%tree *]
=^ cox gid $(q.ham q.q.ham) =^ cox gid $(q.ham q.q.ham)
:_(gid [%rose [" " (weld (trip p.q.ham) "(") ")"] cox ~]) :_(gid [%rose [" " (weld (trip p.q.ham) "(") ")"] cox ~])
:: ::
{$unit *} [%unit *]
=^ cox gid $(q.ham q.q.ham) =^ cox gid $(q.ham q.q.ham)
:_(gid [%rose [" " (weld (trip p.q.ham) "(") ")"] cox ~]) :_(gid [%rose [" " (weld (trip p.q.ham) "(") ")"] cox ~])
== ==
-- --
:: ::
++ dish !: ++ dish !:
|= {ham/cape lum/*} ^- tank |= [ham=cape lum=*] ^- tank
~| [%dish-h ?@(q.ham q.ham -.q.ham)] ~| [%dish-h ?@(q.ham q.ham -.q.ham)]
~| [%lump lum] ~| [%lump lum]
~| [%ham ham] ~| [%ham ham]
%- need %- need
=| gil/(set {@ud *}) =| gil=(set [@ud *])
|- ^- (unit tank) |- ^- (unit tank)
?- q.ham ?- q.ham
$noun %noun
%= $ %= $
q.ham q.ham
?: ?=(@ lum) ?: ?=(@ lum)
@ -173,7 +173,7 @@
[%noun ?:(?=(@ +.lum) [[%mato %$] ~] $(lum +.lum))] [%noun ?:(?=(@ +.lum) [[%mato %$] ~] $(lum +.lum))]
== ==
:: ::
$path %path
:- ~ :- ~
:+ %rose :+ %rose
[['/' ~] ['/' ~] ~] [['/' ~] ['/' ~] ~]
@ -183,7 +183,7 @@
?> ?=(@ -.lum) ?> ?=(@ -.lum)
[[%leaf (rip 3 -.lum)] $(lum +.lum)] [[%leaf (rip 3 -.lum)] $(lum +.lum)]
:: ::
$type %type
=+ tyr=|.((dial dole)) =+ tyr=|.((dial dole))
=+ vol=tyr(sut lum) =+ vol=tyr(sut lum)
=+ cis=;;(tank .*(vol [%9 2 %0 1])) =+ cis=;;(tank .*(vol [%9 2 %0 1]))
@ -191,7 +191,7 @@
[~ ~ ~ ~] [~ ~ ~ ~]
[[%leaf '#' 't' '/' ~] cis ~] [[%leaf '#' 't' '/' ~] cis ~]
:: ::
$wall %wall
:- ~ :- ~
:+ %rose :+ %rose
[[' ' ~] ['<' '|' ~] ['|' '>' ~]] [[' ' ~] ['<' '|' ~] ['|' '>' ~]]
@ -200,7 +200,7 @@
?@ lum !! ?@ lum !!
[[%leaf (trip ;;(@ -.lum))] $(lum +.lum)] [[%leaf (trip ;;(@ -.lum))] $(lum +.lum)]
:: ::
$wool %wool
:- ~ :- ~
:+ %rose :+ %rose
[[' ' ~] ['<' '<' ~] ['>' '>' ~]] [[' ' ~] ['<' '<' ~] ['>' '>' ~]]
@ -209,28 +209,28 @@
?@ lum !! ?@ lum !!
[(need ^$(q.ham %yarn, lum -.lum)) $(lum +.lum)] [(need ^$(q.ham %yarn, lum -.lum)) $(lum +.lum)]
:: ::
$yarn %yarn
[~ %leaf (dash (tape lum) '"' "\{")] [~ %leaf (dash (tape lum) '"' "\{")]
:: ::
$void %void
~ ~
:: ::
{$mato *} [%mato *]
?. ?=(@ lum) ?. ?=(@ lum)
~ ~
:+ ~ :+ ~
%leaf %leaf
?+ (rash p.q.ham ;~(sfix (cook crip (star low)) (star hig))) ?+ (rash p.q.ham ;~(sfix (cook crip (star low)) (star hig)))
~(rend co [%$ p.q.ham lum]) ~(rend co [%$ p.q.ham lum])
$$ ~(rend co [%$ %ud lum]) %$ ~(rend co [%$ %ud lum])
$t (dash (rip 3 lum) '\'' ~) %t (dash (rip 3 lum) '\'' ~)
$tas ['%' ?.(=(0 lum) (rip 3 lum) ['$' ~])] %tas ['%' ?.(=(0 lum) (rip 3 lum) ['$' ~])]
== ==
:: ::
{$gate *} [%gate *]
!! !!
:: ::
{$core *} [%core *]
:: XX needs rethinking for core metal :: XX needs rethinking for core metal
:: ?. ?=(^ lum) ~ :: ?. ?=(^ lum) ~
:: => .(lum `*`lum) :: => .(lum `*`lum)
@ -244,13 +244,13 @@
:: ?~(mur ~ [~ [[%leaf (rip 3 i.p.q.ham)] u.mur]]) :: ?~(mur ~ [~ [[%leaf (rip 3 i.p.q.ham)] u.mur]])
[~ (dial ham)] [~ (dial ham)]
:: ::
{$face *} [%face *]
=+ wal=$(q.ham q.q.ham) =+ wal=$(q.ham q.q.ham)
?~ wal ?~ wal
~ ~
[~ %palm [['=' ~] ~ ~ ~] [%leaf (trip p.q.ham)] u.wal ~] [~ %palm [['=' ~] ~ ~ ~] [%leaf (trip p.q.ham)] u.wal ~]
:: ::
{$list *} [%list *]
?: =(~ lum) ?: =(~ lum)
[~ %leaf '~' ~] [~ %leaf '~' ~]
=- ?~ tok =- ?~ tok
@ -265,7 +265,7 @@
~ ~
[~ u.for u.aft] [~ u.for u.aft]
:: ::
{$bswt *} [%bcwt *]
|- ^- (unit tank) |- ^- (unit tank)
?~ p.q.ham ?~ p.q.ham
~ ~
@ -274,7 +274,7 @@
$(p.q.ham t.p.q.ham) $(p.q.ham t.p.q.ham)
wal wal
:: ::
{$plot *} [%plot *]
=- ?~ tok =- ?~ tok
~ ~
[~ %rose [[' ' ~] ['[' ~] [']' ~]] u.tok] [~ %rose [[' ' ~] ['[' ~] [']' ~]] u.tok]
@ -282,7 +282,7 @@
|- ^- (unit (list tank)) |- ^- (unit (list tank))
?~ p.q.ham ?~ p.q.ham
~ ~
?: ?=({* ~} p.q.ham) ?: ?=([* ~] p.q.ham)
=+ wal=^$(q.ham i.p.q.ham) =+ wal=^$(q.ham i.p.q.ham)
?~(wal ~ [~ [u.wal ~]]) ?~(wal ~ [~ [u.wal ~]])
?@ lum ?@ lum
@ -295,25 +295,25 @@
~ ~
[~ u.gim u.myd] [~ u.gim u.myd]
:: ::
{$pear *} [%pear *]
?. =(lum q.q.ham) ?. =(lum q.q.ham)
~ ~
=. p.q.ham =. p.q.ham
(rash p.q.ham ;~(sfix (cook crip (star low)) (star hig))) (rash p.q.ham ;~(sfix (cook crip (star low)) (star hig)))
=+ fox=$(q.ham [%mato p.q.ham]) =+ fox=$(q.ham [%mato p.q.ham])
?> ?=({~ $leaf ^} fox) ?> ?=([~ %leaf ^] fox)
?: ?=(?($n $tas) p.q.ham) ?: ?=(?(%n %tas) p.q.ham)
fox fox
[~ %leaf '%' p.u.fox] [~ %leaf '%' p.u.fox]
:: ::
{$stop *} [%stop *]
?: (~(has in gil) [p.q.ham lum]) ~ ?: (~(has in gil) [p.q.ham lum]) ~
=+ kep=(~(get by p.ham) p.q.ham) =+ kep=(~(get by p.ham) p.q.ham)
?~ kep ?~ kep
~|([%stop-loss p.q.ham] !!) ~|([%stop-loss p.q.ham] !!)
$(gil (~(put in gil) [p.q.ham lum]), q.ham u.kep) $(gil (~(put in gil) [p.q.ham lum]), q.ham u.kep)
:: ::
{$tree *} [%tree *]
=- ?~ tok =- ?~ tok
~ ~
[~ %rose [[' ' ~] ['{' ~] ['}' ~]] u.tok] [~ %rose [[' ' ~] ['{' ~] ['}' ~]] u.tok]
@ -322,7 +322,7 @@
|- ^- (unit (list tank)) |- ^- (unit (list tank))
?: =(~ lum) ?: =(~ lum)
[~ tuk] [~ tuk]
?. ?=({n/* l/* r/*} lum) ?. ?=([n=* l=* r=*] lum)
~ ~
=+ rol=$(lum r.lum) =+ rol=$(lum r.lum)
?~ rol ?~ rol
@ -332,7 +332,7 @@
~ ~
$(lum l.lum, tuk [u.tim u.rol]) $(lum l.lum, tuk [u.tim u.rol])
:: ::
{$unit *} [%unit *]
?@ lum ?@ lum
?.(=(~ lum) ~ [~ %leaf '~' ~]) ?.(=(~ lum) ~ [~ %leaf '~' ~])
?. =(~ -.lum) ?. =(~ -.lum)
@ -344,17 +344,17 @@
== ==
:: ::
++ doge ++ doge
|= ham/cape |= ham=cape
=- ?+ woz woz =- ?+ woz woz
{$list * {$mato $'ta'}} %path [%list * [%mato %'ta']] %path
{$list * {$mato $'t'}} %wall [%list * [%mato %'t']] %wall
{$list * {$mato $'tD'}} %yarn [%list * [%mato %'tD']] %yarn
{$list * $yarn} %wool [%list * %yarn] %wool
== ==
^= woz ^= woz
^- wine ^- wine
?. ?=({$stop *} q.ham) ?. ?=([%stop *] q.ham)
?: ?& ?= {$bswt {$pear $n $0} {$plot {$pear $n $0} {$face *} ~} ~} ?: ?& ?= [%bcwt [%pear %n %0] [%plot [%pear %n %0] [%face *] ~] ~]
q.ham q.ham
=(1 (met 3 p.i.t.p.i.t.p.q.ham)) =(1 (met 3 p.i.t.p.i.t.p.q.ham))
== ==
@ -364,13 +364,13 @@
?~ may ?~ may
q.ham q.ham
=+ nul=[%pear %n 0] =+ nul=[%pear %n 0]
?. ?& ?=({$bswt *} u.may) ?. ?& ?=([%bcwt *] u.may)
?=({* * ~} p.u.may) ?=([* * ~] p.u.may)
|(=(nul i.p.u.may) =(nul i.t.p.u.may)) |(=(nul i.p.u.may) =(nul i.t.p.u.may))
== ==
q.ham q.ham
=+ din=?:(=(nul i.p.u.may) i.t.p.u.may i.p.u.may) =+ 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) =(p.q.ham p.q.i.t.p.din)
=(1 (met 3 p.i.p.din)) =(1 (met 3 p.i.p.din))
=(1 (met 3 p.i.t.p.din)) =(1 (met 3 p.i.t.p.din))
@ -378,10 +378,10 @@
:+ %list :+ %list
(cat 3 p.i.p.din p.i.t.p.din) (cat 3 p.i.p.din p.i.t.p.din)
q.i.p.din q.i.p.din
?: ?& ?= $: $plot ?: ?& ?= $: %plot
{$face *} [%face *]
{$face * $stop *} [%face * %stop *]
{{$face * $stop *} ~} [[%face * %stop *] ~]
== ==
din din
=(p.q.ham p.q.i.t.p.din) =(p.q.ham p.q.i.t.p.din)
@ -403,24 +403,24 @@
=+ gil=*(set type) =+ gil=*(set type)
=+ dex=[p=*(map type @) q=*(map @ wine)] =+ dex=[p=*(map type @) q=*(map @ wine)]
=< [q.p q] =< [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)] =- [p.tez (doge q.p.tez q.tez)]
^= tez ^= tez
^- {p/{p/(map type @) q/(map @ wine)} q/wine} ^- [p=[p=(map type @) q=(map @ wine)] q=wine]
?: (~(meet ut sut) -:!>(*type)) ?: (~(meet ut sut) -:!>(*type))
[dex %type] [dex %type]
?- sut ?- sut
$noun [dex sut] %noun [dex sut]
$void [dex sut] %void [dex sut]
{$atom *} [dex ?~(q.sut [%mato p.sut] [%pear p.sut u.q.sut])] [%atom *] [dex ?~(q.sut [%mato p.sut] [%pear p.sut u.q.sut])]
{$cell *} [%cell *]
=+ hin=$(sut p.sut) =+ hin=$(sut p.sut)
=+ yon=$(dex p.hin, sut q.sut) =+ yon=$(dex p.hin, sut q.sut)
:- p.yon :- p.yon
:- %plot :- %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) ?: ?=([[%$ * [[%$ @ *] ~ ~]] ~ ~] q.r.q.sut)
=/ dad $(sut p.sut) =/ dad $(sut p.sut)
:- p.dad :- p.dad
@ -428,8 +428,8 @@
[%gate q.n.q.q.n.q.r.q.sut sut(r.p.q %gold) q.dad] [%gate q.n.q.q.n.q.r.q.sut sut(r.p.q %gold) q.dad]
=+ yad=$(sut p.sut) =+ yad=$(sut p.sut)
:- p.yad :- p.yad
=+ ^= doy ^- {p/(list @ta) q/wine} =+ ^= doy ^- [p=(list @ta) q=wine]
?: ?=({$core *} q.yad) ?: ?=([%core *] q.yad)
[p.q.yad q.q.yad] [p.q.yad q.q.yad]
[~ q.yad] [~ q.yad]
:- %core :- %core
@ -441,7 +441,7 @@
%- ~(rep by (~(run by q.r.q.sut) |=(tome ~(wyt by q.+<)))) %- ~(rep by (~(run by q.r.q.sut) |=(tome ~(wyt by q.+<))))
|=([[@ a=@u] b=@u] (add a b)) |=([[@ a=@u] b=@u] (add a b))
%^ cat 3 %^ cat 3
?-(r.p.q.sut $gold '.', $iron '|', $lead '?', $zinc '&') ?-(r.p.q.sut %gold '.', %iron '|', %lead '?', %zinc '&')
=+ gum=(mug q.r.q.sut) =+ gum=(mug q.r.q.sut)
%+ can 3 %+ can 3
:~ [1 (add 'a' (mod gum 26))] :~ [1 (add 'a' (mod gum 26))]
@ -449,24 +449,24 @@
[1 (add 'a' (mod (div gum 676) 26))] [1 (add 'a' (mod (div gum 676) 26))]
== ==
:: ::
{$hint *} [%hint *]
$(sut q.sut) $(sut q.sut)
:: ::
{$face *} [%face *]
=+ yad=$(sut q.sut) =+ yad=$(sut q.sut)
?^(p.sut yad [p.yad [%face p.sut q.yad]]) ?^(p.sut yad [p.yad [%face p.sut q.yad]])
:: ::
{$fork *} [%fork *]
=+ yed=(sort ~(tap in p.sut) aor) =+ yed=(sort ~(tap in p.sut) aor)
=- [p [%bswt q]] =- [p [%bcwt q]]
|- ^- {p/{p/(map type @) q/(map @ wine)} q/(list wine)} |- ^- [p=[p=(map type @) q=(map @ wine)] q=(list wine)]
?~ yed ?~ yed
[dex ~] [dex ~]
=+ mor=$(yed t.yed) =+ mor=$(yed t.yed)
=+ dis=^$(dex p.mor, sut i.yed) =+ dis=^$(dex p.mor, sut i.yed)
[p.dis q.dis q.mor] [p.dis q.dis q.mor]
:: ::
{$hold *} [%hold *]
=+ hey=(~(get by p.dex) sut) =+ hey=(~(get by p.dex) sut)
?^ hey ?^ hey
[dex [%stop u.hey]] [dex [%stop u.hey]]

View File

@ -197,10 +197,6 @@
""" """
$\{1:iron-core} $\{1:iron-core}
""" """
:- '^%'
"""
$\{1:body}
"""
:- '^.' :- '^.'
""" """
$\{1:a} $\{1:a}

View File

@ -48,7 +48,7 @@
:: ::
++ nu ++ nu
|= jon=json |= jon=json
?> ?=({$s *} jon) ?> ?=([%s *] jon)
(rash p.jon hex) (rash p.jon hex)
:: ::
++ metadata ++ metadata

View File

@ -45,19 +45,19 @@
/lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes' /lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes'
|% |%
++ ins ::~/ %ins :: parse prefix ++ ins ::~/ %ins :: parse prefix
|= a/@tas |= a=@tas
=+ b=0 =+ b=0
|- ^- (unit @) |- ^- (unit @)
?:(=(256 b) ~ ?:(=(a (tos b)) [~ b] $(b +(b)))) ?:(=(256 b) ~ ?:(=(a (tos b)) [~ b] $(b +(b))))
++ ind ::~/ %ind :: parse suffix ++ ind ::~/ %ind :: parse suffix
|= a/@tas |= a=@tas
=+ b=0 =+ b=0
|- ^- (unit @) |- ^- (unit @)
?:(=(256 b) ~ ?:(=(a (tod b)) [~ b] $(b +(b)))) ?:(=(256 b) ~ ?:(=(a (tod b)) [~ b] $(b +(b))))
++ tos ::~/ %tos :: fetch prefix ++ tos ::~/ %tos :: fetch prefix
|=(a/@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] sis))) |=(a=@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] sis)))
++ tod ::~/ %tod :: fetch suffix ++ tod ::~/ %tod :: fetch suffix
|=(a/@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] dex))) |=(a=@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] dex)))
-- --
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eL, formatting (path) :: :: section 2eL, formatting (path) ::
@ -66,11 +66,11 @@
|% |%
++ hif (boss 256 ;~(plug tip tiq (easy ~))) ++ hif (boss 256 ;~(plug tip tiq (easy ~)))
++ huf %+ cook ++ 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)) ;~(plug hif ;~(pfix hep hif))
++ hyf (bass 0x1.0000.0000 ;~(plug huf ;~(pfix hep huf) (easy ~))) ++ hyf (bass 0x1.0000.0000 ;~(plug huf ;~(pfix hep huf) (easy ~)))
++ tip (sear |=(a/@ (ins:po a)) til) ++ tip (sear |=(a=@ (ins:po a)) til)
++ tiq (sear |=(a/@ (ind:po a)) til) ++ tiq (sear |=(a=@ (ind:po a)) til)
++ til (boss 256 (stun [3 3] low)) ++ til (boss 256 (stun [3 3] low))
-- --
++ ag ++ ag
@ -87,7 +87,7 @@
-- --
:: ::
++ mu ++ mu
|_ {top/@ bot/@} |_ [top=@ bot=@]
++ zag [p=(end 4 1 (add top bot)) q=bot] ++ zag [p=(end 4 1 (add top bot)) q=bot]
++ zig [p=(end 4 1 (add top (sub 0x1.0000 bot))) q=bot] ++ zig [p=(end 4 1 (add top (sub 0x1.0000 bot))) q=bot]
++ zug (mix (lsh 4 1 top) bot) ++ zug (mix (lsh 4 1 top) bot)
@ -98,16 +98,16 @@
++ un :: =(x (wred (wren x))) ++ un :: =(x (wred (wren x)))
|% |%
++ wren :: conceal structure ++ wren :: conceal structure
|= pyn/@ ^- @ |= pyn=@ ^- @
=+ len=(met 3 pyn) =+ len=(met 3 pyn)
?: =(0 len) ?: =(0 len)
0 0
=> .(len (dec len)) => .(len (dec len))
=+ mig=(zaft (xafo len (cut 3 [len 1] pyn))) =+ mig=(zaft (xafo len (cut 3 [len 1] pyn)))
%+ can 3 %+ can 3
%- flop ^- (list {@ @}) %- flop ^- (list [@ @])
:- [1 mig] :- [1 mig]
|- ^- (list {@ @}) |- ^- (list [@ @])
?: =(0 len) ?: =(0 len)
~ ~
=> .(len (dec len)) => .(len (dec len))
@ -115,27 +115,27 @@
[[1 mog] $(mig mog)] [[1 mog] $(mig mog)]
:: ::
++ wred :: restore structure ++ wred :: restore structure
|= cry/@ ^- @ |= cry=@ ^- @
=+ len=(met 3 cry) =+ len=(met 3 cry)
?: =(0 len) ?: =(0 len)
0 0
=> .(len (dec len)) => .(len (dec len))
=+ mig=(cut 3 [len 1] cry) =+ mig=(cut 3 [len 1] cry)
%+ can 3 %+ can 3
%- flop ^- (list {@ @}) %- flop ^- (list [@ @])
:- [1 (xaro len (zart mig))] :- [1 (xaro len (zart mig))]
|- ^- (list {@ @}) |- ^- (list [@ @])
?: =(0 len) ?: =(0 len)
~ ~
=> .(len (dec len)) => .(len (dec len))
=+ mog=(cut 3 [len 1] cry) =+ mog=(cut 3 [len 1] cry)
[[1 :(mix mig (end 3 1 len) (zyrt mog))] $(mig mog)] [[1 :(mix mig (end 3 1 len) (zyrt mog))] $(mig mog)]
:: ::
++ xafo |=({a/@ b/@} +((mod (add (dec b) a) 255))) ++ xafo |=([a=@ b=@] +((mod (add (dec b) a) 255)))
++ xaro |=({a/@ b/@} +((mod (add (dec b) (sub 255 (mod a 255))) 255))) ++ xaro |=([a=@ b=@] +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
:: ::
++ zaft :: forward 255-sbox ++ zaft :: forward 255-sbox
|= a/@D |= a=@D
=+ ^= b =+ ^= b
0xcc.75bc.86c8.2fb1.9a42.f0b3.79a0.92ca.21f6.1e41.cde5.fcc0. 0xcc.75bc.86c8.2fb1.9a42.f0b3.79a0.92ca.21f6.1e41.cde5.fcc0.
7e85.51ae.1005.c72d.1246.07e8.7c64.a914.8d69.d9f4.59c2.8038. 7e85.51ae.1005.c72d.1246.07e8.7c64.a914.8d69.d9f4.59c2.8038.
@ -151,7 +151,7 @@
(cut 3 [(dec a) 1] b) (cut 3 [(dec a) 1] b)
:: ::
++ zart :: reverse 255-sbox ++ zart :: reverse 255-sbox
|= a/@D |= a=@D
=+ ^= b =+ ^= b
0x68.4f07.ea1c.73c9.75c2.efc8.d559.5125.f621.a7a8.8591.5613. 0x68.4f07.ea1c.73c9.75c2.efc8.d559.5125.f621.a7a8.8591.5613.
dd52.40eb.65a2.60b7.4bcb.1123.ceb0.1bd6.3c84.2906.b164.19b3. dd52.40eb.65a2.60b7.4bcb.1123.ceb0.1bd6.3c84.2906.b164.19b3.
@ -167,7 +167,7 @@
(cut 3 [(dec a) 1] b) (cut 3 [(dec a) 1] b)
:: ::
++ zyft :: forward 256-sbox ++ zyft :: forward 256-sbox
|= a/@D |= a=@D
=+ ^= b =+ ^= b
0xbb49.b71f.b881.b402.17e4.6b86.69b5.1647.115f.dddb.7ca5. 0xbb49.b71f.b881.b402.17e4.6b86.69b5.1647.115f.dddb.7ca5.
8371.4bd5.19a9.b092.605d.0d9b.e030.a0cc.78ba.5706.4d2d. 8371.4bd5.19a9.b092.605d.0d9b.e030.a0cc.78ba.5706.4d2d.
@ -184,7 +184,7 @@
(cut 3 [a 1] b) (cut 3 [a 1] b)
:: ::
++ zyrt :: reverse 256-sbox ++ zyrt :: reverse 256-sbox
|= a/@D |= a=@D
=+ ^= b =+ ^= b
0x9fc8.2753.6e02.8fcf.8b35.2b20.5598.7caa.c9a9.30b0.9b48. 0x9fc8.2753.6e02.8fcf.8b35.2b20.5598.7caa.c9a9.30b0.9b48.
47ce.6371.80f6.407d.00dd.0aa5.ed10.ecb7.0f5a.5c3a.e605. 47ce.6371.80f6.407d.00dd.0aa5.ed10.ecb7.0f5a.5c3a.e605.

View File

@ -12,6 +12,7 @@
+$ unix-event +$ unix-event
%+ pair wire %+ pair wire
$% [%wack p=@] $% [%wack p=@]
[%what p=(list (pair path (cask)))]
[%whom p=ship] [%whom p=ship]
[%boot ? $%($>(%fake task:able:jael) $>(%dawn task:able:jael))] [%boot ? $%($>(%fake task:able:jael) $>(%dawn task:able:jael))]
unix-task unix-task
@ -60,14 +61,14 @@
%. directories %. directories
|= :: sal: all spurs to load from |= :: sal: all spurs to load from
:: ::
sal/(list spur) sal=(list spur)
^- unix-event ^- unix-event
:: ::
:: hav: all user files :: hav: all user files
:: ::
=; hav ~& user-files+(lent hav) =; hav ~& user-files+(lent hav)
[[%$ %sync ~] [%into %$ & hav]] [/c/sync [%into %$ & hav]]
=| hav/mode:clay =| hav=mode:clay
|- ^+ hav |- ^+ hav
?~ sal ~ ?~ sal ~
=. hav $(sal t.sal) =. hav $(sal t.sal)
@ -87,7 +88,7 @@
=? hav ?=(^ fil.lon) =? hav ?=(^ fil.lon)
:: XX this whitelist needs to be reviewed :: XX this whitelist needs to be reviewed
:: ::
?. ?= ?($css $hoon $html $js $json $md $png $txt $udon $umd) ?. ?= ?(%css %hoon %html %js %json %md %png %txt %udon %umd)
-.tyl -.tyl
:: ::
:: install only files with whitelisted marks :: install only files with whitelisted marks
@ -100,11 +101,11 @@
=; cot [[(flop `path`tyl) `[/text/plain cot]] hav] =; cot [[(flop `path`tyl) `[/text/plain cot]] hav]
^- octs ^- octs
?- tyl ?- tyl
{$json *} [%json *]
=/ dat .^(json %cx pax) =/ dat .^(json %cx pax)
(as-octt:mimes:html (en-json:html dat)) (as-octt:mimes:html (en-json:html dat))
:: ::
{$txt *} [%txt *]
=/ dat .^(wain %cx pax) =/ dat .^(wain %cx pax)
(as-octs:mimes:html (of-wain:format dat)) (as-octs:mimes:html (of-wain:format dat))
:: ::
@ -116,4 +117,47 @@
|- ^- mode:clay |- ^- mode:clay
?~ all hav ?~ all hav
$(all t.all, hav ^$(tyl [p.i.all tyl])) $(all t.all, hav ^$(tyl [p.i.all tyl]))
::
:: +file-ovum2: electric boogaloo
::
++ file-ovum2 |=(p=path `unix-event`[//arvo what/(user-files p)])
::
:: +user-files: all userspace hoon files
::
++ user-files
|= bas=path
%. directories:file-ovum
|= sal=(list spur)
^- (list (pair path (cask)))
::
:: hav: all user files
::
=| hav=(list (pair path (cask)))
|- ^+ hav
?~ sal ~
=. hav $(sal t.sal)
::
:: tyl: spur
::
=/ tyl i.sal
|- ^+ hav
::
:: pax: full path at `tyl`
:: lon: directory at `tyl`
::
=/ pax (weld bas (flop tyl))
=/ lon .^(arch %cy pax)
=? hav ?=(^ fil.lon)
::
:: install only hoon files for now
::
?. ?=([%hoon *] tyl)
hav
:_ hav
[(flop `path`t.tyl) hoon/.^(@t %cx pax)]
::
=/ all ~(tap by dir.lon)
|- ^+ hav
?~ all hav
$(all t.all, hav ^$(tyl [p.i.all tyl]))
-- --

420
pkg/arvo/lib/plume.hoon Normal file
View File

@ -0,0 +1,420 @@
/- *plum
::
:: This library includes `plume`, the actual pretty printing logic,
:: and a handful of utilities for constructing plums.
::
:: Generally, you'll just use `plume` like this:
::
:: ~(tall plume plum) :: Pretty print `plum` in tall mode.
:: ~(flat plume plum) :: Pretty print `plum` in wide mode.
::
:: There is probably no reason to look at the utility routines unless
:: you are writing something to generate `plum`s.
::
:: This is the pretty-printer. Use the `flat` arm to render a plum
:: into a single line and use the `tall` arm to get a nice multi-line
:: rendering that switches to wide mode if there's enough space.
::
:: For details about how this works and what exactly it does in various
:: cases, take a look at the docs for `plum`, `plumfmt`, and at the
:: docs on the arms of this door.
::
^? |%
++ plume
|_ =plum
::
:: An line, indented by `indent` spaces.
::
+$ line [indent=@ud text=tape]
::
:: An sequence of indented lines.
::
+$ block (list line)
::
:: +flat: print as a single line
::
++ flat
^- wain
text:linear
::
:: +tall: print as multiple lines
::
++ tall
^- wain
%+ turn window
|= line
(crip (runt [indent ' '] text))
::
:: +adjust: adjust lines to right
::
++ adjust
|= [tab=@ud =block] ^- ^block
(turn block |=([@ud tape] [(add tab +<-) +<+]))
::
:: Prepend `n` spaces to a tape.
::
++ prepend-spaces
|= [n=@ t=tape] ^- tape
(runt [n ' '] t)
::
:: +window: print as list of tabbed lines
::
++ window
^- block
~+ :: for random access
?@ plum [0 (trip plum)]~ :: trivial text
?- -.plum
::
:: %para: Line-wrappable paragraph. This is a stub; it should
:: wrap text to 40 characters.
::
%para
[0 +:linear]~
::
:: %sbrk: nested subexpression
::
:: This is an opportunity to switch to wide mode. First, try
:: rendered in wide mode. If that's possible and the result
:: isn't too big, use that. Otherwise recurse into the subplum
:: without switching to wide mode.
::
%sbrk
=/ sub kid.plum
?+ sub
window(plum sub)
[%tree *]
=/ wideresult
?~(wide.fmt.sub ~ [~ u=linear])
?: ?&(?=(^ wideresult) (lte length.u.wideresult 40))
[0 text.u.wideresult]~
window(plum sub)
==
::
:: %tree: Try to render a text tree in tall mode.
::
:: We want to render this in tall mode. First, verify that there
:: the plum has a tall render (if not, fall back to `linear`
:: formatting), then render all the subplums, and then render
:: them in one of three ways:
::
:: - If the `plumfmt` contains an `indef` and that indef has
:: no prefix, then this is a variable-arity rune with a
:: terminator: Use vertical formatting.
::
:: - If the `plumfmt` contains an `indef` and that indef DOES have
:: a prefix, then this is something that looks like a core: Use
:: `core-like` formatting.
::
:: - Otherwise, this is a rune with a fixed number of arguments
:: Render the subplums using backstep indentation.
::
:: There's also a special case where something has exactly one sub-plum.
:: where something has exactly one sub-block. For example, we
:: want this output:
::
:: |-
:: foo
::
%tree
?~ tall.fmt.plum [0 text:linear]~
=/ prelude (trip intro.u.tall.fmt.plum)
|^ =/ blocks (turn kids.plum |=(=^plum window(plum plum)))
=/ prelude (trip intro.u.tall.fmt.plum)
?~ indef.u.tall.fmt.plum
?: =(1 (lent blocks))
[[0 prelude] (zing blocks)]
(backstep prelude blocks)
=/ prefix (trip sigil.u.indef.u.tall.fmt.plum)
=/ finale (trip final.u.indef.u.tall.fmt.plum)
?~ blocks %+ weld
?~(prelude ~ [0 prelude]~)
?~(finale ~ [0 finale]~)
?~ prefix (running prelude blocks finale)
(core-like prelude prefix blocks finale)
--
==
::
:: Render a plum in tall-mode using backstep indentation. Here,
:: we are rendering things that look something like this:
::
:: :+ foo
:: bar
:: baz
::
++ backstep
|= [prelude=tape blocks=(list block)]
^- block
%- zing
=/ nkids (lent blocks)
=/ idx 1
|- ^- (list block)
?~ blocks ~
:_ $(blocks t.blocks, idx +(idx))
^- block
=/ indent (mul 2 (sub nkids idx))
?. =(1 idx) (adjust indent i.blocks)
(rune-inline-with-block prelude indent i.blocks)
::
:: To make things look a bit nicer, we want to put the first
:: sub-block on the same line as the rune. We want this:
::
:: :- foo
:: baz
::
:: Instead of this:
::
:: :-
:: foo
:: baz
::
:: This handles the "foo" case.
::
++ rune-inline-with-block
|= [rune=tape indent=@ blk=block]
^- block
=. indent (max indent (add 2 (lent rune)))
=. blk (adjust indent blk)
?~ rune blk
?~ blk [0 rune]~
:_ t.blk
:- 0
%+ weld rune
=/ spaces-btwn (sub indent.i.blk (lent rune))
(prepend-spaces spaces-btwn text.i.blk)
::
:: Render a tall hoon with running indentation. Here, we are
:: rendering things that look sopmething like:
::
:: :~ foo
:: bar
:: baz
:: ==
::
:: So, there's basically three cases here: Either the prelude
:: is a rune, the prelude is empty, or prelude is some other
:: random-ass thing.
::
:: - If there is no prelude, then just combine all of the
:: sub-blocks together unaltered.
:: - If it's a rune (two-characters wide), then combine the
:: rune and the first line into one line (separated by two
:: spaces) and indent the rest of the lines by four spaces.
:: - If the rune is some other random-ass thing (has a length
:: that isn't 0 or 2), then render the prelude alone on the
:: first line and then combine the sub-blocks together,
:: all indented by another two spaces.
::
:: Regardless, if there's a finale, stick it on the end without
:: any indentation.
::
++ running
|= [prelude=tape blocks=(list block) finale=tape]
^- block
=/ result=block (zing blocks)
=. result
?+ (lent prelude)
[[0 prelude] (adjust 2 result)] :: unusual prelude
%0 :: empty prelude
result
%2 :: rune prelude
(rune-inline-with-block prelude 4 result)
==
?~ finale result
(snoc result [0 finale])
::
:: This renders sub-blocks where each sub-block needs to be
:: prefixed by some tape. For example:
::
:: |%
:: ++ foo
:: bar
:: ++ baz
:: qux
:: --
::
++ core-like
|= [prelude=tape prefix=tape blocks=(list block) finale=tape]
^- block
=/ clear (add 2 (lent prefix))
=/ result
^- block
%- zing
^- (list block)
%+ turn blocks
|= blk=block
^- block
^+ +<
=* tab ?~(blk 0 (sub clear (min clear indent.i.blk)))
=. blk (adjust tab blk)
?~ blk ~
:_ t.blk
:- 0
%+ weld prefix
(runt [(sub indent.i.blk (lent prefix)) ' '] text.i.blk)
=. result
?~ finale result
(snoc result [0 finale])
?~ prelude result
[[0 prelude] result]
::
:: +linear: Render a plum onto a single line, even if it only has a
:: wide form.
::
++ linear
^- [length=@ud text=tape]
~+ :: ~+ for random access
?@ plum [(met 3 plum) (trip plum)] :: Just a cord.
?- -.plum
::
:: This is already in wide mode, so %sbrk nodes don't matter here.
::
%sbrk
linear(plum kid.plum)
::
:: %para: To write a wrappable text paragraph to a single line,
:: we just combine all the lines into one, interspersing single
:: spaces chars.
::
%para
|- ^- [length=@ud text=tape]
?~ lines.plum [0 ~]
=/ next $(lines.plum t.lines.plum)
=/ this [length=(met 3 i.lines.plum) text=(trip i.lines.plum)]
:- (add +(length.this) length.next)
(weld text.this `tape`[' ' text.next])
::
:: Render a text tree to a single line.
::
%tree
|^ ^- [length=@ud text=tape]
?~ wide.fmt.plum (force-wide window)
=/ body (render-body delimit.u.wide.fmt.plum kids.plum)
?~ enclose.u.wide.fmt.plum body
(wrap-with-enclose u.enclose.u.wide.fmt.plum body)
::
:: Given a list of subplums and a delimiter, render all the
:: subplums onto a single line, and combine them into a single
:: string by interspersing the delimiter.
::
++ render-body
|= [delimit=cord kids=(list ^plum)]
=/ stop (trip delimit)
|- ^- [length=@ud text=tape]
?~ kids [0 ~]
=/ next $(kids t.kids)
=/ this linear(plum i.kids)
?~ text.next this
:- :(add length.this (lent stop) length.next)
:(weld text.this stop text.next)
::
:: Wrap a wide-form-rendered result with the `enclose` cords
:: from its `plumefmt`.
::
++ wrap-with-enclose
|= [clamps=(pair cord cord) body=[length=@ text=tape]]
^- [length=@ud text=tape]
::
=/ close [(trip -.clamps) (trip +.clamps)]
:- :(add length.body (lent -.close) (lent +.close))
:(weld -.close text.body +.close)
::
:: Given the result of rendering a plum in tall form, combine
:: all the lines into one by separating each by two spaces.
::
++ force-wide
|= render=(list [@ud text=tape])
^- [length=@ud text=tape]
::
?~ render [0 ~]
=/ next (force-wide t.render)
:- :(add (lent text.i.render) 2 length.next)
?~(text.next text.i.render :(weld text.i.render " " text.next))
--
==
--
::
:: Convenience function to build a `plumfmt` for a rune with a fixed
:: number of parameters.
::
++ fixed
|= rune=@ta
^- plumfmt
[wide=`[' ' `[(cat 3 +< '(') ')']] tall=`[+< ~]]
::
:: Same as `fixed` but only outputs in `tall` mode.
::
++ tall-fixed
|= rune=cord
^- (unit [cord (unit [cord cord])])
`[rune ~]
::
:: Convenience function to build a the `tall` part of a `plumfmt` for
:: a running-style rune (one that takes a variable number of parameters
:: and has a terminator).
::
++ tall-running
|= [rune=cord sigil=cord term=cord]
^- (unit [cord (unit [cord cord])])
`[rune `[sigil term]]
::
:: Convenience function for rendering a rune into a plum. This takes
:: a rune, an optional tall-form terminator, optionally a short-form (if
:: you don't supply a short-form, it'll just construct the standard
:: wide-form (e.g. "?~(x x ~)") for you, and a list of sub-plums.
::
++ rune
|= $: rune=cord
term=(unit cord)
short=(unit [cord cord cord])
kids=(list plum)
==
^. plum
|^ :- %sbrk
:+ %tree
:- (rune-wide-form rune short)
?~ term (tall-fixed rune)
(tall-running rune '' u.term)
kids
::
:: If you just give this a rune, it'll build the standard wide-form.
:: Otherwise, it'll just use the one that you gave it.
::
++ rune-wide-form
|= [rune=cord short=(unit [fst=cord mid=cord lst=cord])]
^- (unit (pair cord (unit [cord cord])))
=* fst (cat 3 rune '(')
=* std `[' ' `[fst ')']]
?~ short std
`[mid.u.short `[fst.u.short lst.u.short]]
--
::
:: Just a helper function for constructing a wide-form %tree plum.
::
++ simple-wide
|= [init=cord sep=cord end=cord kids=(list plum)]
^- plum
=/ fmt=plumfmt [wide=[~ sep [~ init end]] tall=~]
[%tree fmt kids]
::
:: Convenience function that builds a plum for a subexpression. The
:: `%sbrk` tells the pretty-printer that this is a valid place to
:: switch from tall mode to wide mode.
::
++ subtree
|= [p=plumfmt q=(list plum)]
^- plum
[%sbrk [%tree p q]]
::
:: Convenience for generating plums that look like s-expressions. Useful
:: for quickly getting decent-looking debug output.
::
++ sexp
|= [sym=cord kids=(list plum)]
^- plum
=/ head=cord (cat 3 '(' sym)
=/ headspc=cord (cat 3 head ' ')
=/ symcol=cord (cat 3 sym ':')
=/ fmt=plumfmt [[~ ' ' [~ headspc ')']] [~ symcol [~ '' '']]]
?~ kids (cat 3 '(' (cat 3 sym ')'))
[%sbrk [%tree fmt kids]]
--

View File

@ -1,4 +1,6 @@
/+ libxray=xray /- *plum, *xray
/+ *plume,
libxray=xray
:: ::
:: This code pretty-prints a variety of things using the `xray` and :: This code pretty-prints a variety of things using the `xray` and
:: `plum` libraries: :: `plum` libraries:
@ -117,14 +119,18 @@
++ type-to-tank ++ type-to-tank
|= t=type |= t=type
^- tank ^- tank
[%plum (type-to-plum t)] :+ %rose [~ ~ ~]
%+ turn (render-type t)
|=(=cord leaf+(trip cord))
:: ::
:: Pretty-print a vase to a tank. :: Pretty-print a vase to a tank.
:: ::
++ vase-to-tank ++ vase-to-tank
|= v=vase |= v=vase
^- tank ^- tank
[%plum (vase-to-plum v)] :+ %rose [~ ~ ~]
%+ turn (render-vase v)
|=(=cord leaf+(trip cord))
:: ::
:: Render an `axis`. :: Render an `axis`.
:: ::
@ -151,7 +157,7 @@
limb limb
?- -.limb ?- -.limb
%& (axis-to-cord p.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)))) %| (crip (runt [0 p.limb] ?~(q.limb "," (trip u.q.limb))))
== ==
:: ::
@ -340,7 +346,7 @@
[%brsg *] (rune '|~' ~ ~ (spec p.x) (hn q.x) ~) [%brsg *] (rune '|~' ~ ~ (spec p.x) (hn q.x) ~)
[%brtr *] (rune '|*' ~ ~ (spec p.x) (hn q.x) ~) [%brtr *] (rune '|*' ~ ~ (spec p.x) (hn q.x) ~)
[%brts *] (rune '|=' ~ ~ (spec p.x) (hn q.x) ~) [%brts *] (rune '|=' ~ ~ (spec p.x) (hn q.x) ~)
[%brvt *] (chapter '|@' ~ q.x) :: Ignoring p.x [%brpt *] (chapter '|@' ~ q.x) :: Ignoring p.x
[%brwt *] (rune '|?' ~ ~ (hn p.x) ~) [%brwt *] (rune '|?' ~ ~ (hn p.x) ~)
[%clcb *] (rune ':_' ~ ~ (hoons ~[p q]:x)) [%clcb *] (rune ':_' ~ ~ (hoons ~[p q]:x))
[%clkt *] (rune ':^' ~ ~ (hoons ~[p q r s]:x)) [%clkt *] (rune ':^' ~ ~ (hoons ~[p q r s]:x))
@ -366,11 +372,10 @@
[%dtts *] (rune '.=' ~ `['=(' spc ')'] (hoons ~[p q]:x)) [%dtts *] (rune '.=' ~ `['=(' spc ')'] (hoons ~[p q]:x))
[%dtwt *] (rune '.?' ~ ~ (hoons ~[p.x])) [%dtwt *] (rune '.?' ~ ~ (hoons ~[p.x]))
[%ktbr *] (rune '^|' ~ ~ (hoons ~[p.x])) [%ktbr *] (rune '^|' ~ ~ (hoons ~[p.x]))
[%ktcn *] (rune '^%' ~ ~ (hoons ~[p]:x))
[%ktdt *] (rune '^.' ~ ~ (hoons ~[p q]:x)) [%ktdt *] (rune '^.' ~ ~ (hoons ~[p q]:x))
[%ktls *] (rune '^+' ~ ~ (hoons ~[p q]:x)) [%ktls *] (rune '^+' ~ ~ (hoons ~[p q]:x))
[%kthp *] (rune '^-' ~ ~ ~[(spec p.x) (hn q.x)]) [%kthp *] (rune '^-' ~ ~ ~[(spec p.x) (hn q.x)])
[%ktpd *] (rune '^&' ~ ~ (hoons ~[p]:x)) [%ktpm *] (rune '^&' ~ ~ (hoons ~[p]:x))
[%ktsg *] (rune '^~' ~ ~ (hoons ~[p]:x)) [%ktsg *] (rune '^~' ~ ~ (hoons ~[p]:x))
[%ktts *] (rune '^=' ~ `['' '=' ''] ~[(skin p.x) (hn q.x)]) [%ktts *] (rune '^=' ~ `['' '=' ''] ~[(skin p.x) (hn q.x)])
[%ktwt *] (rune '^?' ~ ~ (hoons ~[p]:x)) [%ktwt *] (rune '^?' ~ ~ (hoons ~[p]:x))
@ -379,56 +384,58 @@
[%sgbr *] (rune '~|' ~ ~ (hoons ~[p q]:x)) [%sgbr *] (rune '~|' ~ ~ (hoons ~[p q]:x))
[%sgcb *] (rune '~_' ~ ~ (hoons ~[p q]:x)) [%sgcb *] (rune '~_' ~ ~ (hoons ~[p q]:x))
[%sgcn *] (rune '~%' ~ ~ (chum p.x) (hn q.x) (tyre r.x) (hn s.x) ~) [%sgcn *] (rune '~%' ~ ~ (chum p.x) (hn q.x) (tyre r.x) (hn s.x) ~)
[%sgnt *] (rune '~/' ~ ~ (chum p.x) (hn q.x) ~) [%sgfs *] (rune '~/' ~ ~ (chum p.x) (hn q.x) ~)
[%sgld *] (rune '~<' ~ ~ (hint p.x) (hn q.x) ~) [%sggl *] (rune '~<' ~ ~ (hint p.x) (hn q.x) ~)
[%sgbn *] (rune '~>' ~ ~ (hint p.x) (hn q.x) ~) [%sggr *] (rune '~>' ~ ~ (hint p.x) (hn q.x) ~)
[%sgbs *] (rune '~$' ~ ~ p.x (hn q.x) ~) [%sgbc *] (rune '~$' ~ ~ p.x (hn q.x) ~)
[%sgls *] (rune '~+' ~ ~ (hn q.x) ~) :: Ignoring p.x [%sgls *] (rune '~+' ~ ~ (hn q.x) ~) :: Ignoring p.x
[%sgpd *] (rune '~&' ~ ~ (hoons ~[q r]:x)) :: Ignoring p.x [%sgpm *] (rune '~&' ~ ~ (hoons ~[q r]:x)) :: Ignoring p.x
[%sgts *] (rune '~=' ~ ~ (hoons ~[p q]:x)) [%sgts *] (rune '~=' ~ ~ (hoons ~[p q]:x))
[%sgwt *] (rune '~?' ~ ~ (hoons ~[q r s]:x)) :: Ignoring p.x [%sgwt *] (rune '~?' ~ ~ (hoons ~[q r s]:x)) :: Ignoring p.x
[%sgzp *] (rune '~!' ~ ~ (hoons ~[p q]:x)) [%sgzp *] (rune '~!' ~ ~ (hoons ~[p q]:x))
[%mcts *] %ast-node-mcts [%mcts *] %ast-node-mcts
[%mccl *] (rune ';:' `'==' `[':(' spc ')'] (hoons [p q]:x)) [%mccl *] (rune ';:' `'==' `[':(' spc ')'] (hoons [p q]:x))
[%mcnt *] (rune ';/' ~ ~ (hoons ~[p]:x)) [%mcfs *] (rune ';/' ~ ~ (hoons ~[p]:x))
[%mcgl *] (rune ';<' ~ ~ (spec p.x) (hoons ~[q r s]:x)) [%mcgl *] (rune ';<' ~ ~ (spec p.x) (hoons ~[q r s]:x))
[%mcsg *] (rune ';~' `'==' ~ (hoons [p q]:x)) [%mcsg *] (rune ';~' `'==' ~ (hoons [p q]:x))
[%mcmc *] (rune ';;' ~ ~ ~[(spec p.x) (hn q.x)]) [%mcmc *] (rune ';;' ~ ~ ~[(spec p.x) (hn q.x)])
[%tsbr *] (rune '=|' ~ ~ ~[(spec p.x) (hn q.x)]) [%tsbr *] (rune '=|' ~ ~ ~[(spec p.x) (hn q.x)])
[%tscl *] (tiscol-to-plum p.x q.x) [%tscl *] (tiscol-to-plum p.x q.x)
[%tsnt *] (rune '=/' ~ ~ (skin p.x) (hn q.x) (hn r.x) ~) [%tsfs *] (rune '=/' ~ ~ (skin p.x) (hn q.x) (hn r.x) ~)
[%tsmc *] (rune '=;' ~ ~ [(skin p.x) (hoons ~[q r]:x)]) [%tsmc *] (rune '=;' ~ ~ [(skin p.x) (hoons ~[q r]:x)])
[%tsdt *] (rune '=.' ~ ~ [(wing p.x) (hoons ~[q r]:x)]) [%tsdt *] (rune '=.' ~ ~ [(wing p.x) (hoons ~[q r]:x)])
[%tswt *] (rune '=?' ~ ~ [(wing p.x) (hoons ~[q r s]:x)]) [%tswt *] (rune '=?' ~ ~ [(wing p.x) (hoons ~[q r s]:x)])
[%tsld *] (rune '=>' ~ `['' ':' ''] (hoons ~[p q]:x)) :: XX %tsld to %tsgl, but should be %tsgr? (to match =>)
[%tsgl *] (rune '=>' ~ `['' ':' ''] (hoons ~[p q]:x))
[%tshp *] (rune '=-' ~ ~ (hoons ~[p q]:x)) [%tshp *] (rune '=-' ~ ~ (hoons ~[p q]:x))
[%tsbn *] (rune '=<' ~ ~ (hoons ~[p q]:x)) :: XX %tsbn to %tsgr, but should be %tsgl? (to match =<)
[%tsgr *] (rune '=<' ~ ~ (hoons ~[p q]:x))
[%tskt *] (rune '=^' ~ ~ [(skin p.x) (wing q.x) (hoons ~[r s]:x)]) [%tskt *] (rune '=^' ~ ~ [(skin p.x) (wing q.x) (hoons ~[r s]:x)])
[%tsls *] (rune '=+' ~ ~ (hoons ~[p q]:x)) [%tsls *] (rune '=+' ~ ~ (hoons ~[p q]:x))
[%tssg *] (rune '=~' `'==' ~ (hoons p:x)) [%tssg *] (rune '=~' `'==' ~ (hoons p:x))
[%tstr *] ?~ q.p.x [%tstr *] ?~ q.p.x
(rune '=*' ~ ~ p.p.x (hoons ~[q r]:x)) (rune '=*' ~ ~ p.p.x (hoons ~[q r]:x))
(rune '=*' ~ ~ (spec [%bsts p.p.x u.q.p.x]) (hoons ~[q r]:x)) (rune '=*' ~ ~ (spec [%bcts p.p.x u.q.p.x]) (hoons ~[q r]:x))
[%tscm *] (rune '=,' ~ ~ (hoons ~[p q]:x)) [%tscm *] (rune '=,' ~ ~ (hoons ~[p q]:x))
[%wtbr *] (rune '?|' `'--' `['|(' ' ' ')'] (hoons p:x)) [%wtbr *] (rune '?|' `'--' `['|(' ' ' ')'] (hoons p:x))
[%wthp *] (rune '?-' `'==' ~ (wing p.x) (matches q.x)) [%wthp *] (rune '?-' `'==' ~ (wing p.x) (matches q.x))
[%wtcl *] (rune '?:' ~ ~ (hoons ~[p q r]:x)) [%wtcl *] (rune '?:' ~ ~ (hoons ~[p q r]:x))
[%wtdt *] (rune '?.' ~ ~ (hoons ~[p q r]:x)) [%wtdt *] (rune '?.' ~ ~ (hoons ~[p q r]:x))
[%wtkt *] (rune '?^' ~ ~ [(wing p.x) (hoons ~[q r]:x)]) [%wtkt *] (rune '?^' ~ ~ [(wing p.x) (hoons ~[q r]:x)])
[%wtld *] (rune '?<' ~ ~ (hoons ~[p q]:x)) [%wtgl *] (rune '?<' ~ ~ (hoons ~[p q]:x))
[%wtbn *] (rune '?>' ~ ~ (hoons ~[p q]:x)) [%wtgr *] (rune '?>' ~ ~ (hoons ~[p q]:x))
[%wtls *] (rune '?+' `'==' ~ (wing p.x) (hn q.x) (matches r.x)) [%wtls *] (rune '?+' `'==' ~ (wing p.x) (hn q.x) (matches r.x))
[%wtpd *] (rune '?&' `'==' `['&(' ' ' ')'] (hoons p:x)) [%wtpm *] (rune '?&' `'==' `['&(' ' ' ')'] (hoons p:x))
[%wtvt *] (rune '?@' ~ ~ (wing p.x) (hoons ~[q r]:x)) [%wtpt *] (rune '?@' ~ ~ (wing p.x) (hoons ~[q r]:x))
[%wtsg *] (rune '?~' ~ ~ (wing p.x) (hoons ~[q r]:x)) [%wtsg *] (rune '?~' ~ ~ (wing p.x) (hoons ~[q r]:x))
[%wthx *] (rune '?#' ~ ~ (skin p.x) (wing q.x) ~) [%wthx *] (rune '?#' ~ ~ (skin p.x) (wing q.x) ~)
[%wtts *] (rune '?=' ~ ~ (spec p.x) (wing q.x) ~) [%wtts *] (rune '?=' ~ ~ (spec p.x) (wing q.x) ~)
[%wtzp *] (rune '?!' ~ `['!' '' ''] (hoons ~[p]:x)) [%wtzp *] (rune '?!' ~ `['!' '' ''] (hoons ~[p]:x))
[%zpcm *] (rune '!,' ~ ~ (hoons ~[p q]:x)) [%zpcm *] (rune '!,' ~ ~ (hoons ~[p q]:x))
[%zpbn *] (rune '!>' ~ ~ (hoons ~[p]:x)) [%zpgr *] (rune '!>' ~ ~ (hoons ~[p]:x))
[%zpmc *] (rune '!;' ~ ~ (hoons ~[p q]:x)) [%zpmc *] (rune '!;' ~ ~ (hoons ~[p q]:x))
[%zpts *] (rune '!=' ~ ~ (hoons ~[p]:x)) [%zpts *] (rune '!=' ~ ~ (hoons ~[p]:x))
[%zpvt *] (rune '!@' ~ ~ (wingseq p.x) (hoons ~[q r]:x)) [%zppt *] (rune '!@' ~ ~ (wingseq p.x) (hoons ~[q r]:x))
[%zpwt *] (hn q.x) :: Ignore p.x [%zpwt *] (hn q.x) :: Ignore p.x
[%zpzp ~] '!!' [%zpzp ~] '!!'
== ==
@ -642,37 +649,37 @@
?: =(- 3) '%^' ?: =(- 3) '%^'
?: =(- 2) '%+' '%-' ?: =(- 2) '%+' '%-'
[(dohoon p.spec) (turn q.spec ..$)] [(dohoon p.spec) (turn q.spec ..$)]
%bsbs (core-spec-to-plum '$$' p.spec q.spec) %bcbc (core-spec-to-plum '$$' p.spec q.spec)
%bsbr (subtree (fixed '$|') $(spec p.spec) (dohoon q.spec) ~) %bcbr (subtree (fixed '$|') $(spec p.spec) (dohoon q.spec) ~)
%bscb (dohoon p.spec) %bccb (dohoon p.spec)
%bscl :- %sbrk %bccl :- %sbrk
:+ %tree :+ %tree
[`[' ' `['[' ']']] `['$:' `['' '==']]] [`[' ' `['[' ']']] `['$:' `['' '==']]]
(turn `(list ^spec)`+.spec ..$) (turn `(list ^spec)`+.spec ..$)
%bscn (subtree (varying '$%' '==') (turn `(list ^spec)`+.spec ..$)) %bccn (subtree (varying '$%' '==') (turn `(list ^spec)`+.spec ..$))
%bsdt (core-spec-to-plum '$.' p.spec q.spec) %bcdt (core-spec-to-plum '$.' p.spec q.spec)
%bsld (subtree (fixed '$<') $(spec p.spec) $(spec q.spec) ~) %bcgl (subtree (fixed '$<') $(spec p.spec) $(spec q.spec) ~)
%bsbn (subtree (fixed '$>') $(spec p.spec) $(spec q.spec) ~) %bcgr (subtree (fixed '$>') $(spec p.spec) $(spec q.spec) ~)
%bshp (subtree (fixed '$-') $(spec p.spec) $(spec q.spec) ~) %bchp (subtree (fixed '$-') $(spec p.spec) $(spec q.spec) ~)
%bskt (subtree (fixed '$^') $(spec p.spec) $(spec q.spec) ~) %bckt (subtree (fixed '$^') $(spec p.spec) $(spec q.spec) ~)
%bsls (subtree (fixed '$+') (stud-to-plum p.spec) $(spec q.spec) ~) %bcls (subtree (fixed '$+') (stud-to-plum p.spec) $(spec q.spec) ~)
%bsnt (core-spec-to-plum '$/' p.spec q.spec) %bcfs (core-spec-to-plum '$/' p.spec q.spec)
%bsmc (subtree (fixed '$;') (dohoon p.spec) ~) %bcmc (subtree (fixed '$;') (dohoon p.spec) ~)
%bspd (subtree (fixed '$&') $(spec p.spec) (dohoon q.spec) ~) %bcpm (subtree (fixed '$&') $(spec p.spec) (dohoon q.spec) ~)
%bssg (subtree (fixed '$~') (dohoon p.spec) $(spec q.spec) ~) %bcsg (subtree (fixed '$~') (dohoon p.spec) $(spec q.spec) ~)
%bstc (core-spec-to-plum '$`' p.spec q.spec) %bctc (core-spec-to-plum '$`' p.spec q.spec)
%bsts :- %sbrk %bcts :- %sbrk
:+ %tree :+ %tree
[`['=' ~] `['$=' ~]] [`['=' ~] `['$=' ~]]
:~ (skin-to-plum p.spec) :~ (skin-to-plum p.spec)
$(spec q.spec) $(spec q.spec)
== ==
%bsvt (subtree (fixed '$@') $(spec p.spec) $(spec q.spec) ~) %bcpt (subtree (fixed '$@') $(spec p.spec) $(spec q.spec) ~)
%bswt :- %sbrk %bcwt :- %sbrk
:+ %tree :+ %tree
[`[' ' `['?(' ')']] `['$?' `['' '==']]] [`[' ' `['?(' ')']] `['$?' `['' '==']]]
(turn `(list ^spec)`+.spec ..$) (turn `(list ^spec)`+.spec ..$)
%bszp (core-spec-to-plum '$.' p.spec q.spec) %bczp (core-spec-to-plum '$.' p.spec q.spec)
== ==
:: ::
++ varying ++ varying
@ -850,7 +857,7 @@
|= [=sample=xkey =product=xkey] |= [=sample=xkey =product=xkey]
^- plum ^- plum
%- spec-to-plum :* %- spec-to-plum :*
%bshp %bchp
(ximage-to-spec:libxray sample-xkey img) (ximage-to-spec:libxray sample-xkey img)
(ximage-to-spec:libxray product-xkey img) (ximage-to-spec:libxray product-xkey img)
== ==

View File

@ -7,24 +7,24 @@
=< pretty-file =< pretty-file
|% |%
++ pretty-noun ++ pretty-noun
|= pri/* ^- tank |= pri=* ^- tank
?~ pri ?~ pri
leaf+"~" leaf+"~"
?@ pri ?@ pri
leaf+?:(((sane %tas) pri) <`@tas`pri> <pri>) leaf+?:(((sane %tas) pri) <`@tas`pri> <pri>)
=< rose+[" " ?:(- "~[" "[") "]"]^+ =< rose+[" " ?:(- "~[" "[") "]"]^+
|- ^- {? (list tank)} |- ^- [? (list tank)]
?~ +.pri ?~ +.pri
[& ^$(pri -.pri) ~] [& ^$(pri -.pri) ~]
?@ +.pri ?@ +.pri
[| ^$(pri -.pri) ^$(pri +.pri) ~] [| ^$(pri -.pri) ^$(pri +.pri) ~]
[+< - +>]:[^$(pri -.pri) $(pri +.pri)] [+< - +>]:[^$(pri -.pri) $(pri +.pri)]
:: ::
++ vale-cord |=(a/cord `?`(levy (trip a) |=(b/@ |((gte b 32) =(10 b))))) ++ vale-cord |=(a=cord `?`(levy (trip a) |=(b=@ |((gte b 32) =(10 b)))))
:: ::
++ wain-to-tang |=(a/wain (turn a |=(b/cord leaf+(trip b)))) ++ wain-to-tang |=(a=wain (turn a |=(b=cord leaf+(trip b))))
++ pretty-file ++ pretty-file
|= fyl/* ^- tang |= fyl=* ^- tang
=+ `(unit wain)`?@(fyl `(to-wain:format fyl) ((soft wain) fyl)) =+ `(unit wain)`?@(fyl `(to-wain:format fyl) ((soft wain) fyl))
?^ - (wain-to-tang u) ?^ - (wain-to-tang u)
[(pretty-noun fyl)]~ [(pretty-noun fyl)]~

View File

@ -5,7 +5,7 @@
|% |%
:: +key:rsa: rsa public or private key :: +key:rsa: rsa public or private key
:: ::
+= key +$ key
$: :: pub: public parameters (n=modulus, e=pub-exponent) $: :: pub: public parameters (n=modulus, e=pub-exponent)
:: ::
pub=[n=@ux e=@ux] pub=[n=@ux e=@ux]
@ -39,7 +39,7 @@
=/ e :(con 1 (lsh 0 (dec a) 1) (~(raw og c) a)) =/ e :(con 1 (lsh 0 (dec a) 1) (~(raw og c) a))
:: XX what algorithm is this modular remainder check? :: XX what algorithm is this modular remainder check?
:: ::
?: ?& (levy b |=(f/@ !=(1 (mod e f)))) ?: ?& (levy b |=(f=@ !=(1 (mod e f))))
(pram:number e) (pram:number e)
== ==
e e

View File

@ -319,7 +319,7 @@
:: +seed-to-private-key-scalar: keyfile form to scalar we can multiply with :: +seed-to-private-key-scalar: keyfile form to scalar we can multiply with
:: ::
++ seed-to-private-key-scalar ++ seed-to-private-key-scalar
|= sk/@I ^- @udscalar |= sk=@I ^- @udscalar
?: (gth (met 3 sk) 32) !! ?: (gth (met 3 sk) 32) !!
=+ h=(shal (rsh 0 3 b:ed:crypto) sk) =+ h=(shal (rsh 0 3 b:ed:crypto) sk)
%+ add %+ add

View File

@ -3,20 +3,20 @@
:::: /hoon/show-dir/lib :::: /hoon/show-dir/lib
:: ::
/? 310 /? 310
|= {vane/?($g $c) pax/path des/(map @t ~)} |= [vane=?(%g %c) pax=path des=(map @t ~)]
^- tank ^- tank
:+ %rose [" " `~] :+ %rose [" " `~]
%+ turn (sort ~(tap by des) aor) %+ turn (sort ~(tap by des) aor)
|= {kid/@ta ~} |= [kid=@ta ~]
=+ paf=`path`/[kid] =+ paf=`path`/[kid]
=- :+ %rose ["/" ~ ?:(dir "/" ~)] =- :+ %rose ["/" ~ ?:(dir "/" ~)]
(turn paf |=(a/knot leaf+(trip a))) (turn paf |=(a=knot leaf+(trip a)))
|- ^- {dir/? paf/path} |- ^- [dir=? paf=path]
=+ arf=.^(arch (cat 3 vane %y) (weld pax paf)) =+ arf=.^(arch (cat 3 vane %y) (weld pax paf))
?^ fil.arf ?^ fil.arf
[| paf] [| paf]
?~ dir.arf ?~ dir.arf
[& paf] :: !! [& paf] :: !!
?. ?=({^ ~ ~} dir.arf) ?. ?=([^ ~ ~] dir.arf)
[& paf] [& paf]
$(paf (welp paf /[p.n.dir.arf])) $(paf (welp paf /[p.n.dir.arf]))

View File

@ -8,17 +8,17 @@
|_ sole-share :: shared-state engine |_ sole-share :: shared-state engine
++ abet +< ++ abet +<
++ apply ++ apply
|= ted/sole-edit |= ted=sole-edit
^+ +> ^+ +>
?- -.ted ?- -.ted
$del +>.$(buf (weld (scag p.ted buf) (slag +(p.ted) buf))) %del +>.$(buf (weld (scag p.ted buf) (slag +(p.ted) buf)))
$ins +>.$(buf (weld (scag p.ted buf) `_buf`[q.ted (slag p.ted buf)])) %ins +>.$(buf (weld (scag p.ted buf) `_buf`[q.ted (slag p.ted buf)]))
$mor |- ^+ +>.^$ %mor |- ^+ +>.^$
?~ p.ted ?~ p.ted
+>.^$ +>.^$
$(p.ted t.p.ted, +>.^$ ^$(ted i.p.ted)) $(p.ted t.p.ted, +>.^$ ^$(ted i.p.ted))
$nop +>.$ %nop +>.$
$set +>.$(buf p.ted) %set +>.$(buf p.ted)
== ==
:: ::
:::: ::::
@ -31,43 +31,43 @@
:: (apply:(apply b) y) :: (apply:(apply b) y)
:: ::
++ transmute :: dex as after sin ++ transmute :: dex as after sin
|= {sin/sole-edit dex/sole-edit} |= [sin=sole-edit dex=sole-edit]
~| [%transmute sin dex] ~| [%transmute sin dex]
^- sole-edit ^- sole-edit
?: ?=($mor -.sin) ?: ?=(%mor -.sin)
|- ^- sole-edit |- ^- sole-edit
?~ p.sin dex ?~ p.sin dex
$(p.sin t.p.sin, dex ^$(sin i.p.sin)) $(p.sin t.p.sin, dex ^$(sin i.p.sin))
:: ::
?: ?=($mor -.dex) ?: ?=(%mor -.dex)
:- %mor :- %mor
|- ^- (list sole-edit) |- ^- (list sole-edit)
?~ p.dex ~ ?~ p.dex ~
[^$(dex i.p.dex) $(p.dex t.p.dex)] [^$(dex i.p.dex) $(p.dex t.p.dex)]
:: ::
?: |(?=($nop -.sin) ?=($nop -.dex)) dex ?: |(?=(%nop -.sin) ?=(%nop -.dex)) dex
?: ?=($set -.sin) [%nop ~] ?: ?=(%set -.sin) [%nop ~]
?: ?=($set -.dex) dex ?: ?=(%set -.dex) dex
:: ::
?- -.sin ?- -.sin
$del %del
?- -.dex ?- -.dex
$del ?: =(p.sin p.dex) [%nop ~] %del ?: =(p.sin p.dex) [%nop ~]
?:((lth p.sin p.dex) dex(p (dec p.dex)) dex) ?:((lth p.sin p.dex) dex(p (dec p.dex)) dex)
$ins ?:((lth p.sin p.dex) dex(p (dec p.dex)) dex) %ins ?:((lth p.sin p.dex) dex(p (dec p.dex)) dex)
== ==
:: ::
$ins %ins
?- -.dex ?- -.dex
$del ?:((lte p.sin p.dex) dex(p +(p.dex)) dex) %del ?:((lte p.sin p.dex) dex(p +(p.dex)) dex)
$ins ?: =(p.sin p.dex) %ins ?: =(p.sin p.dex)
?:((lth q.sin q.dex) dex dex(p +(p.dex))) ?:((lth q.sin q.dex) dex dex(p +(p.dex)))
?:((lte p.sin p.dex) dex(p +(p.dex)) dex) ?:((lte p.sin p.dex) dex(p +(p.dex)) dex)
== ==
== ==
:: ::
++ commit :: local change ++ commit :: local change
|= ted/sole-edit |= ted=sole-edit
^- sole-share ^- sole-share
abet:(apply(own.ven +(own.ven), leg [ted leg]) ted) abet:(apply(own.ven +(own.ven), leg [ted leg]) ted)
:: ::
@ -79,25 +79,25 @@
:: =(+> (apply:(apply a) (inverse a))) :: =(+> (apply:(apply a) (inverse a)))
:: ::
++ inverse :: relative inverse ++ inverse :: relative inverse
|= ted/sole-edit |= ted=sole-edit
^- sole-edit ^- sole-edit
=. ted ?.(?=({$mor * ~} ted) ted i.p.ted) =. ted ?.(?=([%mor * ~] ted) ted i.p.ted)
?- -.ted ?- -.ted
$del [%ins p.ted (snag p.ted buf)] %del [%ins p.ted (snag p.ted buf)]
$ins [%del p.ted] %ins [%del p.ted]
$mor :- %mor %mor :- %mor
%- flop %- flop
|- ^- (list sole-edit) |- ^- (list sole-edit)
?~ p.ted ~ ?~ p.ted ~
:- ^$(ted i.p.ted) :- ^$(ted i.p.ted)
$(p.ted t.p.ted, +>.^$ (apply i.p.ted)) $(p.ted t.p.ted, +>.^$ (apply i.p.ted))
$nop [%nop ~] %nop [%nop ~]
$set [%set buf] %set [%set buf]
== ==
:: ::
++ receive :: naturalize event ++ receive :: naturalize event
|= sole-change |= sole-change
^- {sole-edit sole-share} ^- [sole-edit sole-share]
?. &(=(his.ler his.ven) (lte own.ler own.ven)) ?. &(=(his.ler his.ven) (lte own.ler own.ven))
~| [%receive-sync his+[his.ler his.ven] own+[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)] [dat abet:(apply(his.ven +(his.ven)) dat)]
:: ::
++ remit :: conditional accept ++ remit :: conditional accept
|= {cal/sole-change ask/$-((list @c) ?)} |= [cal=sole-change ask=$-((list @c) ?)]
^- {(unit sole-change) sole-share} ^- [(unit sole-change) sole-share]
=+ old=buf =+ old=buf
=^ dat +>+<.$ (receive cal) =^ dat +>+<.$ (receive cal)
?: (ask buf) ?: (ask buf)
@ -120,20 +120,20 @@
[`lic +>+<.$] [`lic +>+<.$]
:: ::
++ transmit :: outgoing change ++ transmit :: outgoing change
|= ted/sole-edit |= ted=sole-edit
^- {sole-change sole-share} ^- [sole-change sole-share]
[[[his.ven own.ven] (sham buf) ted] (commit ted)] [[[his.ven own.ven] (sham buf) ted] (commit ted)]
:: ::
++ transceive :: receive and invert ++ transceive :: receive and invert
|= sole-change |= sole-change
^- {sole-edit sole-share} ^- [sole-edit sole-share]
=+ old=buf =+ old=buf
=^ dat +>+<.$ (receive +<.$) =^ dat +>+<.$ (receive +<.$)
[(inverse(buf old) dat) +>+<.$] [(inverse(buf old) dat) +>+<.$]
:: ::
++ transpose :: adjust position ++ transpose :: adjust position
|= pos/@ud |= pos=@ud
=+ dat=(transmute [%mor leg] [%ins pos `@c`0]) =+ dat=(transmute [%mor leg] [%ins pos `@c`0])
?> ?=($ins -.dat) ?> ?=(%ins -.dat)
p.dat p.dat
-- --

View File

@ -39,17 +39,17 @@
=, enjs:format =, enjs:format
?+ -.sef ?+ -.sef
~|(unsupported-effect+-.sef !!) ~|(unsupported-effect+-.sef !!)
$mor [%a (turn p.sef |=(a/sole-effect ^$(sef a)))] %mor [%a (turn p.sef |=(a=sole-effect ^$(sef a)))]
$err (frond %hop (numb p.sef)) %err (frond %hop (numb p.sef))
$txt (frond %txt (tape p.sef)) %txt (frond %txt (tape p.sef))
$tan (frond %tan (tape (wush 160 p.sef))) %tan (frond %tan (tape (wush 160 p.sef)))
$det (frond %det json:~(grow mar-sole-change +.sef)) %det (frond %det json:~(grow mar-sole-change +.sef))
:: ::
$pro %pro
%+ frond %pro %+ frond %pro
(pairs vis+b+vis.sef tag+s+tag.sef cad+(tape (purge cad.sef)) ~) (pairs vis+b+vis.sef tag+s+tag.sef cad+(tape (purge cad.sef)) ~)
:: ::
$tab %tab
:- %a :- %a
%+ turn p.sef %+ turn p.sef
|= [=cord =^tank] |= [=cord =^tank]
@ -59,7 +59,7 @@
info+(tape ~(ram re tank)) info+(tape ~(ram re tank))
== ==
:: ::
?($bel $clr $nex) ?(%bel %clr %nex)
(frond %act %s -.sef) (frond %act %s -.sef)
== ==
++ mar-sole-change ++ mar-sole-change
@ -72,11 +72,11 @@
=,(cha (pairs ted+(edi ted) ler+a+~[(numb own.ler) (numb his.ler)] ~)) =,(cha (pairs ted+(edi ted) ler+a+~[(numb own.ler) (numb his.ler)] ~))
|= det=sole-edit |= det=sole-edit
?- -.det ?- -.det
$nop [%s 'nop'] %nop [%s 'nop']
$mor [%a (turn p.det ..$)] %mor [%a (turn p.det ..$)]
$del (frond %del (numb p.det)) %del (frond %del (numb p.det))
$set (frond %set (tape (tufa p.det))) %set (frond %set (tape (tufa p.det)))
$ins (frond %ins (pairs at+(numb p.det) cha+s+(tuft q.det) ~)) %ins (frond %ins (pairs at+(numb p.det) cha+s+(tuft q.det) ~))
== ==
-- --
-- --

View File

@ -424,7 +424,7 @@
=/ m (strand ,vase) =/ m (strand ,vase)
^- form:m ^- form:m
;< =riot:clay bind:m ;< =riot:clay bind:m
(warp ship desk ~ %sing %a case (flop spur)) (warp ship desk ~ %sing %a case spur)
?~ riot ?~ riot
(strand-fail %build-file >arg< ~) (strand-fail %build-file >arg< ~)
?> =(%vase p.r.u.riot) ?> =(%vase p.r.u.riot)
@ -468,7 +468,7 @@
|= [[=ship =desk =case:clay] =spur] |= [[=ship =desk =case:clay] =spur]
=* arg +< =* arg +<
=/ m (strand ,cage) =/ m (strand ,cage)
;< =riot:clay bind:m (warp ship desk ~ %sing %x case (flop spur)) ;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
?~ riot ?~ riot
(strand-fail %read-file >arg< ~) (strand-fail %read-file >arg< ~)
(pure:m r.u.riot) (pure:m r.u.riot)
@ -476,14 +476,14 @@
++ check-for-file ++ check-for-file
|= [[=ship =desk =case:clay] =spur] |= [[=ship =desk =case:clay] =spur]
=/ m (strand ,?) =/ m (strand ,?)
;< =riot:clay bind:m (warp ship desk ~ %sing %x case (flop spur)) ;< =riot:clay bind:m (warp ship desk ~ %sing %x case spur)
(pure:m ?=(^ riot)) (pure:m ?=(^ riot))
:: ::
++ list-tree ++ list-tree
|= [[=ship =desk =case:clay] =spur] |= [[=ship =desk =case:clay] =spur]
=* arg +< =* arg +<
=/ m (strand ,(list path)) =/ m (strand ,(list path))
;< =riot:clay bind:m (warp ship desk ~ %sing %t case (flop spur)) ;< =riot:clay bind:m (warp ship desk ~ %sing %t case spur)
?~ riot ?~ riot
(strand-fail %list-tree >arg< ~) (strand-fail %list-tree >arg< ~)
(pure:m !<((list path) q.r.u.riot)) (pure:m !<((list path) q.r.u.riot))

View File

@ -31,7 +31,7 @@
`tang`[[%leaf (weld "FAILED " name)] ~] `tang`[[%leaf (weld "FAILED " name)] ~]
::TODO indent ::TODO indent
:: %+ turn p:run :: %+ turn p:run
:: |= {i/tape} :: |= [i=tape]
:: ^- tank :: ^- tank
:: [%leaf (weld " " i)] :: [%leaf (weld " " i)]
p.run p.run

View File

@ -6,5 +6,5 @@
:: ::
:::: ~fyr :::: ~fyr
:: ::
|= a/time ^- tape |= a=time ^- tape
['c' (s-co:co f:(yell a))] ['c' (s-co:co f:(yell a))]

View File

@ -5,9 +5,9 @@
:: ::
|% |%
++ getall :: search in manx ++ getall :: search in manx
|= tag/(list mane) |= tag=(list mane)
|= ele/manx ^- marl |= ele=manx ^- marl
?: (lien tag |=(a/mane =(a n.g.ele))) ?: (lien tag |=(a=mane =(a n.g.ele)))
~[ele] ~[ele]
(zing (turn c.ele ..$)) (zing (turn c.ele ..$))
:: ::
@ -17,16 +17,16 @@
++ read-schem :: decode gapped noun ++ read-schem :: decode gapped noun
=< (cook to-noun (cook build-grove apex)) =< (cook to-noun (cook build-grove apex))
|% |%
++ noun $@(term {noun noun}) :: shadow ++ noun $@(term [noun noun]) :: shadow
:: improper list of possible entry points :: 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))) ++ apex ;~(plug sym (star ;~(plug delim sym)))
++ delim ;~(pose (cold 0 dot) (cook lent (plus cab))) ++ delim ;~(pose (cold 0 dot) (cook lent (plus cab)))
++ to-noun |=(a/grove ?@(a a [sealed.a $(a pending.a)])) ++ to-noun |=(a=grove ?@(a a [sealed.a $(a pending.a)]))
++ build-grove ++ build-grove
|= {a/grove b/(list {p/@u q/term})} ^- grove |= [a=grove b=(list [p=@u q=term])] ^- grove
%+ roll b =< .(acc a) %+ roll b =< .(acc a)
|= {{gap/@u v/term} acc/grove} ^- grove |= [[gap=@u v=term] acc=grove] ^- grove
?@ acc [gap acc v] ?@ acc [gap acc v]
?: (gth gap gap.acc) [gap (to-noun acc) v] ?: (gth gap gap.acc) [gap (to-noun acc) v]
acc(pending $(acc pending.acc)) acc(pending $(acc pending.acc))

View File

@ -2,9 +2,9 @@
:::: /hoon/urb-split/lib :::: /hoon/urb-split/lib
:: ::
/? 310 /? 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 ~| [%malformed-urb urb] :: XX types
?> ?=({{$html ~} {{$head ~} *} {{$body ~} *} ~} urb) ?> ?=([[%html ~] [[%head ~] *] [[%body ~] *] ~] urb)
=+ `{{$html ~} {{$head ~} hed/marl} {{$body ~} bod/marl} ~}`urb =+ `[[%html ~] [[%head ~] hed=marl] [[%body ~] bod=marl] ~]`urb
:- [dep hed] :: Assume all dependencies are hard :- [dep hed] :: Assume all dependencies are hard
[0v0 bod] [0v0 bod]

View File

@ -1,3 +1,4 @@
/- *plum, *xray
:: ::
:: # Type Analysis :: # Type Analysis
:: ::
@ -355,8 +356,8 @@
=^ params=(list xkey) st =^ params=(list xkey) st
|- ^- [(list xkey) xtable] |- ^- [(list xkey) xtable]
?~ u.q.note [~ st] ?~ u.q.note [~ st]
=/ tsld [%tsld [%limb %$] [%wing i.u.q.note]] =/ tsgl [%tsgl [%limb %$] [%wing i.u.q.note]]
=/ part (~(play ut subject-of-note) tsld) =/ part (~(play ut subject-of-note) tsgl)
=^ this st (main st part) =^ this st (main st part)
=^ more st $(u.q.note t.u.q.note) =^ more st $(u.q.note t.u.q.note)
[[this more] st] [[this more] st]
@ -1318,7 +1319,7 @@
:: ::
=^ i=xkey st =^ i=xkey st
^- [xkey xtable] ^- [xkey xtable]
%+ (fold {xkey xtable} xkey) %+ (fold ,[xkey xtable] xkey)
[[void st] ~(tap in fork)] [[void st] ~(tap in fork)]
|= [[k=xkey tbl=xtable] branch=xkey] |= [[k=xkey tbl=xtable] branch=xkey]
^- [xkey xtable] ^- [xkey xtable]
@ -1416,8 +1417,8 @@
:: coherent `xrole` (where possible, otherwise a %misjunction). :: coherent `xrole` (where possible, otherwise a %misjunction).
:: ::
:: This often needs to restructure things. For example, if we are :: This often needs to restructure things. For example, if we are
:: combining `{{~ ~} {%a ~}}` and `{{~ ~} {%b ~}}`, we should produce :: combining `[[~ ~] [%a ~]]` and `[[~ ~] [%b ~]]`, we should produce
:: `{{~ ~} ?%({%a ~} {%b ~})}`. :: `[[~ ~] ?%([%a ~] [%b ~])]`.
:: ::
:: This is a massive switch on the xroles of the two arguments. This :: 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 :: is *very* easy to get wrong, so I structured things this in a
@ -1774,34 +1775,34 @@
=/ tl `spec`$(i tail.d) =/ tl `spec`$(i tail.d)
=/ both-basic &(=([%base %noun] hd) =([%base %noun] tl)) =/ both-basic &(=([%base %noun] hd) =([%base %noun] tl))
?: both-basic [%base %cell] ?: both-basic [%base %cell]
?: ?=(%bscl -.tl) [%bscl hd +.tl] ?: ?=(%bccl -.tl) [%bccl hd +.tl]
[%bscl hd tl ~] [%bccl hd tl ~]
%core =/ payld $(i xray.d) %core =/ payld $(i xray.d)
=/ batt ^- (map term spec) =/ batt ^- (map term spec)
%- ~(run by (flatten-battery batt.d)) %- ~(run by (flatten-battery batt.d))
|= =xkey ^$(i xkey) |= =xkey ^$(i xkey)
?- r.garb.d ?- r.garb.d
%lead [%bszp payld batt] %lead [%bczp payld batt]
%gold [%bsdt payld batt] %gold [%bcdt payld batt]
%zinc [%bstc payld batt] %zinc [%bctc payld batt]
%iron [%bsnt payld batt] %iron [%bcfs payld batt]
== ==
%pntr !! %pntr !!
%face =/ =spec $(i xray.d) %face =/ =spec $(i xray.d)
?^(face.d spec [%bsts face.d spec]) ?^(face.d spec [%bcts face.d spec])
%fork =/ =xrole (need xrole.x) %fork =/ =xrole (need xrole.x)
|^ ?+ xrole |^ ?+ xrole
~& [%unexpected-fork-xrole xkey.x d xrole choices] ~& [%unexpected-fork-xrole xkey.x d xrole choices]
[%bswt choices] [%bcwt choices]
%noun [%base %noun] %noun [%base %noun]
%void [%base %void] %void [%base %void]
[%option *] [%bswt choices] [%option *] [%bcwt choices]
[%union *] [%bscn choices] [%union *] [%bccn choices]
[%misjunction *] [%bswt choices] [%misjunction *] [%bcwt choices]
[%junction *] :+ %bsvt [%junction *] :+ %bcpt
^$(i flat.xrole) ^$(i flat.xrole)
^$(i deep.xrole) ^$(i deep.xrole)
[%conjunction *] :+ %bskt [%conjunction *] :+ %bckt
^$(i wide.xrole) ^$(i wide.xrole)
^$(i tall.xrole) ^$(i tall.xrole)
== ==
@ -1821,7 +1822,7 @@
^- spec ^- spec
?. (need loop.xr) sp ?. (need loop.xr) sp
=/ nm (synthetic xkey.xr) =/ nm (synthetic xkey.xr)
[%bsbs [%loop nm] [[nm sp] ~ ~]] [%bcbc [%loop nm] [[nm sp] ~ ~]]
:: ::
:: If we have a `recipe`, we can generate much nicer output. :: If we have a `recipe`, we can generate much nicer output.
:: ::
@ -1843,7 +1844,7 @@
++ synthetic ++ synthetic
|= number=@ud |= number=@ud
^- @tas ^- @tas
=/ alf/(list term) =/ alf=(list term)
^~ :~ %alf %bet %gim %dal %hej %vav %zay %het ^~ :~ %alf %bet %gim %dal %hej %vav %zay %het
%tet %yod %kaf %lam %mem %nun %sam %ayn %tet %yod %kaf %lam %mem %nun %sam %ayn
%pej %sad %qof %res %sin %tav %pej %sad %qof %res %sin %tav
@ -1864,4 +1865,77 @@
(~(uni by q.q.i.chapters) $(chapters t.chapters)) (~(uni by q.q.i.chapters) $(chapters t.chapters))
:: ::
-- --
::
:: Left-fold over a list.
::
:: This is `roll`, but with explicit type parameters.
::
++ fold
|* [state=mold elem=mold]
|= [[st=state xs=(list elem)] f=$-([state elem] state)]
^- state
|-
?~ xs st
$(xs t.xs, st (f st i.xs))
::
:: This is basically a `mapM` over a list using the State monad.
::
:: Another way to think about this is that it is the same as `turn`,
:: except that a state variable `st` is threaded through the
:: execution. The list is processed from left to right.
::
:: This is `spin`, but with explicit type parameters.
::
++ traverse
|* [state=mold in=mold out=mold]
|= [[st=state xs=(list in)] f=$-([state in] [out state])]
^- [(list out) state]
?~ xs [~ st]
=^ r st (f st i.xs)
=^ rs st $(xs t.xs, st st)
[[r rs] st]
::
:: `traverse` over a set.
::
++ traverse-set
|* [state=mold input=mold out=mold]
|= [[st=state xs=(set input)] f=$-([state input] [out state])]
^- [(set out) state]
::
=^ elems st ((traverse state input out) [st ~(tap in xs)] f)
:_ st (~(gas in *(set out)) elems)
::
:: `traverse` over a map, also passing the key to the folding function.
::
++ traverse-map
|* [state=mold key=mold in=mold out=mold]
|= [[st=state dict=(map key in)] f=$-([state key in] [out state])]
^- [(map key out) state]
::
=^ pairs=(list (pair key out)) st
%+ (traverse state (pair key in) (pair key out))
[st ~(tap by dict)]
|= [st=state k=key x=in]
^- [(pair key out) state]
=^ v st (f st k x)
[[k v] st]
::
:_ st
(~(gas by *(map key out)) pairs)
::
:: Given a map, return its inverse: For each value, what are the set
:: of associated keys?
::
++ reverse-map
|* [key=mold val=mold]
|= tbl=(map key val)
=/ init *(map val (set key))
^- _init
%+ (fold _init (pair key val))
[init ~(tap by tbl)]
|= [acc=_init k=key v=val]
^- _init
=/ mb-keys (~(get by acc) v)
=/ keys=(set key) ?~(mb-keys ~ u.mb-keys)
(~(put by acc) v (~(put in keys) k))
-- --

View File

@ -6,7 +6,7 @@
:::: A minimal atom mark :::: A minimal atom mark
:: ::
=, mimes:html =, mimes:html
|_ ato/@ |_ ato=@
++ grab |% ++ grab |%
++ noun @ ++ noun @
++ mime |=([* p=octs] q.p) ++ mime |=([* p=octs] q.p)

View File

@ -4,7 +4,7 @@
/? 310 /? 310
=, eyre =, eyre
=, mimes:html =, mimes:html
|_ mud/@t |_ mud=@t
++ grow :: convert to ++ grow :: convert to
|% ++ mime [/text/css (as-octs mud)] :: convert to %mime |% ++ mime [/text/css (as-octs mud)] :: convert to %mime
++ elem ;style :: convert to %hymn ++ elem ;style :: convert to %hymn

Some files were not shown because too many files have changed in this diff Show More