mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
Merge branch 'dish' of https://github.com/urbit/urbit into dish
This commit is contained in:
commit
0c7a8604f7
182
arvo/eyre.hoon
182
arvo/eyre.hoon
@ -376,99 +376,72 @@
|
||||
::
|
||||
?(%dumb %mean %nice %rush %rust)
|
||||
?> ?=([%hoop @ @ @ ?([%mess ~] [%show @ ~])] tea)
|
||||
=+ ^= ouy
|
||||
%- yolk:(gale (slav %p i.t.tea) i.t.t.tea)
|
||||
(slav %ud i.t.t.t.tea)
|
||||
=+ our=(slav %p i.t.tea)
|
||||
=* ses i.t.t.tea
|
||||
=+ nap=(slav %ud i.t.t.t.tea)
|
||||
=+ ouy=(yolk:(gale our ses) nap)
|
||||
?~ ouy
|
||||
+>.$
|
||||
=* mab t.t.t.t.tea
|
||||
=+ woy=(yule:u.ouy ?+(i.mab !! %mess %meg, %show %sub))
|
||||
=< abet =< work =< abet
|
||||
?- -.+.sih
|
||||
%dumb
|
||||
dumb:woy
|
||||
%mean
|
||||
=+ ^= jon
|
||||
%- jobe
|
||||
:- [%ok %b |]
|
||||
?~ p.+.sih ~
|
||||
:+ [%err %s p.u.p.+.sih]
|
||||
:+ %res %s
|
||||
%- crip
|
||||
%+ slag 2
|
||||
^- tape
|
||||
%+ roll q.u.p.+.sih
|
||||
|= [p=tank q=tape]
|
||||
:(weld q "\\n" ~(ram re p))
|
||||
~
|
||||
?~ t.mab
|
||||
(hear:woy ~ %& %json !>(jon))
|
||||
=+ nap=(slav %ud i.t.mab)
|
||||
=+ sem=(need (~(get by can.sub.siq:beat:u.ouy) nap))
|
||||
=. jon
|
||||
?. ?=(%show i.t.t.t.t.tea) jon
|
||||
%- jobe
|
||||
:~ [%ship %s (rsh 3 1 (scot %p p.hap.sem))]
|
||||
[%appl %s q.hap.sem]
|
||||
[%path %s (crip <pax.sem>)]
|
||||
[%data `json`jon]
|
||||
==
|
||||
=+ huq=``[%json !>(jon)]
|
||||
?~ num.sem (hear:woy huq)
|
||||
?- -.u.num.sem
|
||||
%&
|
||||
=+ yoo=abet:(busk:(yule:u.ouy %nil) p.u.num.sem 0 huq)
|
||||
yoo(can.sub.siq (~(put by can.sub.siq.yoo) nap sem(num ~)))
|
||||
%|
|
||||
=+ ^= yoo
|
||||
=< abet
|
||||
%^ busk:(yule:(hear:(yule:u.ouy %sub) huq) %nil)
|
||||
p.u.num.sem
|
||||
0
|
||||
`[%& %json !>((joba %ok %b &))]
|
||||
yoo(can.sub.siq (~(put by can.sub.siq.yoo) nap sem(num ~)))
|
||||
==
|
||||
abet:work:abet:dumb:woy
|
||||
::
|
||||
%nice
|
||||
=< abet =< work =< abet
|
||||
?. ?=(%mess i.mab)
|
||||
u.ouy
|
||||
(hear:woy ~ %& %json !>((joba %ok %b &)))
|
||||
::
|
||||
%mean
|
||||
=< abet =< work =< abet
|
||||
=+ jon=(rong p.+.sih)
|
||||
?~ t.mab
|
||||
(hear:woy ~ %& %json !>(jon))
|
||||
=+ can=(slav %ud i.t.mab)
|
||||
=+ sem=(need (~(get by can.sub.siq:beat:u.ouy) can))
|
||||
(soon %& sem u.ouy can %show ?.(?=(%show i.mab) jon (wrap sem jon)))
|
||||
::
|
||||
?(%rust %rush)
|
||||
?< ?=(~ t.mab)
|
||||
=+ nap=(slav %ud i.t.mab)
|
||||
=+ sem=(need (~(get by can.sub.siq:beat:u.ouy) nap))
|
||||
?: &(=(0 nap) =(~ num.sem))
|
||||
(hear:woy ~ %& %json !>((joba %reload %b %&)))
|
||||
=+ ^= cay ^- cage
|
||||
?. ?=(%json p.+.sih)
|
||||
[p.+.sih (slot 3 (spec (slot 3 [typ +.sih])))]
|
||||
:- %json
|
||||
!> ^- json
|
||||
%- jobe
|
||||
:~ [%ship %s (rsh 3 1 (scot %p p.hap.sem))]
|
||||
[%appl %s q.hap.sem]
|
||||
[%path %s (crip <pax.sem>)]
|
||||
[%data (json q.+.sih)]
|
||||
==
|
||||
=+ huq=`?:(?=(%rust -.+.sih) [%& cay] [%| cay])
|
||||
?~ num.sem (hear:woy huq)
|
||||
?- -.u.num.sem
|
||||
%&
|
||||
=+ can=(slav %ud i.t.mab)
|
||||
=+ sem=(need (~(get by can.sub.siq:beat:u.ouy) can))
|
||||
?: =(0 can)
|
||||
=< abet =< work =< abet
|
||||
?~ num.sem
|
||||
(hear:woy ~ %& %json !>((joba %reload %b %&)))
|
||||
?> -.u.num.sem
|
||||
=+ huq=``[p.+.sih (slot 3 (spec (slot 3 [typ +.sih])))]
|
||||
=+ yoo=abet:(busk:(yule:u.ouy %nil) p.u.num.sem 0 huq)
|
||||
yoo(can.sub.siq (~(put by can.sub.siq.yoo) nap sem(num ~)))
|
||||
%|
|
||||
=+ ^= yoo
|
||||
=< abet
|
||||
%^ busk:(yule:(hear:(yule:u.ouy %sub) huq) %nil)
|
||||
p.u.num.sem
|
||||
0
|
||||
`[%& %json !>((joba %ok %b &))]
|
||||
yoo(can.sub.siq (~(put by can.sub.siq.yoo) nap sem(num ~)))
|
||||
==
|
||||
yoo(can.sub.siq (~(put by can.sub.siq.yoo) can sem(num ~)))
|
||||
?. ?=(%json p.+.sih)
|
||||
%^ hooj our ses :^ nap can ?=(%rust -.+.sih)
|
||||
:+ %cast %json
|
||||
:+ %done ~
|
||||
[p.+.sih (slot 3 (spec (slot 3 [typ +.sih])))]
|
||||
=< abet =< work =< abet
|
||||
(soon ?=(%rust -.+.sih) sem u.ouy can %show (wrap sem (json q.+.sih)))
|
||||
==
|
||||
::
|
||||
%made
|
||||
?. ?=([%honk @ @ @ ~] tea)
|
||||
+>.$
|
||||
?. ?=([%hooj @ @ @ @ @ ~] tea)
|
||||
+>.$
|
||||
=+ ^= ouy
|
||||
%- yolk:(gale (slav %p i.t.tea) i.t.t.tea)
|
||||
(slav %ud i.t.t.t.tea)
|
||||
?~ ouy
|
||||
+>.$
|
||||
=+ can=(slav %ud i.t.t.t.t.tea)
|
||||
=+ ful=(slav %f i.t.t.t.t.t.tea)
|
||||
=+ sem=(need (~(get by can.sub.siq:beat:u.ouy) can))
|
||||
=< abet =< work =< abet
|
||||
%^ soon (,? ful) sem :^ u.ouy can %show
|
||||
%+ wrap sem
|
||||
?: ?=(%& -.p.+.sih)
|
||||
(json q.q.q.p.p.+.sih)
|
||||
(rong `[%to-json-fail p.p.+.sih])
|
||||
%- galt
|
||||
[(slav %p i.t.tea) i.t.t.tea (slav %ud i.t.t.t.tea) p.+.sih]
|
||||
::
|
||||
@ -725,6 +698,16 @@
|
||||
[hen %pass [%honk (scot %p our) ses (scot %ud num) ~] %f [%exec our `kas]]
|
||||
==
|
||||
::
|
||||
++ hooj :: ford json request
|
||||
|= [our=ship ses=hole nap=@ud can=@ud ful=? kas=silk]
|
||||
%_ +>
|
||||
mow
|
||||
:_ mow
|
||||
:^ hen %pass
|
||||
~[%hooj (scot %p our) ses (scot %ud nap) (scot %ud can) (scot %f ful)]
|
||||
[%f [%exec our `kas]]
|
||||
==
|
||||
::
|
||||
++ hops :: cancel remote
|
||||
|= [him=ship num=@]
|
||||
^+ +>
|
||||
@ -789,7 +772,7 @@
|
||||
~
|
||||
:*
|
||||
^= rob
|
||||
%- roly
|
||||
%- role
|
||||
:~ 'User-agent: *'
|
||||
'Disallow: /'
|
||||
==
|
||||
@ -1081,6 +1064,51 @@
|
||||
;+ bod
|
||||
==
|
||||
::
|
||||
++ rong
|
||||
|= are=ares
|
||||
%- jobe
|
||||
:- [%ok %b |]
|
||||
?~ are ~
|
||||
:+ [%err %s p.u.are]
|
||||
:+ %res %s
|
||||
%- crip
|
||||
%+ slag 2
|
||||
^- tape
|
||||
%+ roll q.u.are
|
||||
|= [p=tank q=tape]
|
||||
:(weld q "\\n" ~(ram re p))
|
||||
~
|
||||
::
|
||||
++ soon
|
||||
|= [ful=? sem=stem ouy=_yo:ya can=@ud mab=?(%mess %show) jon=json]
|
||||
^+ yo:ya
|
||||
=+ huq=``[%json !>(jon)]
|
||||
?~ num.sem
|
||||
=+ woy=(yule:ouy ?-(mab %mess %meg, %show %sub))
|
||||
(hear:woy huq)
|
||||
?- -.u.num.sem
|
||||
%&
|
||||
=+ yoo=abet:(busk:(yule:ouy %nil) p.u.num.sem 0 huq)
|
||||
yoo(can.sub.siq (~(put by can.sub.siq.yoo) can sem(num ~)))
|
||||
%|
|
||||
=+ ^= yoo
|
||||
=< abet
|
||||
%^ busk:(yule:(hear:(yule:ouy %sub) huq) %nil)
|
||||
p.u.num.sem
|
||||
0
|
||||
`[%& %json !>((joba %ok %b &))]
|
||||
yoo(can.sub.siq (~(put by can.sub.siq.yoo) can sem(num ~)))
|
||||
==
|
||||
::
|
||||
++ wrap
|
||||
|= [sem=stem jon=json]
|
||||
%- jobe
|
||||
:~ [%ship %s (rsh 3 1 (scot %p p.hap.sem))]
|
||||
[%appl %s q.hap.sem]
|
||||
[%path %s (crip <pax.sem>)]
|
||||
[%data `json`jon]
|
||||
==
|
||||
::
|
||||
++ ya :: session engine
|
||||
=| [[our=ship ses=hole] serf cyst]
|
||||
=* sef ->-
|
||||
|
@ -74,7 +74,6 @@
|
||||
== ::
|
||||
++ gate $+(* *) :: general gate
|
||||
++ hair ,[p=@ud q=@ud] :: parsing trace
|
||||
++ hapt (list ,@ta) :: XX not used
|
||||
++ like |* a=_,* :: generic edge
|
||||
|= b=_`*`[(hair) ~] ::
|
||||
:- p=(hair -.b) ::
|
||||
@ -327,10 +326,6 @@
|
||||
++ tyre (list ,[p=term q=twig]) ::
|
||||
++ tyke (list (unit twig)) ::
|
||||
++ tram (list ,[p=wing q=twig]) ::
|
||||
++ tone $% [%0 p=*] ::
|
||||
[%1 p=(list)] ::
|
||||
[%2 p=(list ,[@ta *])] ::
|
||||
== ::
|
||||
:: :::::: virtual nock
|
||||
++ nock $& [p=nock q=nock] :: autocons
|
||||
$% [%0 p=@] :: axis select
|
||||
@ -346,6 +341,10 @@
|
||||
[%10 p=?(@ [p=@ q=nock]) q=nock] :: hint
|
||||
[%11 p=nock] :: grab data from sky
|
||||
== ::
|
||||
++ tone $% [%0 p=*] ::
|
||||
[%1 p=(list)] ::
|
||||
[%2 p=(list ,[@ta *])] ::
|
||||
== ::
|
||||
++ toon $% [%0 p=*] ::
|
||||
[%1 p=(list)] ::
|
||||
[%2 p=(list tank)] ::
|
||||
@ -1875,22 +1874,6 @@
|
||||
$(a l.a)
|
||||
$(a r.a)
|
||||
::
|
||||
+- mer :: puts b in a, sorted
|
||||
~/ %mer
|
||||
|* b=_a
|
||||
|- ^+ a
|
||||
?~ b
|
||||
a
|
||||
?~ a
|
||||
b
|
||||
?. (vor n.a n.b)
|
||||
$(a b, b a)
|
||||
?: =(n.b n.a)
|
||||
[n.a $(a l.a, b l.b) $(a r.a, b r.b)]
|
||||
?: (hor n.b n.a)
|
||||
$(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
|
||||
$(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
|
||||
::
|
||||
+- int :: intersection
|
||||
~/ %int
|
||||
|* b=_a
|
||||
@ -2173,12 +2156,6 @@
|
||||
b
|
||||
$(a r.a, b [n.a $(a l.a)])
|
||||
::
|
||||
+- tur :: turn
|
||||
|* b=$+([* *] *)
|
||||
|-
|
||||
?~ a ~
|
||||
[n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
|
||||
::
|
||||
+- uni :: union, merge
|
||||
~/ %uni
|
||||
|* b=_a
|
||||
@ -2779,8 +2756,8 @@
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2eG, parsing (whitespace) ::
|
||||
::
|
||||
++ dog ;~(plug dot gay) ::
|
||||
++ doh ;~(plug ;~(plug hep hep) gay) ::
|
||||
++ dog ;~(plug dot gay) :: . number separator
|
||||
++ doh ;~(plug ;~(plug hep hep) gay) :: -- phon separator
|
||||
++ dun (cold ~ ;~(plug hep hep)) :: -- (phep) to ~
|
||||
++ duz (cold ~ ;~(plug tis tis)) :: == (stet) to ~
|
||||
++ gah (mask [`@`10 ' ' ~]) :: newline or ace
|
||||
@ -2845,13 +2822,13 @@
|
||||
(boss 256 (star qat))
|
||||
==
|
||||
::
|
||||
++ soqs ;~(plug soq soq soq)
|
||||
++ sym
|
||||
++ soqs ;~(plug soq soq soq) :: delimiting '''
|
||||
++ sym :: symbol
|
||||
%+ cook
|
||||
|=(a=tape (rap 3 ^-((list ,@) a)))
|
||||
;~(plug low (star ;~(pose nud low hep)))
|
||||
::
|
||||
++ ven ;~ (comp |=([a=@ b=@] (peg a b)))
|
||||
++ ven ;~ (comp |=([a=@ b=@] (peg a b))) :: +>- axis syntax
|
||||
bet
|
||||
=+ hom=`?`|
|
||||
|= tub=nail
|
||||
@ -4565,7 +4542,7 @@
|
||||
!!
|
||||
$(lub res, tez [(end 3 meg lub) tez])
|
||||
::
|
||||
++ roly :: line list to atom
|
||||
++ role :: line list to atom
|
||||
|= tez=(list ,@t)
|
||||
(rap 3 (turn tez |=(a=@t (cat 3 a 10))))
|
||||
::
|
||||
@ -4582,7 +4559,7 @@
|
||||
::
|
||||
%c
|
||||
=+ dst=(lore ((hard ,@) src))
|
||||
%- roly
|
||||
%- role
|
||||
?+ -.q.don ~|(%unsupported !!)
|
||||
%a ((hard (list ,@t)) q.q.don)
|
||||
%c (lurk dst p.q.don)
|
||||
@ -4620,7 +4597,7 @@
|
||||
?+ pum ~|(%unsupported !!)
|
||||
%a dst
|
||||
%b (jam dst)
|
||||
%c (roly ((hard (list ,@)) dst))
|
||||
%c (role ((hard (list ,@)) dst))
|
||||
==
|
||||
::
|
||||
++ lurk :: apply list patch
|
||||
|
@ -1595,7 +1595,7 @@
|
||||
?. con !!
|
||||
%- some
|
||||
:- %ins
|
||||
%- roly
|
||||
%- role
|
||||
%- annotate
|
||||
:- us
|
||||
:- th
|
||||
@ -1696,7 +1696,7 @@
|
||||
=. lat lut
|
||||
=+ ^= far
|
||||
^- (map path lobe)
|
||||
%- ~(tur by (forge par for s t))
|
||||
%- ~(urn by (forge par for s t))
|
||||
|= [k=path v=blob] (blob-to-lobe v)
|
||||
=+ u=(make-yaki [r.par r.for ~] far `@da`0) :: fake yaki
|
||||
:- u
|
||||
@ -1704,7 +1704,7 @@
|
||||
=< -
|
||||
%- update-lat
|
||||
:_ ~
|
||||
%- ~(tur by q.u)
|
||||
%- ~(urn by q.u)
|
||||
|= [path k=lobe]
|
||||
(lobe-to-blob k)
|
||||
::
|
||||
|
@ -92,10 +92,10 @@
|
||||
;~ pose
|
||||
(stag %run ;~(plug (star ;~(sfix (task(tol %0) bar) ace)) (task col)))
|
||||
(stag %end ;~(pfix sem ;~(pose (stag %& dem) (stag %| sym))))
|
||||
(stag %path (full ;~(sfix loca(pax paf) (star ace))))
|
||||
(stag %del ;~(pfix hep ace loca))
|
||||
(stag %mut ;~(pfix col ace ;~(plug loca expg)))
|
||||
(stag %ins ;~(pfix lus ace ;~(plug loca (opts expg))))
|
||||
(stag %path (full ;~(sfix loca(pax paf) (star ace))))
|
||||
(stag %var ;~(plug ;~(pfix tis sym) expg))
|
||||
(stag %rvar ;~(pfix ;~(plug tis tis) sym))
|
||||
(stag %hoon expr)
|
||||
|
@ -51,7 +51,7 @@
|
||||
^- _.
|
||||
%= .
|
||||
elf.ful
|
||||
%- ~(tur by elf.ful)
|
||||
%- ~(urn by elf.ful)
|
||||
|= [r=room [d=@da n=@ud]]
|
||||
=+ lov=(fall (~(get by lov.par) r) *loft)
|
||||
[d num.lov]
|
||||
|
Loading…
Reference in New Issue
Block a user