mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 12:15:43 +03:00
Merge remote-tracking branches 'joemfb/run-in', 'max19/master', 'chc4/spin', 'cgyarvin/docs-issue-28' and 'ray/galactic-transactions'
Actually valid +-run:in "map over set" arm Less loopy ++og PRNG (TODO: better PRNG) ++spin/++spun, "stateful ++turn" arms Remove syntactically impossible %$ regular form for bunt Galactic transactions
This commit is contained in:
commit
40365667c7
@ -189,7 +189,7 @@
|
||||
0w0 :: 44, ~wen, Susan Yarvin
|
||||
0w0 :: 45, ~byn, Susan Yarvin
|
||||
0w0 :: 46, ~hex, James Torre
|
||||
0w0 :: 47, ~feb, Raymond Pasco
|
||||
0w0 :: 47, ~feb, urbit.org
|
||||
0wK.GoKEY.rMjfn.ZcvFQ.n4BmX :: 48, ~pyl, Michael Hartl
|
||||
0w0 :: 49, ~dul, Jennifer Kollmer
|
||||
0w0 :: 50, ~het, Jennifer Kollmer
|
||||
@ -279,7 +279,7 @@
|
||||
0w0 :: 134, ~lyx, urbit.org
|
||||
0w0 :: 135, ~pun, urbit.org
|
||||
0w0 :: 136, ~res, urbit.org
|
||||
0w0 :: 137, ~red, urbit.org
|
||||
0w0 :: 137, ~red, Alex Kravets
|
||||
0w3J.15iJA.0pbNk.mZXyh.A~uKb :: 138, ~fun, Aaron Beckerman
|
||||
0w0 :: 139, ~rev, urbit.org
|
||||
0w3m.Cqumo.ZC7-e.794A4.Bqhh8 :: 140, ~ref, Matt Brubeck
|
||||
@ -392,7 +392,7 @@
|
||||
0w28.bRVMq.Oi3tM.zOCNV.j00Yq :: 247, ~fyr, Anton Dyudin
|
||||
0w0 :: 248, ~mur, Tlon
|
||||
0w0 :: 249, ~tel, Tlon
|
||||
0w0 :: 250, ~rep, Tlon
|
||||
0w0 :: 250, ~rep, Raymond Pasco
|
||||
0w0 :: 251, ~teg, Tlon
|
||||
0w0 :: 252, ~pec, Tlon
|
||||
0w0 :: 253, ~nel, Tlon
|
||||
|
@ -196,6 +196,7 @@
|
||||
{$$ p/axis} :: simple leg
|
||||
:: ::
|
||||
{$base p/base} :: base
|
||||
{$bunt p/twig} :: mold default value
|
||||
{$bust p/base} :: bunt base
|
||||
{$dbug p/spot q/twig} :: debug info in trace
|
||||
{$hand p/span q/nock} :: premade result
|
||||
@ -236,7 +237,6 @@
|
||||
{$conl p/(list twig)} :: :~ [p ~]
|
||||
{$conp p/(list twig)} :: :* p as a tuple
|
||||
:: :::::: invocations
|
||||
{$bunt p/twig} :: %$
|
||||
{$keep p/wing q/(list (pair wing twig))} :: %_
|
||||
{$lace p/twig q/twig} :: %.
|
||||
{$call p/twig q/(list twig)} :: %-
|
||||
@ -778,6 +778,24 @@
|
||||
^+ t.a
|
||||
[i.a $(a (skim t.a |=(c/_i.a !(b c i.a))))]
|
||||
::
|
||||
++ spin
|
||||
|* {a/(list) b/_|=({* *} [** +<+]) c/*}
|
||||
:: ?< ?=($-([_?<(?=($~ a) i.a) _c] [* _c]) b)
|
||||
|-
|
||||
?~ a
|
||||
~
|
||||
=+ v=(b i.a c)
|
||||
[i=-.v t=$(a t.a, c +.v)]
|
||||
::
|
||||
++ spun
|
||||
|* {a/(list) b/_|=({* *} [** +<+])}
|
||||
=| c/_+<+.b
|
||||
|-
|
||||
?~ a
|
||||
~
|
||||
=+ v=(b i.a c)
|
||||
[i=-.v t=$(a t.a, c +.v)]
|
||||
::
|
||||
++ swag :: infix
|
||||
|* {{a/@ b/@} c/(list)}
|
||||
(scag +<-> (slag +<-< c))
|
||||
@ -2452,10 +2470,13 @@
|
||||
$(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
|
||||
::
|
||||
+- run :: apply gate to values
|
||||
|* {b/gate c/*}
|
||||
|-
|
||||
?~ a c
|
||||
$(a r.a, c [(b n.a) $(a l.a)])
|
||||
~/ %run
|
||||
|* b/gate
|
||||
=| c/(set _?>(?=(^ a) (b n.a)))
|
||||
|- ?~ a c
|
||||
=. c (~(put in c) (b n.a))
|
||||
=. c $(a l.a, c c)
|
||||
$(a r.a, c c)
|
||||
::
|
||||
+- tap :: convert to list
|
||||
~/ %tap
|
||||
@ -5927,7 +5948,7 @@
|
||||
++ rads :: random continuation
|
||||
|= b/@
|
||||
=+ r=(rad b)
|
||||
[r +>.$(a (shas %og-s r))]
|
||||
[r +>.$(a (shas %og-s (mix a r)))]
|
||||
::
|
||||
++ raw :: random bits
|
||||
~/ %raw
|
||||
@ -5946,7 +5967,7 @@
|
||||
++ raws :: random bits
|
||||
|= b/@ :: continuation
|
||||
=+ r=(raw b)
|
||||
[r +>.$(a (shas %og-s r))]
|
||||
[r +>.$(a (shas %og-s (mix a r)))]
|
||||
--
|
||||
++ shaz :: sha-512
|
||||
|= ruz/@ ^- @
|
||||
@ -9837,6 +9858,7 @@
|
||||
(word %gate expb)
|
||||
(word %tray expa)
|
||||
::
|
||||
(word %bunt expa)
|
||||
(word %claw expb)
|
||||
(word %shoe expa)
|
||||
(word %bank exps)
|
||||
|
Loading…
Reference in New Issue
Block a user