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
::
/? 310
/+ sole, womb, prey
/+ sole, hood-womb, prey
[. sole]
|%
++ card
$% {$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)
++ email @t
@ -154,7 +154,7 @@
^- card
:^ %poke /invite/(scot %t ask) [(need wom) %hood]
:- %womb-invite
^- [cord:womb invite:womb]
^- [cord:hood-womb invite:hood-womb]
=+ inv=(scot %uv (end 7 1 eny.bow))
[inv [ask 1 0 "You have been invited to Urbit: {(trip inv)}" ""]]
--

View File

@ -2,56 +2,84 @@
:::: /hoon/hood/app :: ::
:: :: ::
/? 310 :: zuse version
/+ sole, talk, helm, kiln, drum, write, womb :: libraries
[. helm kiln drum]
/+ sole, talk, :: libraries
:: 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)} ::
++ hood-1 ::
++ hood-1 :: unified state
{$1 lac/(map @tas hood-part)} ::
++ hood-good ::
++ hood-good :: extract specific
|* hed/hood-head ::
|= paw/hood-part ::
?- hed ::
$drum ?>(?=($drum -.paw) `drum-part`paw) ::
$helm ?>(?=($helm -.paw) `helm-part`paw) ::
$kiln ?>(?=($kiln -.paw) `kiln-part`paw) ::
$womb ?>(?=($womb -.paw) `part:womb`paw) ::
$write ?>(?=($write -.paw) `part:write`paw) ::
== ::
++ hood-head _-:*hood-part ::
$drum ?>(?=($drum -.paw) `part:hood-drum`paw) ::
$helm ?>(?=($helm -.paw) `part:hood-helm`paw) ::
$kiln ?>(?=($kiln -.paw) `part:hood-kiln`paw) ::
$womb ?>(?=($womb -.paw) `part:hood-womb`paw) ::
$write ?>(?=($write -.paw) `part:hood-write`paw) ::
== :: module name
++ hood-head _-:*hood-part :: initialize state
++ hood-make ::
|* {our/@p hed/hood-head} ::
?- hed ::
$drum (drum-make our) ::
$helm *helm-part ::
$kiln *kiln-part ::
$womb *part:womb ::
$write *part:write ::
$drum (make:hood-drum our) ::
$helm *part:hood-helm ::
$kiln *part:hood-kiln ::
$womb *part:hood-womb ::
$write *part:hood-write ::
== ::
++ hood-part-old hood-part ::
++ hood-port ::
++ hood-part-old hood-part :: old state for ++prep
++ hood-port :: state transition
|= paw/hood-part-old ^- hood-part ::
paw ::
:: ::
++ hood-part ::
$% {$drum $2 drum-pith-2} ::
{$helm $0 helm-pith} ::
{$kiln $0 kiln-pith} ::
{$womb $1 pith:womb} ::
{$write $0 pith:write} ::
++ hood-part :: current module state
$% {$drum $2 pith-2:hood-drum} ::
{$helm $0 pith:hood-helm} ::
{$kiln $0 pith:hood-kiln} ::
{$womb $1 pith:hood-womb} ::
{$write $0 pith:hood-write} ::
== ::
-- ::
:: :: ::
:::: :: ::
:::: :: :: app proper
:: :: ::
=, gall
|_ $: hid/bowl :: system state
hood-1 :: server state
|_ $: hid/bowl :: gall environment
hood-1 :: module states
== ::
++ able :: find+make part
|* hed/hood-head
@ -63,42 +91,23 @@
|* {(list) hood-part}
[(flop +<-) %_(+> lac (~(put by lac) +<+< +<+))]
:: :: ::
:::: :: ::
:::: :: :: generic handling
:: :: ::
++ prep
|= old/(unit hood-old) ^- (quip _!! _+>) ::
|= old/(unit hood-old) ^- (quip _!! _+>)
:- ~
?~ old +>
+>(lac (~(run by lac.u.old) hood-port))
::
++ coup-kiln-fancy (wrap take-coup-fancy):from-kiln
++ 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
++ poke-hood-load :: recover lost brain
|= dat/hood-part
?> =(our src)
?> =(our.hid src.hid)
~& loaded+-.dat
[~ %_(+> lac (~(put by lac) -.dat dat))]
::
++ 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
++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum
++ from-lib
|* _[%helm ..$ _abet]:(helm)
::
++ from-module :: create wrapper
|* _[%module ..$ _abet]:(hood-module)
=> .(+< [identity start finish]=+<)
=- [wrap=- *start] :: usage (wrap handle-arm):from-foo
|* handle/_finish
@ -106,12 +115,23 @@
=. +>.handle (start hid (able identity))
(ably (handle +<))
::
++ from-drum (from-lib %drum [..$ _se-abet]:(drum))
++ from-helm (from-lib %helm [..$ _abet]:(helm))
++ from-kiln (from-lib %kiln [..$ _abet]:(kiln))
++ from-womb (from-lib %womb [..$ _abet]:(womb))
++ from-write (from-lib %write [..$ _abet]:(write))
:: per-module interface wrappers
++ from-drum (from-module %drum [..$ _se-abet]:(hood-drum))
++ from-helm (from-module %helm [..$ _abet]:(hood-helm))
++ from-kiln (from-module %kiln [..$ _abet]:(hood-kiln))
++ 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 *} [~ +>])
++ made-write (wrap made):from-write
++ made-kiln (wrap take-made):from-kiln
@ -121,7 +141,7 @@
++ note-helm (wrap take-note):from-helm
++ onto-drum (wrap take-onto):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
++ poke-atom (wrap poke-atom):from-helm
++ poke-dill-belt (wrap poke-dill-belt):from-drum

View File

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

View File

@ -6,9 +6,9 @@
::
::::
::
/+ womb
=* invite invite:womb
=* reference reference:womb
/+ hood-womb
=* invite invite:hood-womb
=* reference reference:hood-womb
|%
++ plural
|= {a/@u b/tape} ^+ b
@ -25,7 +25,7 @@
--
:- %say
|= $: {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])
:- %womb-invite

View File

@ -3,7 +3,7 @@
:::: /hoon/load/hood/gen
::
/? 310
/+ womb, old-zuse
/+ hood-womb, old-zuse
=, old-zuse
::
::::
@ -12,9 +12,9 @@
|= $: {now/@da eny/@uvJ byk/beak}
{{dap/term pas/@uw $~} $~}
==
^- {$hood-load ?(part:womb)}
^- {$hood-load ?(part:hood-womb)}
?+ dap ~|(unknown-backup+dap !!)
$womb
=+ 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
::
/? 310
/+ womb
/+ hood-womb
::
::::
::
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
{log/(list {@uvJ transaction:womb}) $~}
{log/(list {@uvJ transaction:hood-womb}) $~}
==
[%womb-replay-log log]

View File

@ -3,7 +3,7 @@
:::: /hoon/transfer/hood/gen
::
/? 310
/+ womb
/+ hood-womb
::
::::
::
@ -13,5 +13,5 @@
==
:- %womb-reinvite
=+ [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"]

View File

@ -3,7 +3,7 @@
:::: /hoon/ls/gen
::
/? 310
// /%/subdir
/+ show-dir
::
::::
::
@ -11,4 +11,4 @@
:- %say
|= {^ {arg/path $~} vane/?($g $c)}
=+ 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
::
/? 310
/+ womb
/+ hood-womb
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
{pas/@uvG $~}
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)]

View File

@ -3,7 +3,7 @@
:::: /hoon/balance/womb/gen
::
/? 310
/+ womb
/+ hood-womb
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
$~
@ -11,5 +11,5 @@
==
:- %womb-balance-all
=+ [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)

View File

@ -2,7 +2,7 @@
:::: /hoon/stats/womb/gen
::
/? 310
/+ womb
/+ hood-womb
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
$~
@ -10,4 +10,4 @@
==
:- %womb-stat-all
=+ [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
/- sole
@ -9,18 +9,18 @@
:::: :: ::
:: :: ::
|% :: ::
++ drum-part {$drum $2 drum-pith-2} ::
++ drum-part-old {$drum $1 drum-pith-1} ::
++ part {$drum $2 pith-2} ::
++ part-old {$drum $1 pith-1} ::
:: ::
++ drum-pith-1 :: pre-style
%+ cork drum-pith-2 ::
|=(drum-pith-2 +<(bin *(map bone source-1))) ::
++ pith-1 :: pre-style
%+ cork pith-2 ::
|=(pith-2 +<(bin *(map bone source-1))) ::
:: ::
++ source-1 ::
%+ cork source ::
|=(source +<(mir *(pair @ud (list @c)))) :: style-less mir
:: ::
++ drum-pith-2 ::
++ pith-2 ::
$: sys/(unit bone) :: local console
eel/(set gill:gall) :: connect to
ray/(set well:gall) ::
@ -88,9 +88,9 @@
^- (list gill:gall)
[[our %talk] [our %dojo] ~]
::
++ drum-make :: initial part
++ make :: initial part
|= our/ship
^- drum-part
^- part
:* %drum
%2
~ :: sys
@ -100,19 +100,20 @@
~ :: bin
== ::
::
++ drum-path :: encode path
::
++ en-gill :: gill to wire
|= gyl/gill:gall
^- wire
[%drum %phat (scot %p p.gyl) q.gyl ~]
::
++ drum-phat :: decode path
++ de-gill :: gill from wire
|= way/wire ^- gill:gall
?>(?=({@ @ $~} 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)
=* dev -
=> |% :: arvo structures
@ -136,7 +137,7 @@
++ diff-sole-effect-phat :: app event
|= {way/wire fec/sole-effect}
=< se-abet =< se-view
=+ gyl=(drum-phat way)
=+ gyl=(de-gill way)
?: (se-aint gyl) +>.$
(se-diff gyl fec)
::
@ -178,7 +179,7 @@
++ reap-phat :: ack connect
|= {way/wire saw/(unit tang)}
=< se-abet =< se-view
=+ gyl=(drum-phat way)
=+ gyl=(de-gill way)
?~ saw
(se-join gyl)
(se-dump:(se-drop & gyl) u.saw)
@ -187,7 +188,7 @@
|= {way/wire saw/(unit tang)}
=< se-abet =< se-view
?~ saw +>
=+ gyl=(drum-phat way)
=+ gyl=(de-gill way)
?: (se-aint gyl) +>.$
%- se-dump:(se-drop & gyl)
:_ u.saw
@ -209,15 +210,15 @@
++ quit-phat ::
|= way/wire
=< se-abet =< se-view
=+ gyl=(drum-phat way)
=+ gyl=(de-gill way)
~& [%drum-quit src.hid ost.hid gyl]
(se-drop %| gyl)
:: :: ::
:::: :: ::
:: :: ::
++ se-abet :: resolve
^- (quip move drum-part)
=* pith +>+>+<+
^- (quip move part)
=* pith +<+.$
?. se-ably
=. . se-adit
[(flop moz) pith]
@ -445,16 +446,16 @@
::
++ se-poke :: send a poke
|= {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
|= gyl/gill:gall
%- 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
|= 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
|= gyl/gill:gall

View File

@ -1,5 +1,5 @@
:: :: ::
:::: /hoon/helm/lib :: ::
:::: /hoon/helm/hood/lib :: ::
:: :: ::
/? 310 :: version
/- sole
@ -9,12 +9,12 @@
:::: :: ::
:: :: ::
|% :: ::
++ helm-part {$helm $0 helm-pith} :: helm state
++ helm-pith :: helm content
++ part {$helm $0 pith} :: helm state
++ pith :: helm content
$: 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
mud/(unit (sole-dialog @ud)) :: console dialog
== ::
@ -43,8 +43,8 @@
:: :: ::
:::: :: ::
:: :: ::
|= {bowl:gall helm-part} :: main helm work
=+ sez=(fall (~(get by hoc) ost) *helm-session)
|= {bowl:gall part} :: main helm work
=+ sez=(fall (~(get by hoc) ost) *session)
=> |% :: arvo structures
++ card ::
$% {$cash wire p/@p q/buck:ames} ::
@ -66,7 +66,7 @@
--
|_ moz/(list move)
++ 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
++ emil :: return cards

View File

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

View File

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

View File

@ -1,6 +1,6 @@
:: File writer module
::
:::: /hoon/write/lib
:::: /hoon/write/hood/lib
::
/? 310
/- 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
::
=< pretty-file
|%
++ pretty-noun
|= pri/* ^- tank
@ -21,8 +22,8 @@
::
++ 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
=+ wain-to-tang=|=(a/wain (turn a |=(b/cord leaf+(trip b))))
|= fyl/* ^- tang
=+ `(unit wain)`?@(fyl `(to-wain:format fyl) ((soft wain) fyl))
?^ - (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
::
/? 310
/+ womb, old-zuse
/+ hood-womb, old-zuse
::
:::: ~fyr
::
=, old-zuse
|_ balance:womb
|_ balance:hood-womb
::
++ grab :: convert from
|%
++ noun balance:womb :: clam from %noun
++ noun balance:hood-womb :: clam from %noun
--
++ grow
|%

View File

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

View File

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

View File

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

View File

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