mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
Merge remote-tracking branches 'ohaitch/fix-spur-print', 'ohaitch/gall-mass-and-kiln-mv', 'ohaitch/wt-nonnoun-mark', 'ohaitch/write-in-kiln', 'dhaffey/prompt-refresh' and 'ohaitch/no-mdy'
Fix dojo backwards path bug Fix |mass on moons, |mv on everyone (fixes #634) Print marks in dojo unless they're %noun write as hood facility rather than own app Refreshing of prompt line Down with .mdy, whatever that is
This commit is contained in:
commit
d559feaab0
@ -483,10 +483,11 @@
|
||||
::
|
||||
%show
|
||||
%+ dy-print cay
|
||||
=+ mar=|.(?:(=(%noun p.cay) ~ [%rose [~ " " ~] >p.cay< ~]~))
|
||||
?- p.p.mad
|
||||
0 ~
|
||||
1 [%rose [~ " " ~] (skol p.q.cay) ~]~ :: [%rose [~ " " ~] >p.cay< ~]
|
||||
2 [%rose [~ " " ~] (dy-show-type-noun p.q.cay) ~]~
|
||||
1 [[%rose [~ " " ~] (skol p.q.cay) ~] (mar)]
|
||||
2 [[%rose [~ " " ~] (dy-show-type-noun p.q.cay) ~] (mar)]
|
||||
==
|
||||
==
|
||||
::
|
||||
@ -828,7 +829,7 @@
|
||||
"/" ?:(=(%home q.dir) "=" (trip q.dir))
|
||||
"/" ?:(=([%ud 0] r.dir) "=" (scow r.dir))
|
||||
==
|
||||
?:(=(~ s.dir) "" (spud s.dir))
|
||||
?:(=(~ s.dir) "" (spud (flop s.dir)))
|
||||
::
|
||||
++ he-prom :: send prompt
|
||||
%- he-diff
|
||||
|
@ -2,7 +2,7 @@
|
||||
:::: /hoon/hood/ape :: ::
|
||||
:: :: ::
|
||||
/? 314 :: zuse version
|
||||
/+ sole, talk, helm, kiln, drum :: libraries
|
||||
/+ sole, talk, helm, kiln, drum, write :: libraries
|
||||
[. helm kiln drum]
|
||||
:: :: ::
|
||||
:::: :: ::
|
||||
@ -17,6 +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) ::
|
||||
== ::
|
||||
++ hood-head ,_-:*hood-part ::
|
||||
++ hood-make ::
|
||||
@ -25,11 +26,13 @@
|
||||
%drum (drum-port our) ::
|
||||
%helm *helm-part ::
|
||||
%kiln *kiln-part ::
|
||||
%write *part:write ::
|
||||
== ::
|
||||
++ hood-part ::
|
||||
$% [%drum %0 drum-pith] ::
|
||||
[%helm %0 helm-pith] ::
|
||||
[%kiln %0 kiln-pith] ::
|
||||
[%write %0 pith:write] ::
|
||||
== ::
|
||||
-- ::
|
||||
:: :: ::
|
||||
@ -81,8 +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))
|
||||
::
|
||||
++ init-helm |=([way=wire *] [~ +>])
|
||||
++ 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
|
||||
@ -121,6 +126,7 @@
|
||||
++ 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-will (wrap poke-will):from-helm
|
||||
++ quit-drum-phat (wrap quit-phat):from-drum
|
||||
++ reap-drum-phat (wrap reap-phat):from-drum
|
||||
|
@ -1,36 +0,0 @@
|
||||
:: File writer
|
||||
::
|
||||
:::: /hoon/write/app
|
||||
::
|
||||
|_ [bowl ~]
|
||||
++ beak-now byk(r [%da now])
|
||||
++ poke-json
|
||||
|= jon=json
|
||||
=- (poke--data (need (- jon.+)))
|
||||
=> jo
|
||||
%- ot :~
|
||||
pax/(cu deft (su fel:stab))
|
||||
dat/(of json/some mime/(pe / (cu taco so)) ~) :: XX mite
|
||||
==
|
||||
::
|
||||
++ poke-write-paste
|
||||
|= [typ=?(%hoon %md %txt) txt=@t]
|
||||
(poke--data [`typ /pub/paste/(scot %da now)] %mime / (taco txt))
|
||||
::
|
||||
++ poke--data
|
||||
|= [[ext=(unit ,@t) pax=path] dat=$%([%json json] [%mime mime])]
|
||||
?~ ext $(ext [~ -.dat])
|
||||
=+ cay=?-(-.dat %json [-.dat !>(+.dat)], %mime [-.dat !>(+.dat)])
|
||||
?: =(u.ext -.dat) (made pax ~ `cay)
|
||||
[[ost %exec pax our ~ beak-now %cast u.ext `cay]~ +>.$] :: XX defer %nice
|
||||
::
|
||||
++ made
|
||||
|= [pax=wire @ res=gage]
|
||||
?. =(our src)
|
||||
~|(foreign-write/[our=our src=src] !!)
|
||||
?+ -.res ~|(gage/-.res !!)
|
||||
%| (mean p.res)
|
||||
%& =- [[ost %info / our -]~ +>.$]
|
||||
(foal :(welp (tope beak-now ~) pax /[-.p.res]) p.res)
|
||||
==
|
||||
--
|
@ -1218,17 +1218,9 @@
|
||||
:^ hen %give %mass
|
||||
:- %gall
|
||||
:- %|
|
||||
%- |= a=(list (list mass)) ^- (list mass) :: XX single-home
|
||||
=+ a2=a
|
||||
?~ a !!
|
||||
?~ i.a ~
|
||||
:_ $(a (turn a2 tail))
|
||||
:- p.i.i.a
|
||||
?~ -.q.i.i.a
|
||||
[%& (turn (turn a2 head) |=(b=mass ?~(-.q.b p.q.b !!)))]
|
||||
[%| $(a (turn (turn a2 head) |=(b=mass ?~(-.q.b !! p.q.b))))]
|
||||
%+ turn (~(tap by pol.all))
|
||||
|= [@ mast]
|
||||
%+ turn (~(tap by pol.all)) :: XX single-home
|
||||
|= [our=@ mast] ^- mass
|
||||
:+ (scot %p our) %|
|
||||
:~ foreign/`sap
|
||||
blocked/[%| (sort :_(aor (~(tap by (~(run by wub) |=(sofa `+<))))))]
|
||||
active/[%| (sort :_(aor (~(tap by (~(run by bum) |=(seat `+<))))))]
|
||||
|
@ -142,7 +142,7 @@
|
||||
|= [input=path output=path]
|
||||
%+ do-info "moved"
|
||||
?> =(-:(flop input) -:(flop output))
|
||||
%+ furl (fray output)
|
||||
%+ furl (fray input)
|
||||
(foal output -:(flop input) %noun .^(%cx input))
|
||||
::
|
||||
++ poke-label
|
||||
|
58
lib/write.hoon
Normal file
58
lib/write.hoon
Normal file
@ -0,0 +1,58 @@
|
||||
:: File writer module
|
||||
::
|
||||
:::: /hoon/write/lib
|
||||
::
|
||||
|%
|
||||
++ part ,[%write %0 pith] :: no state
|
||||
++ pith ,~
|
||||
--
|
||||
::
|
||||
::::
|
||||
::
|
||||
|%
|
||||
++ data $%([%json json] [%mime mime])
|
||||
++ card $% [%exec wire @p ~ [beak silk]]
|
||||
[%info wire @p toro]
|
||||
==
|
||||
--
|
||||
::
|
||||
::::
|
||||
::
|
||||
|= [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-json
|
||||
:: |= jon=json
|
||||
:: =- (poke--data (need (- jon.+)))
|
||||
:: => jo
|
||||
:: %- ot :~
|
||||
:: pax/(cu deft (su fel:stab))
|
||||
:: dat/(of json/some mime/(pe / (cu taco so)) ~) :: XX mite
|
||||
:: ==
|
||||
::
|
||||
++ poke-paste
|
||||
|= [typ=?(%hoon %md %txt) txt=@t] ^+ abet
|
||||
(poke--data [`typ /web/paste/(scot %da now)] %mime / (taco txt))
|
||||
::
|
||||
++ poke--data
|
||||
|= [[ext=(unit ,@t) pax=path] dat=data] ^+ abet
|
||||
?~ ext $(ext [~ -.dat])
|
||||
=+ cay=?-(-.dat %json [-.dat !>(+.dat)], %mime [-.dat !>(+.dat)])
|
||||
?: =(u.ext -.dat) (made pax ~ `cay)
|
||||
=< abet
|
||||
%^ emit %exec write/pax :: XX defer %nice
|
||||
[our ~ beak-now %cast u.ext `cay]
|
||||
::
|
||||
++ made
|
||||
|= [pax=wire @ res=gage] ^+ abet
|
||||
?. =(our src)
|
||||
~|(foreign-write/[our=our src=src] !!)
|
||||
?+ -.res ~|(gage/-.res !!)
|
||||
%| (mean p.res)
|
||||
%& =- abet:(emit %info write/~ our -)
|
||||
(foal :(welp (tope beak-now ~) pax /[-.p.res]) p.res)
|
||||
==
|
||||
--
|
@ -6,7 +6,7 @@
|
||||
;script@"/~/as/own/~/at/home/lib/urb.js";
|
||||
;script:'''
|
||||
document.title = 'pastebin - urbit'
|
||||
urb.appl = 'write'
|
||||
urb.appl = 'hood'
|
||||
urb.send.mark = 'write-paste'
|
||||
submit = function(){
|
||||
if($("select :selected").attr('value')===undefined) {
|
||||
|
Loading…
Reference in New Issue
Block a user