Merge branch 'test' of https://github.com/urbit/urbit into test

Conflicts:
	urb/urbit.pill
This commit is contained in:
Anton Dyudin 2015-07-06 12:49:05 -07:00
commit 88f038b860
2 changed files with 57 additions and 57 deletions

View File

@ -20,11 +20,11 @@
dug=(map duct axon) :: conversations
$= hef :: other weights
$: a=(unit mass) ::
b=(unit mass) ::
c=(unit mass) ::
e=(unit mass) ::
f=(unit mass) ::
g=(unit mass) ::
t=(unit mass) ::
== ::
== ::
++ axon :: dill per duct
@ -66,7 +66,7 @@
[%deal p=sock q=cush] ::
== ::
++ note :: out request $->
$? [?(%a %c %e %f %g %t) %wegh ~] ::
$? [?(%a %b %c %e %f %g) %wegh ~] ::
$% [%a note-ames] ::
[%c note-clay] ::
[%d note-dill] ::
@ -91,16 +91,12 @@
$% [%onto p=(each suss tang)] ::
[%unto p=cuft] ::
== ::
++ sign-time ::
$% [%wake ~] ::
== ::
++ sign :: in result $<-
$? [?(%a %c %e %f %g %t) %mass p=mass] ::
$? [?(%a %b %c %e %f %g) %mass p=mass] ::
$% [%a sign-ames] ::
[%c sign-clay] ::
[%d sign-dill] ::
[%g sign-gall] ::
[%t sign-time] ::
== == ::
:::::::: :: dill tiles
--
@ -199,11 +195,11 @@
%_ .
moz
:* [hen %pass /heft/ames %a %wegh ~]
[hen %pass /heft/behn %b %wegh ~]
[hen %pass /heft/clay %c %wegh ~]
[hen %pass /heft/eyre %e %wegh ~]
[hen %pass /heft/ford %f %wegh ~]
[hen %pass /heft/gall %g %wegh ~]
[hen %pass /heft/time %t %wegh ~]
moz
==
==
@ -272,7 +268,7 @@
|= sih=sign
^+ +>
?- sih
[?(%a %c %e %f %g %t) %mass *]
[?(%a %b %c %e %f %g) %mass *]
(wegt -.sih p.sih)
::
[%a %nice *]
@ -314,10 +310,6 @@
::
[%d %blit *]
(done +.sih)
::
[%t %wake *]
:: ~& %dill-wake
+>
==
::
++ wegh
@ -328,29 +320,29 @@
==
::
++ wegt
|= [lal=?(%a %c %e %f %g %t) mas=mass]
|= [lal=?(%a %b %c %e %f %g) mas=mass]
^+ +>
=. hef.all
?- lal
%a ~?(?=(^ a.hef.all) %double-mass-a hef.all(a `mas))
%b ~?(?=(^ b.hef.all) %double-mass-b hef.all(b `mas))
%c ~?(?=(^ c.hef.all) %double-mass-c hef.all(c `mas))
%e ~?(?=(^ e.hef.all) %double-mass-e hef.all(e `mas))
%f ~?(?=(^ f.hef.all) %double-mass-f hef.all(f `mas))
%g ~?(?=(^ g.hef.all) %double-mass-g hef.all(g `mas))
%t ~?(?=(^ t.hef.all) %double-mass-t hef.all(t `mas))
==
?. ?& ?=(^ a.hef.all)
?=(^ b.hef.all)
?=(^ c.hef.all)
?=(^ e.hef.all)
?=(^ f.hef.all)
?=(^ g.hef.all)
?=(^ t.hef.all)
==
+>.$
%+ done(hef.all [~ ~ ~ ~ ~ ~])
%mass
=> [hef.all d=wegh]
[%vanes %| ~[u.a u.c d u.e u.f u.g u.t]]
[%vanes %| ~[u.a u.c d u.e u.f u.g u.b]]
--
::
++ ax :: make ++as

View File

@ -1875,6 +1875,24 @@
|
?|((b n.a) $(a l.a) $(a r.a))
::
+- bif :: splits a by b
~/ %bif
|* b=*
^+ [l=a r=a]
=< [+< +>]
|- ^+ a
?~ a
[b ~ ~]
?: =(b n.a)
a
?: (hor b n.a)
=+ c=$(a l.a)
?> ?=(^ c)
[n.c l.c [n.a r.c r.a]]
=+ c=$(a r.a)
?> ?=(^ c)
[n.c [n.a l.a l.c] r.c]
::
+- del :: b without any a
~/ %del
|* b=*
@ -1898,7 +1916,7 @@
|- ^+ a
?~ b
a
=+ c=(pux(+< a) n.b)
=+ c=(bif(+< a) n.b)
?> ?=(^ c)
=+ d=$(a l.c, b l.b)
=+ e=$(a r.c, b r.b)
@ -1975,24 +1993,6 @@
[n.a l.a c]
[n.c [n.a l.a l.c] r.c]
::
+- pux :: splits a by b
~/ %pux
|* b=*
^+ [l=a r=a]
=< [+< +>]
|- ^+ a
?~ a
[b ~ ~]
?: =(b n.a)
a
?: (hor b n.a)
=+ c=$(a l.a)
?> ?=(^ c)
[n.c l.c [n.a r.c r.a]]
=+ c=$(a r.a)
?> ?=(^ c)
[n.c [n.a l.a l.c] r.c]
::
+- rep :: replace by product
|* b=_|=([* *] +<+)
|-
@ -2111,6 +2111,26 @@
|
?|((b q.n.a) $(a l.a) $(a r.a))
::
+- bif :: splits a by b
~/ %bif
|* [b=* c=*]
^+ [l=a r=a]
=< [+< +>]
|- ^+ a
?~ a
[[b c] ~ ~]
?: =(b p.n.a)
?: =(c q.n.a)
a
[[b c] l.a r.a]
?: (gor b p.n.a)
=+ d=$(a l.a)
?> ?=(^ d)
[n.d l.d [n.a r.d r.a]]
=+ d=$(a r.a)
?> ?=(^ d)
[n.d [n.a l.a l.d] r.d]
::
+- del :: delete at key b
~/ %del
|* b=*
@ -2134,7 +2154,7 @@
|- ^+ a
?~ b
a
=+ c=(pux(+< a) n.b)
=+ c=(bif(+< a) n.b)
?> ?=(^ c)
=+ d=$(a l.c, b l.b)
=+ e=$(a r.c, b r.b)
@ -2234,26 +2254,6 @@
[n.a l.a d]
[n.d [n.a l.a l.d] r.d]
::
+- pux :: splits a by b
~/ %pux
|* [b=* c=*]
^+ [l=a r=a]
=< [+< +>]
|- ^+ a
?~ a
[[b c] ~ ~]
?: =(b p.n.a)
?: =(c q.n.a)
a
[[b c] l.a r.a]
?: (gor b p.n.a)
=+ d=$(a l.a)
?> ?=(^ d)
[n.d l.d [n.a r.d r.a]]
=+ d=$(a r.a)
?> ?=(^ d)
[n.d [n.a l.a l.d] r.d]
::
+- rep :: replace by product
|* b=_|=([* *] +<+)
|-
@ -3662,6 +3662,7 @@
~% %so + ~
|%
++ bisk
~+
;~ pose
;~ pfix (just '0')
;~ pose
@ -3676,6 +3677,7 @@
(stag %ud dem:ag)
==
++ crub
~+
;~ pose
%+ cook
|=(det=date `dime`[%da (year det)])
@ -3740,13 +3742,16 @@
:- '~' ;~(pfix sig ;~(pose twid (easy [~ %n 0])))
==
++ nusk
~+
:(sear |=(a=@ta (rush a nuck)) wick urt:ab)
++ perd
~+
;~ pose
(stag ~ zust)
(stag %many (ifix [cab ;~(plug cab cab)] (more cab nusk)))
==
++ royl
~+
=+ ^= zer
(cook lent (star (just '0')))
=+ ^= voy
@ -3777,6 +3782,7 @@
[a c.b d.b e.b [~ (mul i.u.f 2)]]
[a c.b d.b e.b [~ (dec (mul i.u.f 2))]]
++ tash
~+
=+ ^= neg
|= [syn=? mol=dime] ^- dime
?> =('u' (end 3 1 p.mol))
@ -3788,12 +3794,14 @@
==
==
++ twid
~+
;~ pose
(cook |=(a=@ [%blob (cue a)]) ;~(pfix (just '0') vum:ag))
(stag ~ crub)
==
::
++ zust
~+
;~ pose
(stag %is bip:ag)
(stag %if lip:ag)