From 9b2ae7f460b4c6f818ac404bd827625743af7a77 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 11 Feb 2016 15:29:52 -0800 Subject: [PATCH] fix lib/write --- app/hood.hoon | 24 ++++++++++++------------ lib/down-jet/rend.hoon | 3 ++- lib/write.hoon | 17 +++++++++-------- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/hood.hoon b/app/hood.hoon index de85f86e7..f8859eeb7 100644 --- a/app/hood.hoon +++ b/app/hood.hoon @@ -2,7 +2,7 @@ :::: /hoon/hood/app :: :: :: :: :: /? 314 :: zuse version -/+ sole, talk, helm, kiln, drum ::, write :: libraries +/+ sole, talk, helm, kiln, drum, write :: libraries [. helm kiln drum] :: :: :: :::: :: :: @@ -17,7 +17,7 @@ $drum ?>(?=($drum -.paw) `drum-part`paw) :: $helm ?>(?=($helm -.paw) `helm-part`paw) :: $kiln ?>(?=($kiln -.paw) `kiln-part`paw) :: - :: $write ?>(?=($write -.paw) `part:write`paw) :: + $write ?>(?=($write -.paw) `part:write`paw) :: == :: ++ hood-head _-:*hood-part :: ++ hood-make :: @@ -26,13 +26,13 @@ $drum (drum-port our) :: $helm *helm-part :: $kiln *kiln-part :: - :: $write *part:write :: + $write *part:write :: == :: ++ hood-part :: $% {$drum $0 drum-pith} :: {$helm $0 helm-pith} :: {$kiln $0 kiln-pith} :: - :: {$write $0 pith:write} :: + {$write $0 pith:write} :: == :: -- :: :: :: :: @@ -84,10 +84,10 @@ ++ from-drum (from-lib %drum [..$ _se-abet]:(drum)) ++ from-helm (from-lib %helm [..$ _abet]:(helm)) ++ from-kiln (from-lib %kiln [..$ _abet]:(kiln)) -:: ++ from-write (from-lib %write [..$ _abet]:(write)) +++ from-write (from-lib %write [..$ _abet]:(write)) :: ++ init-helm |=({way/wire *} [~ +>]) -:: ++ made-write (wrap made):from-write +++ made-write (wrap made):from-write ++ made-kiln (wrap take-made):from-kiln ++ mere-kiln (wrap take-mere):from-kiln ++ mere-kiln-sync (wrap take-mere-sync):from-kiln @@ -98,7 +98,7 @@ ++ poke-dill-belt (wrap poke-dill-belt):from-drum ++ poke-drum-link (wrap poke-link):from-drum ++ poke-drum-unlink (wrap poke-unlink):from-drum -::++ poke-drum-exit (wrap poke-exit):from-drum +:: ++ poke-drum-exit (wrap poke-exit):from-drum ++ poke-drum-start (wrap poke-start):from-drum ++ poke-helm-hi (wrap poke-hi):from-helm ++ poke-helm-init (wrap poke-init):from-helm :: XX used? @@ -129,11 +129,11 @@ ++ poke-kiln-overload (wrap poke-overload):from-kiln ++ poke-kiln-unmount (wrap poke-unmount):from-kiln ++ poke-kiln-unsync (wrap poke-unsync):from-kiln -:: ++ poke-write-paste (wrap poke-paste):from-write -:: ++ poke-write-comment (wrap poke-comment):from-write -:: ++ poke-write-paste (wrap poke-paste):from-write -:: ++ poke-write-tree (wrap poke-tree):from-write -:: ++ poke-write-wipe (wrap poke-wipe):from-write +++ poke-write-paste (wrap poke-paste):from-write +++ poke-write-comment (wrap poke-comment):from-write +++ poke-write-paste (wrap poke-paste):from-write +++ poke-write-tree (wrap poke-tree):from-write +++ poke-write-wipe (wrap poke-wipe):from-write ++ poke-will (wrap poke-will):from-helm ++ quit-drum-phat (wrap quit-phat):from-drum ++ reap-drum-phat (wrap reap-phat):from-drum diff --git a/lib/down-jet/rend.hoon b/lib/down-jet/rend.hoon index b6417ec52..eaa385f8d 100644 --- a/lib/down-jet/rend.hoon +++ b/lib/down-jet/rend.hoon @@ -1,8 +1,9 @@ :: ++down rendering arms -!: +:: :::: /hoon/rend/down-jet/lib :: /? 314 +!: |% ++ into-inner |= {a/marl b/manx} diff --git a/lib/write.hoon b/lib/write.hoon index b4076cdcd..45d10d150 100644 --- a/lib/write.hoon +++ b/lib/write.hoon @@ -19,18 +19,18 @@ :: :::: :: -|= [bowl part] +|= {bowl part} =* par +<+ |_ moz/(list {bone card}) ++ abet [(flop moz) `part`par] ++ emit |=(a/card %_(+> moz :_(moz [ost a]))) ++ beak-now byk(r [%da now]) ++ poke-wipe - |= sup=spur ^+ abet :: XX determine extension, beak + |= sup/spur ^+ abet :: XX determine extension, beak =+ ext=%md ?~ (file (tope beak-now [ext sup])) - ~|(not-found/[ext `path`(flop sup)] !!) - =- abet:(emit %info write/~ our -) + ~|(not-found+[ext `path`(flop sup)] !!) + =- abet:(emit %info write+~ our -) (fray (tope beak-now [ext sup])) :: ++ poke-tree @@ -39,7 +39,7 @@ :: ++ poke-paste |= {typ/?($hoon $md $txt) txt/@t} ^+ abet - (poke-data [`typ /web/paste/(scot %da now)] %mime / (taco txt)) + (poke--data [`typ /web/paste/(scot %da now)] %mime / (taco txt)) :: ++ poke-comment |= {pax/path txt/@t} ^+ abet @@ -52,18 +52,19 @@ ?~ ext $(ext [~ -.dat]) =+ cay=?-(-.dat $json [-.dat !>(+.dat)], $mime [-.dat !>(+.dat)]) ?: =(u.ext -.dat) - (made pax ~ `cay) + (made pax ~ &+cay) =< abet %^ emit %exec write+pax :: XX defer %nice - [our ~ beak-now %cast u.ext `cay] + [our ~ beak-now %cast u.ext $+cay] :: ++ made |= {pax/wire @ res/gage} ^+ abet :: ?. =(our src) :: ~|(foreign-write/[our=our src=src] !!) - ?+ -.res ~|(gage/-.res !!) + ?+ -.res ~|(gage+-.res !!) $| (mean p.res) $& =- abet:(emit %info write+~ our -) (foal :(welp (tope beak-now ~) pax /[-.p.res]) p.res) == -- +