Merge branch 'org-libs' into master

This commit is contained in:
Anton Dyudin 2017-12-05 12:07:33 -08:00
commit 2eac6be25d
25 changed files with 216 additions and 172 deletions

View File

@ -2,12 +2,12 @@
:::: /hoon/ask/app :::: /hoon/ask/app
:: ::
/? 310 /? 310
/+ sole, womb, prey /+ sole, hood-womb, prey
[. sole] [. sole]
|% |%
++ card ++ card
$% {$diff $sole-effect sole-effect} $% {$diff $sole-effect sole-effect}
{$poke wire {ship $hood} $womb-invite {cord:womb invite:womb}} {$poke wire {ship $hood} $womb-invite {cord:hood-womb invite:hood-womb}}
== ==
++ invited ?($new $sent $ignored) ++ invited ?($new $sent $ignored)
++ email @t ++ email @t
@ -154,7 +154,7 @@
^- card ^- card
:^ %poke /invite/(scot %t ask) [(need wom) %hood] :^ %poke /invite/(scot %t ask) [(need wom) %hood]
:- %womb-invite :- %womb-invite
^- [cord:womb invite:womb] ^- [cord:hood-womb invite:hood-womb]
=+ inv=(scot %uv (end 7 1 eny.bow)) =+ inv=(scot %uv (end 7 1 eny.bow))
[inv [ask 1 0 "You have been invited to Urbit: {(trip inv)}" ""]] [inv [ask 1 0 "You have been invited to Urbit: {(trip inv)}" ""]]
-- --

View File

@ -2,56 +2,84 @@
:::: /hoon/hood/app :: :: :::: /hoon/hood/app :: ::
:: :: :: :: :: ::
/? 310 :: zuse version /? 310 :: zuse version
/+ sole, talk, helm, kiln, drum, write, womb :: libraries /+ sole, talk, :: libraries
[. helm kiln drum] :: XX these should really be separate apps, as
:: none of them interact with each other in
:: any fashion; however, to reduce boot-time
:: complexity and work around the current
:: non-functionality of end-to-end acknowledgments,
:: they have been bundled into :hood
::
:: |command handlers
hood-helm, hood-kiln, hood-drum, hood-write,
hood-womb
:: :: :: :: :: ::
:::: :: :: :::: :: ::
:: :: :: :: :: ::
|%
++ hood-module
:: each hood module follows this general shape
=> |%
+= part [%module %0 pith]
+= pith ~
::
+= move [bone card]
+= card $% [%fake _!!]
==
--
|= [bowl:gall own=part]
|_ moz=(list move)
++ abet [(flop moz) own]
--
--
:: :: ::
:::: :: :: state handling
:: :: ::
!: !:
=> |% :: module boilerplate => |% ::
++ hood-old :: ++ hood-old :: unified old-state
{?($0 $1) lac/(map @tas hood-part-old)} :: {?($0 $1) lac/(map @tas hood-part-old)} ::
++ hood-1 :: ++ hood-1 :: unified state
{$1 lac/(map @tas hood-part)} :: {$1 lac/(map @tas hood-part)} ::
++ hood-good :: ++ hood-good :: extract specific
|* hed/hood-head :: |* hed/hood-head ::
|= paw/hood-part :: |= paw/hood-part ::
?- hed :: ?- hed ::
$drum ?>(?=($drum -.paw) `drum-part`paw) :: $drum ?>(?=($drum -.paw) `part:hood-drum`paw) ::
$helm ?>(?=($helm -.paw) `helm-part`paw) :: $helm ?>(?=($helm -.paw) `part:hood-helm`paw) ::
$kiln ?>(?=($kiln -.paw) `kiln-part`paw) :: $kiln ?>(?=($kiln -.paw) `part:hood-kiln`paw) ::
$womb ?>(?=($womb -.paw) `part:womb`paw) :: $womb ?>(?=($womb -.paw) `part:hood-womb`paw) ::
$write ?>(?=($write -.paw) `part:write`paw) :: $write ?>(?=($write -.paw) `part:hood-write`paw) ::
== :: == :: module name
++ hood-head _-:*hood-part :: ++ hood-head _-:*hood-part :: initialize state
++ hood-make :: ++ hood-make ::
|* {our/@p hed/hood-head} :: |* {our/@p hed/hood-head} ::
?- hed :: ?- hed ::
$drum (drum-make our) :: $drum (make:hood-drum our) ::
$helm *helm-part :: $helm *part:hood-helm ::
$kiln *kiln-part :: $kiln *part:hood-kiln ::
$womb *part:womb :: $womb *part:hood-womb ::
$write *part:write :: $write *part:hood-write ::
== :: == ::
++ hood-part-old hood-part :: ++ hood-part-old hood-part :: old state for ++prep
++ hood-port :: ++ hood-port :: state transition
|= paw/hood-part-old ^- hood-part :: |= paw/hood-part-old ^- hood-part ::
paw :: paw ::
:: :: :: ::
++ hood-part :: ++ hood-part :: current module state
$% {$drum $2 drum-pith-2} :: $% {$drum $2 pith-2:hood-drum} ::
{$helm $0 helm-pith} :: {$helm $0 pith:hood-helm} ::
{$kiln $0 kiln-pith} :: {$kiln $0 pith:hood-kiln} ::
{$womb $1 pith:womb} :: {$womb $1 pith:hood-womb} ::
{$write $0 pith:write} :: {$write $0 pith:hood-write} ::
== :: == ::
-- :: -- ::
:: :: :: :: :: ::
:::: :: :: :::: :: :: app proper
:: :: :: :: :: ::
=, gall =, gall
|_ $: hid/bowl :: system state |_ $: hid/bowl :: gall environment
hood-1 :: server state hood-1 :: module states
== :: == ::
++ able :: find+make part ++ able :: find+make part
|* hed/hood-head |* hed/hood-head
@ -63,42 +91,23 @@
|* {(list) hood-part} |* {(list) hood-part}
[(flop +<-) %_(+> lac (~(put by lac) +<+< +<+))] [(flop +<-) %_(+> lac (~(put by lac) +<+< +<+))]
:: :: :: :: :: ::
:::: :: :: :::: :: :: generic handling
:: :: :: :: :: ::
++ prep ++ prep
|= old/(unit hood-old) ^- (quip _!! _+>) :: |= old/(unit hood-old) ^- (quip _!! _+>)
:- ~ :- ~
?~ old +> ?~ old +>
+>(lac (~(run by lac.u.old) hood-port)) +>(lac (~(run by lac.u.old) hood-port))
:: ::
++ coup-kiln-fancy (wrap take-coup-fancy):from-kiln ++ poke-hood-load :: recover lost brain
++ coup-kiln-spam ::
|= {way/wire saw/(unit tang)}
~? ?=(^ saw) [%kiln-spam-lame u.saw]
[~ +>]
::
++ coup-kiln-reload ::
|= {way/wire saw/(unit tang)}
~? ?=(^ saw) [%kiln-reload-lame u.saw]
[~ +>]
::
++ coup-kiln-overload ::
|= {way/wire saw/(unit tang)}
~? ?=(^ saw) [%kiln-overload-lame u.saw]
[~ +>]
::
++ poke-hood-load
|= dat/hood-part |= dat/hood-part
?> =(our src) ?> =(our.hid src.hid)
~& loaded+-.dat ~& loaded+-.dat
[~ %_(+> lac (~(put by lac) -.dat dat))] [~ %_(+> lac (~(put by lac) -.dat dat))]
:: ::
++ coup-drum-phat (wrap take-coup-phat):from-drum ::
++ coup-helm-hi (wrap coup-hi):from-helm ++ from-module :: create wrapper
++ coup-helm-ask (wrap coup-ask):from-helm |* _[%module ..$ _abet]:(hood-module)
++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum
++ from-lib
|* _[%helm ..$ _abet]:(helm)
=> .(+< [identity start finish]=+<) => .(+< [identity start finish]=+<)
=- [wrap=- *start] :: usage (wrap handle-arm):from-foo =- [wrap=- *start] :: usage (wrap handle-arm):from-foo
|* handle/_finish |* handle/_finish
@ -106,12 +115,23 @@
=. +>.handle (start hid (able identity)) =. +>.handle (start hid (able identity))
(ably (handle +<)) (ably (handle +<))
:: ::
++ from-drum (from-lib %drum [..$ _se-abet]:(drum)) :: per-module interface wrappers
++ from-helm (from-lib %helm [..$ _abet]:(helm)) ++ from-drum (from-module %drum [..$ _se-abet]:(hood-drum))
++ from-kiln (from-lib %kiln [..$ _abet]:(kiln)) ++ from-helm (from-module %helm [..$ _abet]:(hood-helm))
++ from-womb (from-lib %womb [..$ _abet]:(womb)) ++ from-kiln (from-module %kiln [..$ _abet]:(hood-kiln))
++ from-write (from-lib %write [..$ _abet]:(write)) ++ from-womb (from-module %womb [..$ _abet]:(hood-womb))
++ from-write (from-module %write [..$ _abet]:(hood-write))
:: ::
:: :: ::
:::: :: :: switchboard
:: :: ::
++ coup-drum-phat (wrap take-coup-phat):from-drum
++ coup-helm-hi (wrap coup-hi):from-helm
++ coup-helm-ask (wrap coup-ask):from-helm
++ coup-kiln-fancy (wrap take-coup-fancy):from-kiln
++ coup-kiln-reload (wrap take-coup-reload):from-kiln
++ coup-kiln-spam (wrap take-coup-spam):from-kiln
++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum
++ init-helm |=({way/wire *} [~ +>]) ++ init-helm |=({way/wire *} [~ +>])
++ made-write (wrap made):from-write ++ made-write (wrap made):from-write
++ made-kiln (wrap take-made):from-kiln ++ made-kiln (wrap take-made):from-kiln
@ -121,7 +141,7 @@
++ note-helm (wrap take-note):from-helm ++ note-helm (wrap take-note):from-helm
++ onto-drum (wrap take-onto):from-drum ++ onto-drum (wrap take-onto):from-drum
++ peer-drum (wrap peer):from-drum ++ peer-drum (wrap peer):from-drum
++ peek-x-womb peek-x:(womb hid (able %womb)) ++ peek-x-womb peek-x:(hood-womb hid (able %womb))
++ peer-scry-x-womb (wrap peer-scry-x):from-womb ++ peer-scry-x-womb (wrap peer-scry-x):from-womb
++ poke-atom (wrap poke-atom):from-helm ++ poke-atom (wrap poke-atom):from-helm
++ poke-dill-belt (wrap poke-dill-belt):from-drum ++ poke-dill-belt (wrap poke-dill-belt):from-drum

View File

@ -3,8 +3,7 @@
:::: /hoon/cat/gen :::: /hoon/cat/gen
:: ::
/? 310 /? 310
// /%%/ls/subdir /+ pretty-file, show-dir
// /%/pretty
:: ::
:::: ::::
:: ::
@ -29,6 +28,6 @@
* *
=- [palm+[": " ``~]^-]~ =- [palm+[": " ``~]^-]~
:~ rose+[" " `~]^~[leaf+"*" (smyt pax)] :~ rose+[" " `~]^~[leaf+"*" (smyt pax)]
`tank`(subdir vane pax dir.ark) `tank`(show-dir vane pax dir.ark)
== ==
== ==

View File

@ -6,9 +6,9 @@
:: ::
:::: ::::
:: ::
/+ womb /+ hood-womb
=* invite invite:womb =* invite invite:hood-womb
=* reference reference:womb =* reference reference:hood-womb
|% |%
++ plural ++ plural
|= {a/@u b/tape} ^+ b |= {a/@u b/tape} ^+ b
@ -25,7 +25,7 @@
-- --
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: {now/@da eny/@uvJ bec/beak}
{{who/@t etc/$@($~ {typ/type $~})} ref/(unit (each ship mail:womb))} {{who/@t etc/$@($~ {typ/type $~})} ref/(unit (each ship mail:hood-womb))}
== ==
?~ etc $(etc ~[planets+2]) ?~ etc $(etc ~[planets+2])
:- %womb-invite :- %womb-invite

View File

@ -3,7 +3,7 @@
:::: /hoon/load/hood/gen :::: /hoon/load/hood/gen
:: ::
/? 310 /? 310
/+ womb, old-zuse /+ hood-womb, old-zuse
=, old-zuse =, old-zuse
:: ::
:::: ::::
@ -12,9 +12,9 @@
|= $: {now/@da eny/@uvJ byk/beak} |= $: {now/@da eny/@uvJ byk/beak}
{{dap/term pas/@uw $~} $~} {{dap/term pas/@uw $~} $~}
== ==
^- {$hood-load ?(part:womb)} ^- {$hood-load ?(part:hood-womb)}
?+ dap ~|(unknown-backup+dap !!) ?+ dap ~|(unknown-backup+dap !!)
$womb $womb
=+ dat=.^(@ %cx (tope byk /jam-crub/womb-part/bak/hood/app)) =+ dat=.^(@ %cx (tope byk /jam-crub/womb-part/bak/hood/app))
[%hood-load ;;(part:womb (cue (dy:crub pas dat)))] [%hood-load ;;(part:hood-womb (cue (dy:crub pas dat)))]
== ==

View File

@ -3,12 +3,12 @@
:::: /hoon/replay-womb-log/hood/gen :::: /hoon/replay-womb-log/hood/gen
:: ::
/? 310 /? 310
/+ womb /+ hood-womb
:: ::
:::: ::::
:: ::
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: {now/@da eny/@uvJ bec/beak}
{log/(list {@uvJ transaction:womb}) $~} {log/(list {@uvJ transaction:hood-womb}) $~}
== ==
[%womb-replay-log log] [%womb-replay-log log]

View File

@ -3,7 +3,7 @@
:::: /hoon/transfer/hood/gen :::: /hoon/transfer/hood/gen
:: ::
/? 310 /? 310
/+ womb /+ hood-womb
:: ::
:::: ::::
:: ::
@ -13,5 +13,5 @@
== ==
:- %womb-reinvite :- %womb-reinvite
=+ [him=(scot %p p.bec) cas=(scot %da now) key=(scot %uv pas)] =+ [him=(scot %p p.bec) cas=(scot %da now) key=(scot %uv pas)]
=+ [pla=planets sta=stars]:.^(balance:womb %gx /[him]/hood/[cas]/womb/balance/[key]/womb-balance) =+ [pla=planets sta=stars]:.^(balance:hood-womb %gx /[him]/hood/[cas]/womb/balance/[key]/womb-balance)
[pas who pla sta "Email updated, new passcode" "Email correction"] [pas who pla sta "Email updated, new passcode" "Email correction"]

View File

@ -3,7 +3,7 @@
:::: /hoon/ls/gen :::: /hoon/ls/gen
:: ::
/? 310 /? 310
// /%/subdir /+ show-dir
:: ::
:::: ::::
:: ::
@ -11,4 +11,4 @@
:- %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+"~" (subdir vane arg dir.lon))]~ tang+[?~(dir.lon leaf+"~" (show-dir vane arg dir.lon))]~

View File

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

12
gen/serving.hoon Normal file
View File

@ -0,0 +1,12 @@
:: Eyre: show web base path
::
:::: /hoon/serving/gen
::
/? 310
::
::::
::
:- %say
|= [[now=time @ our=ship ^] ~ ~]
:- %noun
.^(path %e (en-beam:format [our %serv da+now] /))

View File

@ -3,11 +3,11 @@
:::: /hoon/balance/womb/gen :::: /hoon/balance/womb/gen
:: ::
/? 310 /? 310
/+ womb /+ hood-womb
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: {now/@da eny/@uvJ bec/beak}
{pas/@uvG $~} {pas/@uvG $~}
who/(unit @p) who/(unit @p)
== ==
=- [%womb-balance .^(balance:womb %gx /[him]/hood/[cas]/womb/balance/[key]/womb-balance)] =- [%womb-balance .^(balance:hood-womb %gx /[him]/hood/[cas]/womb/balance/[key]/womb-balance)]
[him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now) key=(scot %uv pas)] [him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now) key=(scot %uv pas)]

View File

@ -3,7 +3,7 @@
:::: /hoon/balance/womb/gen :::: /hoon/balance/womb/gen
:: ::
/? 310 /? 310
/+ womb /+ hood-womb
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: {now/@da eny/@uvJ bec/beak}
$~ $~
@ -11,5 +11,5 @@
== ==
:- %womb-balance-all :- %womb-balance-all
=+ [him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now)] =+ [him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now)]
=/ balances =>(womb ,(set [passhash mail])) =/ balances =>(hood-womb ,(set [passhash mail]))
.^(balances %gx /[him]/hood/[cas]/womb/balance/womb-balance-all) .^(balances %gx /[him]/hood/[cas]/womb/balance/womb-balance-all)

View File

@ -2,7 +2,7 @@
:::: /hoon/stats/womb/gen :::: /hoon/stats/womb/gen
:: ::
/? 310 /? 310
/+ womb /+ hood-womb
:- %say :- %say
|= $: {now/@da eny/@uvJ bec/beak} |= $: {now/@da eny/@uvJ bec/beak}
$~ $~
@ -10,4 +10,4 @@
== ==
:- %womb-stat-all :- %womb-stat-all
=+ [him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now)] =+ [him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now)]
.^((map ship stat:womb) %gx /[him]/hood/[cas]/womb/stats/womb-stat-all) .^((map ship stat:hood-womb) %gx /[him]/hood/[cas]/womb/stats/womb-stat-all)

View File

@ -1,5 +1,5 @@
:: :: :: :: :: ::
:::: /hoon/drum/lib :: :: :::: /hoon/drum/hood/lib :: ::
:: :: :: :: :: ::
/? 310 :: version /? 310 :: version
/- sole /- sole
@ -9,18 +9,18 @@
:::: :: :: :::: :: ::
:: :: :: :: :: ::
|% :: :: |% :: ::
++ drum-part {$drum $2 drum-pith-2} :: ++ part {$drum $2 pith-2} ::
++ drum-part-old {$drum $1 drum-pith-1} :: ++ part-old {$drum $1 pith-1} ::
:: :: :: ::
++ drum-pith-1 :: pre-style ++ pith-1 :: pre-style
%+ cork drum-pith-2 :: %+ cork pith-2 ::
|=(drum-pith-2 +<(bin *(map bone source-1))) :: |=(pith-2 +<(bin *(map bone source-1))) ::
:: :: :: ::
++ source-1 :: ++ source-1 ::
%+ cork source :: %+ cork source ::
|=(source +<(mir *(pair @ud (list @c)))) :: style-less mir |=(source +<(mir *(pair @ud (list @c)))) :: style-less mir
:: :: :: ::
++ drum-pith-2 :: ++ pith-2 ::
$: sys/(unit bone) :: local console $: sys/(unit bone) :: local console
eel/(set gill:gall) :: connect to eel/(set gill:gall) :: connect to
ray/(set well:gall) :: ray/(set well:gall) ::
@ -88,9 +88,9 @@
^- (list gill:gall) ^- (list gill:gall)
[[our %talk] [our %dojo] ~] [[our %talk] [our %dojo] ~]
:: ::
++ drum-make :: initial part ++ make :: initial part
|= our/ship |= our/ship
^- drum-part ^- part
:* %drum :* %drum
%2 %2
~ :: sys ~ :: sys
@ -100,19 +100,20 @@
~ :: bin ~ :: bin
== :: == ::
:: ::
++ drum-path :: encode path ::
++ en-gill :: gill to wire
|= gyl/gill:gall |= gyl/gill:gall
^- wire ^- wire
[%drum %phat (scot %p p.gyl) q.gyl ~] [%drum %phat (scot %p p.gyl) q.gyl ~]
:: ::
++ drum-phat :: decode path ++ de-gill :: gill from wire
|= way/wire ^- gill:gall |= way/wire ^- gill:gall
?>(?=({@ @ $~} way) [(slav %p i.way) i.t.way]) ?>(?=({@ @ $~} way) [(slav %p i.way) i.t.way])
-- --
:: ::
:::: ::::
:: ::
|= {hid/bowl:gall drum-part} :: main drum work |= {hid/bowl:gall part} :: main drum work
=+ (fall (~(get by bin) ost.hid) *source) =+ (fall (~(get by bin) ost.hid) *source)
=* dev - =* dev -
=> |% :: arvo structures => |% :: arvo structures
@ -136,7 +137,7 @@
++ 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=(drum-phat way) =+ gyl=(de-gill way)
?: (se-aint gyl) +>.$ ?: (se-aint gyl) +>.$
(se-diff gyl fec) (se-diff gyl fec)
:: ::
@ -178,7 +179,7 @@
++ 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=(drum-phat way) =+ gyl=(de-gill way)
?~ saw ?~ saw
(se-join gyl) (se-join gyl)
(se-dump:(se-drop & gyl) u.saw) (se-dump:(se-drop & gyl) u.saw)
@ -187,7 +188,7 @@
|= {way/wire saw/(unit tang)} |= {way/wire saw/(unit tang)}
=< se-abet =< se-view =< se-abet =< se-view
?~ saw +> ?~ saw +>
=+ gyl=(drum-phat way) =+ gyl=(de-gill way)
?: (se-aint gyl) +>.$ ?: (se-aint gyl) +>.$
%- se-dump:(se-drop & gyl) %- se-dump:(se-drop & gyl)
:_ u.saw :_ u.saw
@ -209,15 +210,15 @@
++ quit-phat :: ++ quit-phat ::
|= way/wire |= way/wire
=< se-abet =< se-view =< se-abet =< se-view
=+ gyl=(drum-phat way) =+ gyl=(de-gill way)
~& [%drum-quit src.hid ost.hid gyl] ~& [%drum-quit src.hid ost.hid gyl]
(se-drop %| gyl) (se-drop %| gyl)
:: :: :: :: :: ::
:::: :: :: :::: :: ::
:: :: :: :: :: ::
++ se-abet :: resolve ++ se-abet :: resolve
^- (quip move drum-part) ^- (quip move part)
=* pith +>+>+<+ =* pith +<+.$
?. se-ably ?. se-ably
=. . se-adit =. . se-adit
[(flop moz) pith] [(flop moz) pith]
@ -445,16 +446,16 @@
:: ::
++ se-poke :: send a poke ++ se-poke :: send a poke
|= {gyl/gill:gall par/pear} |= {gyl/gill:gall par/pear}
(se-emit [ost.hid %poke (drum-path gyl) gyl par]) (se-emit [ost.hid %poke (en-gill gyl) gyl par])
:: ::
++ se-peer :: send a peer ++ se-peer :: send a peer
|= gyl/gill:gall |= gyl/gill:gall
%- se-emit(fug (~(put by fug) gyl ~)) %- se-emit(fug (~(put by fug) gyl ~))
[ost.hid %peer (drum-path gyl) gyl /sole] [ost.hid %peer (en-gill gyl) gyl /sole]
:: ::
++ se-pull :: cancel subscription ++ se-pull :: cancel subscription
|= gyl/gill:gall |= gyl/gill:gall
(se-emit [ost.hid %pull (drum-path gyl) gyl ~]) (se-emit [ost.hid %pull (en-gill gyl) gyl ~])
:: ::
++ se-tame :: switch connection ++ se-tame :: switch connection
|= gyl/gill:gall |= gyl/gill:gall

View File

@ -1,5 +1,5 @@
:: :: :: :: :: ::
:::: /hoon/helm/lib :: :: :::: /hoon/helm/hood/lib :: ::
:: :: :: :: :: ::
/? 310 :: version /? 310 :: version
/- sole /- sole
@ -9,12 +9,12 @@
:::: :: :: :::: :: ::
:: :: :: :: :: ::
|% :: :: |% :: ::
++ helm-part {$helm $0 helm-pith} :: helm state ++ part {$helm $0 pith} :: helm state
++ helm-pith :: helm content ++ pith :: helm content
$: bur/(unit (pair ship mace:ames)) :: requesting ticket $: bur/(unit (pair ship mace:ames)) :: requesting ticket
hoc/(map bone helm-session) :: consoles hoc/(map bone session) :: consoles
== :: == ::
++ helm-session :: ++ session ::
$: say/sole-share :: console state $: say/sole-share :: console state
mud/(unit (sole-dialog @ud)) :: console dialog mud/(unit (sole-dialog @ud)) :: console dialog
== :: == ::
@ -43,8 +43,8 @@
:: :: :: :: :: ::
:::: :: :: :::: :: ::
:: :: :: :: :: ::
|= {bowl:gall helm-part} :: main helm work |= {bowl:gall part} :: main helm work
=+ sez=(fall (~(get by hoc) ost) *helm-session) =+ sez=(fall (~(get by hoc) ost) *session)
=> |% :: arvo structures => |% :: arvo structures
++ card :: ++ card ::
$% {$cash wire p/@p q/buck:ames} :: $% {$cash wire p/@p q/buck:ames} ::
@ -66,7 +66,7 @@
-- --
|_ moz/(list move) |_ moz/(list move)
++ abet :: resolve ++ abet :: resolve
[(flop moz) %_(+>+>+<+ hoc (~(put by hoc) ost sez))] [(flop moz) %_(+<+.$ hoc (~(put by hoc) ost sez))]
:: ::
++ emit |=(card %_(+> moz [[ost +<] moz])) :: return card ++ emit |=(card %_(+> moz [[ost +<] moz])) :: return card
++ emil :: return cards ++ emil :: return cards

View File

@ -1,5 +1,5 @@
:: :: :: :: :: ::
:::: /hoon/kiln/lib :: :: :::: /hoon/kiln/hood/lib :: ::
:: :: :: :: :: ::
/? 310 :: version /? 310 :: version
:: :: :: :: :: ::
@ -9,9 +9,9 @@
=, space:userlib =, space:userlib
=, format =, format
|% :: :: |% :: ::
++ kiln-part {$kiln $0 kiln-pith} :: kiln state ++ part {$kiln $0 pith} :: kiln state
++ kiln-pith :: ++ pith :: ::
$: rem/(map desk kiln-desk) :: $: rem/(map desk per-desk) ::
syn/(map kiln-sync {let/@ud ust/bone}) :: syn/(map kiln-sync {let/@ud ust/bone}) ::
autoload-on/? :: autoload-on/? ::
cur-hoon/@uvI :: cur-hoon/@uvI ::
@ -19,7 +19,7 @@
cur-zuse/@uvI :: cur-zuse/@uvI ::
cur-vanes/(map @tas @uvI) :: cur-vanes/(map @tas @uvI) ::
== :: == ::
++ kiln-desk :: per-desk state ++ per-desk :: per-desk state
$: auto/? :: escalate on failure $: auto/? :: escalate on failure
gem/germ :: strategy gem/germ :: strategy
her/@p :: from ship her/@p :: from ship
@ -56,7 +56,7 @@
:: :: :: :: :: ::
:::: :: :: :::: :: ::
:: :: :: :: :: ::
|= {bowl:gall kiln-part} :: main kiln work |= {bowl:gall part} :: main kiln work
?> =(src our) ?> =(src our)
=> |% :: arvo structures => |% :: arvo structures
++ card :: ++ card ::
@ -82,7 +82,7 @@
-- --
|_ moz/(list move) |_ moz/(list move)
++ abet :: resolve ++ abet :: resolve
[(flop moz) `kiln-part`+>+>->] [(flop moz) `part`+<+.$]
:: ::
++ emit |=(card %_(+> moz [[ost +<] moz])) :: return card ++ emit |=(card %_(+> moz [[ost +<] moz])) :: return card
++ emil :: return cards ++ emil :: return cards
@ -254,6 +254,11 @@
+>.$ +>.$
=. cur-vanes (~(put by cur-vanes) syd new-vane) =. cur-vanes (~(put by cur-vanes) syd new-vane)
(emit [%poke /kiln/reload/[syd] [our %hood] %helm-reload ~[syd]]) (emit [%poke /kiln/reload/[syd] [our %hood] %helm-reload ~[syd]])
::
++ coup-reload
|= {way/wire saw/(unit tang)}
~? ?=(^ saw) [%kiln-reload-lame u.saw]
+>.$
-- --
:: ::
++ poke-overload ++ poke-overload
@ -275,6 +280,15 @@
|= {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-reload ::
|= {way/wire saw/(unit tang)}
abet:(coup-reload:autoload way saw)
::
++ take-coup-spam ::
|= {way/wire saw/(unit tang)}
~? ?=(^ saw) [%kiln-spam-lame u.saw]
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)
@ -406,9 +420,9 @@
:: ::
++ work :: state machine ++ work :: state machine
|= syd/desk |= syd/desk
=+ ^- kiln-desk =+ ^- per-desk
%+ fall (~(get by rem) syd) %+ fall (~(get by rem) syd)
=+ *kiln-desk =+ *per-desk
%_(- cas [%da now]) %_(- cas [%da now])
|% |%
++ abet :: resolve ++ abet :: resolve

View File

@ -1,5 +1,5 @@
:: :: :: :: :: ::
:::: /hoon/womb/lib :: :: :::: /hoon/womb/hood/lib :: ::
:: :: :: :: :: ::
/? 310 :: version /? 310 :: version
/+ talk, old-phon /+ talk, old-phon

View File

@ -1,6 +1,6 @@
:: File writer module :: File writer module
:: ::
:::: /hoon/write/lib :::: /hoon/write/hood/lib
:: ::
/? 310 /? 310
/- plan-diff, plan-acct /- plan-diff, plan-acct

View File

@ -1,9 +1,10 @@
:: Pretty-printing util, should be in lib/ :: Untyped best-guess printer
:: ::
:::: /hoon/pretty/cat/gen :::: /hoon/pretty-file/lib
:: ::
/? 310 /? 310
:: ::
=< pretty-file
|% |%
++ pretty-noun ++ pretty-noun
|= pri/* ^- tank |= pri/* ^- tank
@ -21,8 +22,8 @@
:: ::
++ 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))))
++ pretty-file ++ pretty-file
=+ wain-to-tang=|=(a/wain (turn a |=(b/cord leaf+(trip b))))
|= 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)

22
lib/show-dir.hoon Normal file
View File

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

View File

@ -2,16 +2,16 @@
:::: /hoon/stat-all/womb/mar :::: /hoon/stat-all/womb/mar
:: ::
/? 310 /? 310
/+ womb, old-zuse /+ hood-womb, old-zuse
:: ::
:::: ~fyr :::: ~fyr
:: ::
=, old-zuse =, old-zuse
|_ balance:womb |_ balance:hood-womb
:: ::
++ grab :: convert from ++ grab :: convert from
|% |%
++ noun balance:womb :: clam from %noun ++ noun balance:hood-womb :: clam from %noun
-- --
++ grow ++ grow
|% |%

View File

@ -2,12 +2,12 @@
:::: /hoon/stat-all/womb/mar :::: /hoon/stat-all/womb/mar
:: ::
/? 310 /? 310
/+ womb, old-zuse /+ hood-womb, old-zuse
:: ::
:::: ~fyr :::: ~fyr
:: ::
=* invite invite:womb =* invite invite:hood-womb
=* reference reference:womb =* reference reference:hood-womb
=, old-zuse =, old-zuse
|_ {cord reference invite} |_ {cord reference invite}
:: ::

View File

@ -2,11 +2,11 @@
:::: /hoon/part/womb/mar :::: /hoon/part/womb/mar
:: ::
/? 310 /? 310
/+ womb /+ hood-womb
|_ all/part:womb |_ all/part:hood-womb
++ grad %jam ++ grad %jam
++ grow |% ++ jam (^jam all) ++ grow |% ++ jam (^jam all)
-- --
++ grab |% ++ jam |=(a/@ (noun (cue a))) ++ grab |% ++ jam |=(a/@ (noun (cue a)))
++ noun part:womb ++ noun part:hood-womb
-- -- -- --

View File

@ -2,9 +2,9 @@
:::: /hoon/replay-log/womb/mar :::: /hoon/replay-log/womb/mar
:: ::
/? 310 /? 310
/+ womb /+ hood-womb
|_ log/(list {@uvJ transaction:womb}) |_ log/(list {@uvJ transaction:hood-womb})
++ grab |% ++ grab |%
++ noun (list {@uvJ transaction:womb}) ++ noun (list {@uvJ transaction:hood-womb})
-- --
-- --

View File

@ -2,28 +2,28 @@
:::: /hoon/stat-all/womb/mar :::: /hoon/stat-all/womb/mar
:: ::
/? 310 /? 310
/+ womb, old-zuse /+ hood-womb, old-zuse
:: ::
:::: ~fyr :::: ~fyr
:: ::
=, old-zuse =, old-zuse
|_ all/(map ship stat:womb) |_ all/(map ship stat:hood-womb)
:: ::
++ grab :: convert from ++ grab :: convert from
|% |%
++ noun (map ship stat:womb) :: clam from %noun ++ noun (map ship stat:hood-womb) :: clam from %noun
-- --
++ grow ++ grow
|% |%
++ json ++ json
%- jobe %- jobe
%+ turn ~(tap by all) %+ turn ~(tap by all)
|= {a/ship b/stat:womb} ^- {cord ^json} |= {a/ship b/stat:hood-womb} ^- {cord ^json}
:- (crip +:<a>) :- (crip +:<a>)
(jobe live+[%s p.b] dist+(json-dist q.b) ~) (jobe live+[%s p.b] dist+(json-dist q.b) ~)
:: ::
++ json-dist ++ json-dist
|= a/dist:womb |= a/dist:hood-womb
%+ joba -.a %+ joba -.a
?- -.a ?- -.a
$free b+& $free b+&