urbit/arvo/ford.hoon

1940 lines
68 KiB
Plaintext
Raw Normal View History

2015-12-14 10:58:14 +03:00
::::::
2015-04-23 01:55:46 +03:00
:: :: %ford, new execution control
2014-04-23 21:02:36 +04:00
!? 164
::::
2015-12-07 20:23:58 +03:00
|= pit+vase
2014-04-23 21:02:36 +04:00
=> =~
2014-06-03 09:07:32 +04:00
:: structures
|%
++ gift gift-ford :: out result <-$
2014-07-21 07:15:02 +04:00
++ heel path :: functional ending
++ kiss kiss-ford :: in request ->$
2015-12-07 03:46:01 +03:00
++ move {p+duct q+(mold note gift)} :: local move
2014-06-03 09:07:32 +04:00
++ note :: out request $->
2015-12-14 10:58:14 +03:00
$% $: $c :: to %clay
$% {$warp p+sock q+riff} ::
2014-06-22 06:51:12 +04:00
== == == ::
2014-06-22 09:49:10 +04:00
++ sign :: in result $<-
2015-12-14 10:58:14 +03:00
$% $: $c :: by %clay
$% {$writ p+riot} ::
2014-06-22 06:51:12 +04:00
== == == ::
2014-06-03 09:07:32 +04:00
-- ::
2014-04-23 21:02:36 +04:00
|% :: structures
++ axle :: all %ford state
2015-12-14 10:58:14 +03:00
$: $1 :: version for update
2015-12-13 05:51:23 +03:00
pol+(map ship baby) ::
2014-05-14 04:04:23 +04:00
== ::
++ baby :: state by ship
2015-12-14 10:58:14 +03:00
$: tad+{p+@ud q+(map @ud task)} :: tasks by number
2015-12-07 03:46:01 +03:00
dym+(map duct @ud) :: duct to task number
deh+(map @uvH deps) :: depends by hash
jav+(map * calx) :: cache
2014-04-23 21:02:36 +04:00
== ::
2014-05-07 21:42:31 +04:00
++ bolt :: gonadic edge
2015-12-14 10:58:14 +03:00
|* a+$+(* *) :: product clam
$: p+cafe :: cache
$= q ::
$% {$0 p+(set beam) q+a} :: depends/product
2015-12-07 03:46:01 +03:00
{$1 p+(set {p+care q+beam r+tang})} :: blocks
{$2 p+(set beam) q+tang} :: depends/error
2014-05-14 04:04:23 +04:00
== ::
2014-04-23 21:02:36 +04:00
== ::
2014-05-07 21:42:31 +04:00
:: ::
++ burg :: gonadic rule
2015-12-14 10:58:14 +03:00
|* {a+$+(* *) b+$+(* *)} :: from and to
$+({c+cafe d+a} (bolt b)) ::
2014-05-07 21:42:31 +04:00
:: ::
2014-05-14 04:04:23 +04:00
++ cafe :: live cache
2015-12-14 10:58:14 +03:00
$: p+(set calx) :: used
2015-12-07 03:46:01 +03:00
q+(map * calx) :: cache
2014-05-14 04:04:23 +04:00
== ::
:: ::
2014-05-14 21:32:00 +04:00
++ calm :: cache metadata
2015-12-14 10:58:14 +03:00
$: laz+@da :: last accessed
2015-12-07 03:46:01 +03:00
dep+(set beam) :: dependencies
2014-05-14 21:32:00 +04:00
== ::
2014-05-14 04:04:23 +04:00
++ calx :: concrete cache line
2015-12-14 10:58:14 +03:00
$% {$hood p+calm q+(pair beam cage) r+hood} :: compile
2015-12-07 03:46:01 +03:00
{$bake p+calm q+(trel mark beam heel) r+(unit vase)}:: load
{$lilt p+calm q+beak r+(jug mark mark)} :: translation graph
{$slit p+calm q+{p+type q+type} r+type} :: slam type
{$slim p+calm q+{p+type q+twig} r+(pair type nock)}:: mint
{$slap p+calm q+{p+vase q+twig} r+vase} :: compute
{$slam p+calm q+{p+vase q+vase} r+vase} :: compute
2014-05-14 04:04:23 +04:00
== ::
2015-04-29 03:43:23 +03:00
++ deps :: depend state
2015-12-14 10:58:14 +03:00
$% {$init p+(set beam)} :: given out
2015-12-07 03:46:01 +03:00
{$sent p+(set duct) q+(set beam)} :: listener exists
{$done $~} :: change seen
2015-04-29 03:43:23 +03:00
== ::
2014-04-30 21:04:07 +04:00
++ task :: problem in progress
2015-12-14 10:58:14 +03:00
$: nah+duct :: cause
2015-12-07 03:46:01 +03:00
{bek+beak kas+silk} :: problem
2015-12-13 05:51:23 +03:00
keg+(map (pair term beam) cage) :: block results
2015-12-07 03:46:01 +03:00
kig+{p+@ud q+(map @ud {p+care q+beam})} :: blocks
2014-04-23 21:02:36 +04:00
== ::
2015-06-04 04:03:35 +03:00
++ gagl (list (pair gage gage))
2014-05-07 21:42:31 +04:00
-- ::
2014-04-30 21:04:07 +04:00
|% ::
2014-05-16 04:46:48 +04:00
++ calf :: reduce calx
2015-12-07 03:46:01 +03:00
|* sem+* :: a typesystem hack
|= cax+calx
2014-05-16 04:46:48 +04:00
?+ sem !!
2015-12-07 03:46:01 +03:00
$hood ?>(?=($hood -.cax) r.cax)
$bake ?>(?=($bake -.cax) r.cax)
$lilt ?>(?=($lilt -.cax) r.cax)
$slap ?>(?=($slap -.cax) r.cax)
$slam ?>(?=($slam -.cax) r.cax)
$slim ?>(?=($slim -.cax) r.cax)
$slit ?>(?=($slit -.cax) r.cax)
2014-05-16 04:46:48 +04:00
==
::
2014-05-14 04:04:23 +04:00
++ calk :: cache lookup
2015-12-07 03:46:01 +03:00
|= a+cafe ::
|= {b+@tas c+*} ::
^- {(unit calx) cafe} ::
2014-05-14 04:04:23 +04:00
=+ d=(~(get by q.a) [b c]) ::
?~ d [~ a] ::
2014-05-14 06:44:44 +04:00
[d a(p (~(put in p.a) u.d))] ::
2014-05-14 04:04:23 +04:00
:: ::
2014-05-14 21:32:00 +04:00
++ came ::
2015-12-07 03:46:01 +03:00
|= {a+cafe b+calx} :: cache install
2014-05-14 04:04:23 +04:00
^- cafe ::
a(q (~(put by q.a) [-.b q.b] b)) ::
:: ::
++ chub :: cache merge
2015-12-07 03:46:01 +03:00
|= {a+cafe b+cafe} ::
2014-05-14 04:04:23 +04:00
^- cafe ::
2015-04-29 03:43:23 +03:00
[(grom p.a p.b) (grum q.a q.b)] ::
2014-05-14 04:04:23 +04:00
:: ::
2015-12-07 03:46:01 +03:00
++ faun (flux |=(a+vase [%& %noun a])) :: vase to gage
++ feel (flux |=(a+cage q.a)) :: cage to vase
2015-05-26 04:17:59 +03:00
++ furl :: unwrap gage to cage
2015-12-07 03:46:01 +03:00
|= {a+cafe b+gage} ^- (bolt cage)
2015-05-26 04:17:59 +03:00
?- -.b
2015-12-07 03:46:01 +03:00
$tabl (flaw a >%bad-marc< ~)
$| (flaw a p.b)
$& (fine a p.b)
2015-05-26 04:17:59 +03:00
==
::
++ fret :: lift error
2015-12-07 03:46:01 +03:00
|= a+(bolt gage) ^- (bolt gage)
?. ?=($2 -.q.a) a
2015-05-26 04:17:59 +03:00
[p.a [%0 p.q.a `gage`[%| q.q.a]]]
::
2015-12-07 03:46:01 +03:00
++ fine |* {a+cafe b+*} :: bolt from data
2014-06-07 22:36:31 +04:00
[p=`cafe`a q=[%0 p=*(set beam) q=b]] ::
2015-12-07 03:46:01 +03:00
++ flaw |= {a+cafe b+tang} :: bolt from error
2015-02-13 00:03:54 +03:00
[p=a q=[%2 p=*(set beam) q=b]] ::
2015-02-13 02:06:45 +03:00
++ flag :: beam into deps
2015-12-07 03:46:01 +03:00
|* {a+beam b+(bolt)} ::
?: ?=($1 -.q.b) b
2015-02-13 02:06:45 +03:00
=. p.q.b (~(put in p.q.b) a)
b
2015-02-13 00:03:54 +03:00
:: ::
2015-12-07 03:46:01 +03:00
++ flue |=(a+cafe (fine a ~)) :: cafe to empty
2015-12-15 01:21:10 +03:00
++ flux |* a+_* :: bolt lift (fmap)
|*({b+cafe c+_+<.a} (fine b (a c))) ::
2014-05-14 04:04:23 +04:00
++ grom :: merge sets
|* {one+(set) two+(set)}
2014-05-14 04:04:23 +04:00
^+ one
2014-05-09 04:34:57 +04:00
(~(gas in one) (~(tap in two) ~)) :: XX ugh
::
2014-05-14 04:04:23 +04:00
++ grum :: merge maps
|* {one+(map) two+(map)}
2014-05-14 04:04:23 +04:00
^+ one
(~(gas by one) (~(tap by two) ~)) :: XX ugh
2014-05-07 21:42:31 +04:00
::
2014-07-24 03:23:53 +04:00
++ lark :: filter arch names
2015-12-14 10:58:14 +03:00
|= {wox+$+(span (unit @)) arc+arch}
2015-12-07 03:46:01 +03:00
^- (map @ span)
%- ~(gas by *(map @ span))
=| rac+(list (pair @ span))
2014-07-24 03:23:53 +04:00
|- ^+ rac
2015-09-06 04:14:00 +03:00
?~ dir.arc rac
=. rac $(dir.arc l.dir.arc, rac $(dir.arc r.dir.arc))
=+ gib=(wox p.n.dir.arc)
?~(gib rac [[u.gib p.n.dir.arc] rac])
2014-07-24 03:23:53 +04:00
::
2015-06-24 01:59:48 +03:00
++ tack :: fold path to term
2015-12-07 03:46:01 +03:00
|= a+{i+term t+(list term)} ^- term
2015-06-24 01:59:48 +03:00
(rap 3 |-([i.a ?~(t.a ~ ['-' $(a t.a)])]))
::
++ tear :: split term
2015-12-07 03:46:01 +03:00
=- |=(a+term (rush a (most hep sym)))
2015-06-24 01:59:48 +03:00
sym=(cook crip ;~(plug low (star ;~(pose low nud))))
::
2015-05-01 03:21:31 +03:00
++ norm :: normalize beam rev
2015-12-07 03:46:01 +03:00
|= {ska+sled bem+beam}
2015-05-01 03:21:31 +03:00
%_ bem
2015-12-07 03:46:01 +03:00
r ?: ?=($ud -.r.bem) r.bem
2015-05-01 03:21:31 +03:00
=+ num=(ska ~ %cw bem(s ~))
2015-12-07 03:46:01 +03:00
?. ?=({$~ $~ * * @u} num)
2015-05-01 03:21:31 +03:00
~& norm-lost/(tope bem(s ~))
r.bem :: XX
[%ud q.q.u.u.num]
==
::
2014-04-30 21:04:07 +04:00
++ za :: per event
2015-12-14 10:58:14 +03:00
=| $: $: our+ship :: computation owner
2015-12-07 03:46:01 +03:00
hen+duct :: event floor
2015-12-14 10:58:14 +03:00
$: now+@da :: event date
2015-12-07 03:46:01 +03:00
eny+@ :: unique entropy
ska+sled :: system namespace
== ::
2015-12-07 03:46:01 +03:00
mow+(list move) :: pending actions
== ::
2015-12-07 03:46:01 +03:00
bay+baby :: all owned state
== ::
|%
2014-06-03 09:07:32 +04:00
++ abet :: resolve
2015-12-07 03:46:01 +03:00
^- {(list move) baby}
2014-05-14 04:04:23 +04:00
[(flop mow) bay]
2014-04-30 21:04:07 +04:00
::
2015-07-10 21:49:03 +03:00
++ apax :: call
^+ ..apax
=+ nym=(~(get by dym.bay) hen)
?~ nym :: XX should never
~& [%ford-mystery hen]
..apax
=+ tas=(need (~(get by q.tad.bay) u.nym))
amok:~(camo zo [u.nym tas])
::
++ apex
2015-12-07 03:46:01 +03:00
|= kub+bilk
2014-06-03 09:07:32 +04:00
^+ +>
2014-05-22 21:39:51 +04:00
=+ num=p.tad.bay
2014-09-24 05:03:20 +04:00
?< (~(has by dym.bay) hen)
2014-05-22 21:39:51 +04:00
=: p.tad.bay +(p.tad.bay)
dym.bay (~(put by dym.bay) hen num)
==
2015-07-10 21:49:03 +03:00
~(exec zo [num `task`[hen kub ~ 0 ~]])
2014-06-03 09:07:32 +04:00
::
++ axon :: take
2015-12-07 03:46:01 +03:00
|= {num+@ud tik+@ud sih+sign}
2014-06-03 09:07:32 +04:00
^+ +>
2014-06-22 06:51:12 +04:00
?- -.+.sih
2015-12-07 03:46:01 +03:00
$writ
2014-06-03 09:07:32 +04:00
=+ tus=(~(get by q.tad.bay) num)
?~ tus
~& [%ford-lost num]
+>.$
2014-06-22 06:51:12 +04:00
(~(resp zo [num u.tus]) tik p.+.sih)
2014-06-03 09:07:32 +04:00
==
::
2015-02-19 00:35:22 +03:00
++ axun :: take rev update
2015-12-07 03:46:01 +03:00
|= {tea+wire dep+@uvH bem+beam sih+sign}
2015-02-19 00:35:22 +03:00
^+ +>
?- -.+.sih
2015-12-07 03:46:01 +03:00
$writ
2015-04-29 03:43:23 +03:00
?~ p.sih +>.$
2015-06-12 00:42:05 +03:00
:: ~& writ/tea
2015-07-10 21:49:03 +03:00
=+ dap=(~(got by deh.bay) dep)
2015-12-01 02:52:18 +03:00
=- +>.$(mow mow, deh.bay ?~(dop deh.bay (~(put by deh.bay) dep dop)))
2015-12-15 01:21:10 +03:00
^- {dop+$@($~ _dap) mow+_mow}
2015-04-29 03:43:23 +03:00
?- -.dap
2015-12-07 03:46:01 +03:00
$done `mow :: writ redundant
$init ~|(never-subscribed/dep !!)
$sent
2015-12-01 02:52:18 +03:00
:- [%done ~]
;: weld
(axap dep (~(del in q.dap) bem)) :: cancel outstanding
2015-12-13 05:51:23 +03:00
(turn (~(tap in p.dap)) |=(hen+duct [hen %give %news dep]))
2015-12-01 02:52:18 +03:00
mow
== ==
2015-04-29 03:43:23 +03:00
==
2015-12-01 02:52:18 +03:00
::
++ axap :: unsubscribe beams
2015-12-07 03:46:01 +03:00
|= {dep+@uvH dap+(set beam)}
2015-12-01 02:52:18 +03:00
%+ turn (~(tap in dap))
2015-12-07 03:46:01 +03:00
|= bem+beam
2015-12-01 02:52:18 +03:00
:^ hen %pass [(scot %p our) (scot %uv dep) (tope bem)]
[%c %warp [our p.bem] q.bem ~]
2015-02-19 00:35:22 +03:00
::
++ awap :: get next revision
2015-02-21 00:42:57 +03:00
~% %ford-w ..is ~
2015-12-07 03:46:01 +03:00
|= {dep+@uvH ask+?}
2015-04-28 23:02:32 +03:00
?~ dep
~&(dep-empty/hen +>.$)
2015-05-18 23:44:10 +03:00
?: =(dep 0vtest) :: upstream testing
2015-12-01 02:52:18 +03:00
+>.$(mow ?.(ask mow :_(mow [hen %give %news dep])))
2015-05-01 22:03:02 +03:00
=+ dap=(~(get by deh.bay) dep)
?~ dap ~&(dep-missed/dep +>.$) :: XX ~| !!
2015-05-09 03:13:10 +03:00
:: ~& awap/[dep u.dap]
2015-05-01 22:03:02 +03:00
?- -.u.dap
2015-12-07 03:46:01 +03:00
$done +>.$(mow ?.(ask mow :_(mow [hen %give %news dep])))
$sent
2015-12-01 02:52:18 +03:00
=. p.u.dap
?: ask (~(put in p.u.dap) hen)
(~(del in p.u.dap) hen)
?^ p.u.dap
+>.$(deh.bay (~(put by deh.bay) dep u.dap))
=. mow (weld (axap dep q.u.dap) mow)
+>.$(deh.bay (~(put by deh.bay) dep [%init q.u.dap]))
::
2015-12-07 03:46:01 +03:00
$init
2015-12-01 02:52:18 +03:00
?. ask ~&(awap-kill-empty/dep +>.$) :: crash?
2015-04-29 03:43:23 +03:00
%_ +>.$
2015-04-29 22:43:14 +03:00
deh.bay
2015-05-01 22:03:02 +03:00
(~(put by deh.bay) dep [%sent [hen ~ ~] p.u.dap])
2015-04-29 03:43:23 +03:00
::
mow
2015-05-01 22:03:02 +03:00
=< (welp :_(mow (turn (~(tap in p.u.dap)) .)))
2015-12-07 03:46:01 +03:00
|= bem+beam
2015-04-29 03:43:23 +03:00
:^ hen %pass [(scot %p our) (scot %uv dep) (tope bem)]
2015-04-30 21:37:22 +03:00
[%c [%warp [our p.bem] q.bem ~ [%next %y r.bem (flop s.bem)]]]
2015-04-29 03:43:23 +03:00
== ==
2015-02-19 00:35:22 +03:00
::
2014-04-30 21:04:07 +04:00
++ zo
2015-04-29 22:43:14 +03:00
~% %ford-z
..is
==
%fade fade
%fair fair
%fang fang
%lime lime
%lima lima
%link link
%lion lion
%lily lily
%lope lope
%make make
%meow meow
==
2015-12-07 03:46:01 +03:00
|_ {num+@ud task}
2014-05-14 04:04:23 +04:00
++ abet %_(..zo q.tad.bay (~(put by q.tad.bay) num +<+))
2014-10-02 23:46:00 +04:00
++ amok
%_ ..zo
2014-06-04 14:40:09 +04:00
q.tad.bay (~(del by q.tad.bay) num)
dym.bay (~(del by dym.bay) nah)
==
2014-05-16 04:46:48 +04:00
++ camo :: stop requests
^+ .
=+ kiz=(~(tap by q.kig) *(list {p+@ud q+{p+care q+beam}}))
2014-05-16 04:46:48 +04:00
|- ^+ +>
?~ kiz +>
%= $
kiz t.kiz
2015-03-12 03:37:37 +03:00
mow
:_ mow
2014-05-24 00:46:43 +04:00
:- hen
2015-03-12 03:37:37 +03:00
:^ %pass
2015-07-10 21:49:03 +03:00
[(scot %p our) (scot %ud num) (scot %ud p.i.kiz) ~]
2014-06-21 22:42:34 +04:00
%c
2014-12-10 01:59:31 +03:00
[%warp [our p.q.q.i.kiz] q.q.q.i.kiz ~]
2014-05-16 04:46:48 +04:00
==
::
2014-04-30 21:04:07 +04:00
++ camp :: request a file
2015-12-07 03:46:01 +03:00
|= {ren+care bem+beam}
2014-04-30 21:04:07 +04:00
^+ +>
2014-07-03 02:08:02 +04:00
%= +>
2014-12-10 01:59:31 +03:00
kig [+(p.kig) (~(put by q.kig) p.kig [ren bem])]
2015-03-12 03:37:37 +03:00
mow
:_ mow
2014-05-24 00:46:43 +04:00
:- hen
2015-03-12 03:37:37 +03:00
:^ %pass
2015-07-10 21:49:03 +03:00
[(scot %p our) (scot %ud num) (scot %ud p.kig) ~]
2014-06-21 22:42:34 +04:00
%c
2015-09-08 23:15:40 +03:00
~& >> [%camping ren bem]
2015-03-27 02:26:39 +03:00
[%warp [our p.bem] q.bem [~ %sing ren r.bem (flop s.bem)]]
2014-04-30 21:04:07 +04:00
==
2014-05-07 21:42:31 +04:00
::
2014-05-14 21:32:00 +04:00
++ clef :: cache a result
2015-12-07 03:46:01 +03:00
|* sem+*
|* {hoc+(bolt) fun+(burg)}
2014-05-14 21:32:00 +04:00
?- -.q.hoc
2015-12-07 03:46:01 +03:00
$2 hoc
$1 hoc
$0
2014-05-14 21:32:00 +04:00
=^ cux p.hoc ((calk p.hoc) sem q.q.hoc)
?^ cux
2015-05-09 03:13:10 +03:00
[p=p.hoc q=[%0 p=dep.p.u.cux q=((calf sem) u.cux)]]
=+ nuf=(cope hoc fun)
?- -.q.nuf
2015-12-07 03:46:01 +03:00
$2 nuf
$1 nuf
$0
2015-06-12 00:42:05 +03:00
:: ~& :- %clef-new
:: ?+ sem `@tas`sem
:: %hood [%hood (tope &1.q.q.hoc)]
:: %bake [%bake `mark`&1.q.q.hoc (tope &2.q.q.hoc)]
:: ==
:- p=(came p.nuf `calx`[sem `calm`[now p.q.nuf] q.q.hoc q.q.nuf])
q=q.nuf
==
2014-05-14 21:32:00 +04:00
==
::
2015-08-27 21:47:45 +03:00
++ coax !. :: bolt across
2015-12-07 03:46:01 +03:00
|* {hoc+(bolt) fun+(burg)}
2014-05-14 04:04:23 +04:00
?- -.q.hoc
2015-12-07 03:46:01 +03:00
$0 =+ nuf=$:fun(+<- p.hoc)
2014-05-16 00:17:54 +04:00
:- p=p.nuf
2014-05-14 04:04:23 +04:00
^= q
?- -.q.nuf
2015-12-07 03:46:01 +03:00
$0 [%0 p=(grom p.q.hoc p.q.nuf) q=[q.q.hoc q.q.nuf]]
$1 q.nuf
$2 q.nuf
2014-05-07 21:42:31 +04:00
==
2015-12-07 03:46:01 +03:00
$1 =+ nuf=$:fun(+<- p.hoc)
2014-05-16 00:17:54 +04:00
:- p=p.nuf
2014-05-14 04:04:23 +04:00
^= q
?- -.q.nuf
2015-12-07 03:46:01 +03:00
$0 q.hoc
$1 [%1 p=(grom p.q.nuf p.q.hoc)]
$2 q.nuf
2014-05-07 21:42:31 +04:00
==
2015-12-07 03:46:01 +03:00
$2 hoc
2014-05-07 21:42:31 +04:00
==
::
2014-07-08 03:17:21 +04:00
++ cool :: error caption
2015-12-14 10:58:14 +03:00
|* {cyt+$@(term (trap tank)) hoc+(bolt)}
2015-12-07 03:46:01 +03:00
?. ?=($2 -.q.hoc) hoc
2015-07-06 22:48:16 +03:00
[p=p.hoc q=[%2 p=p.q.hoc q=[?^(cyt *cyt [>`@tas`cyt<]~) q.q.hoc]]]
::
2014-05-07 21:42:31 +04:00
++ cope :: bolt along
2015-12-07 03:46:01 +03:00
|* {hoc+(bolt) fun+(burg)}
2014-05-14 04:04:23 +04:00
?- -.q.hoc
2015-12-07 03:46:01 +03:00
$1 hoc
$2 hoc
$0 =+ nuf=(fun p.hoc q.q.hoc)
2014-05-16 00:17:54 +04:00
:- p=p.nuf
2014-05-14 04:04:23 +04:00
^= q
?- -.q.nuf
2015-12-07 03:46:01 +03:00
$1 q.nuf
2015-12-15 01:21:10 +03:00
$2 [%2 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
$0 [%0 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
2015-06-08 22:48:35 +03:00
== ==
2014-05-07 21:42:31 +04:00
::
2015-06-24 01:59:48 +03:00
++ coop :: bolt alter
2015-12-07 03:46:01 +03:00
|* {hoc+(bolt) fun+(burg)}
2015-06-24 01:59:48 +03:00
?- -.q.hoc
2015-12-07 03:46:01 +03:00
$1 hoc
$0 hoc
$2 =+ nuf=(fun(+<- p.hoc))
2015-06-24 01:59:48 +03:00
:- p=p.nuf
^= q
?- -.q.nuf
2015-12-07 03:46:01 +03:00
$1 q.nuf
2015-12-15 01:21:10 +03:00
$0 [%0 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
2015-12-07 03:46:01 +03:00
$2 =. q.q.nuf (welp q.q.nuf q.q.hoc)
2015-12-15 01:21:10 +03:00
[%2 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
2015-06-24 01:59:48 +03:00
== ==
::
2014-05-07 21:42:31 +04:00
++ coup :: toon to bolt
2015-12-07 03:46:01 +03:00
|= cof+cafe
2015-12-14 10:58:14 +03:00
|* {ton+toon fun+$+(* *)}
2014-05-16 00:17:54 +04:00
:- p=cof
2014-05-14 04:04:23 +04:00
^= q
2014-05-07 21:42:31 +04:00
?- -.ton
2015-12-07 03:46:01 +03:00
$2 [%2 p=*(set beam) q=p.ton]
$0 [%0 p=*(set beam) q=(fun p.ton)]
$1 :: ~& [%coup-need ((list path) p.ton)]
2014-10-02 22:53:53 +04:00
=- ?- -.faw
$& :- %1
^= p
%- sa
%+ turn p.faw
|=(a+{care beam} [-.a +.a *tang])
$| [%2 p=*(set beam) q=p.faw]
2014-05-07 21:42:31 +04:00
==
^= faw
2015-02-12 00:10:07 +03:00
|- ^- (each (list (pair care beam)) tang)
2014-05-07 21:42:31 +04:00
?~ p.ton [%& ~]
=+ nex=$(p.ton t.p.ton)
2015-12-07 03:46:01 +03:00
=+ err=|=(a+tape [%| leaf/a ?:(?=($& -.nex) ~ p.nex)])
2014-05-07 21:42:31 +04:00
=+ pax=(path i.p.ton)
2015-02-12 00:10:07 +03:00
?~ pax (err "blocking empty")
2015-12-07 03:46:01 +03:00
?. ?=($c (end 3 1 i.pax))
2015-02-12 00:10:07 +03:00
(err "blocking not clay")
2014-12-10 01:59:31 +03:00
=+ ren=((soft care) (rsh 3 1 i.pax))
?~ ren
2015-02-12 00:10:07 +03:00
(err "blocking not care")
2014-10-02 23:27:15 +04:00
=+ zis=(tome t.pax)
2014-05-07 21:42:31 +04:00
?~ zis
2015-02-12 00:10:07 +03:00
(err "blocking not beam")
2014-05-07 21:42:31 +04:00
?- -.nex
$& [%& [u.ren u.zis] p.nex]
$| nex
2014-05-07 21:42:31 +04:00
==
2014-04-30 21:04:07 +04:00
==
2014-05-07 21:42:31 +04:00
::
2014-07-26 04:29:01 +04:00
++ cowl :: each to bolt
2015-12-07 03:46:01 +03:00
|= cof+cafe
2015-12-14 10:58:14 +03:00
|* {tod+(each * tang) fun+$+(* *)}
2014-07-26 04:29:01 +04:00
%+ (coup cof)
?- -.tod
$& [%0 p=p.tod]
$| [%2 p=p.tod]
2014-07-26 04:29:01 +04:00
==
fun
::
2015-05-26 04:17:59 +03:00
++ tabl-run :: apply to all elems
2015-12-07 03:46:01 +03:00
|= fun+(burg cage gage)
|= {cof+cafe gag+gage}
2015-05-26 04:17:59 +03:00
^- (bolt gage)
2015-12-07 03:46:01 +03:00
?. ?=($tabl -.gag)
2015-05-26 04:17:59 +03:00
(cope (furl cof gag) fun)
2015-12-07 03:46:01 +03:00
%- cope :_ (flux |=(rex+gagl [%tabl rex]))
2015-07-06 22:48:16 +03:00
|- ^- (bolt (list (pair gage gage)))
?~ p.gag (fine cof ~)
%. [cof p.gag]
;~ cope
;~ coax
2015-12-07 03:46:01 +03:00
|=({cof+cafe {^ q+gage} t+gagl} (fret ^^$(cof cof, gag q)))
|=({cof+cafe ^ t+gagl} ^$(cof cof, p.gag t))
2015-07-06 22:48:16 +03:00
==
2015-12-07 03:46:01 +03:00
(flux |=({v+gage t+gagl} [[p.i.p.gag v] t]))
2015-07-06 22:48:16 +03:00
==
2015-05-26 04:17:59 +03:00
::
2015-07-31 00:28:42 +03:00
++ some-in-map
2015-12-07 03:46:01 +03:00
|* fun+(burg span (unit))
2015-12-15 01:21:10 +03:00
=+ res=_(need [?+(-.q !! $0 q.q)]:*fun)
2015-07-31 00:28:42 +03:00
=+ marv=(map span res)
2015-12-07 03:46:01 +03:00
|= {cof+cafe sud+(map span $~)} ^- (bolt marv)
2015-07-31 00:28:42 +03:00
?~ sud (flue cof)
%. [cof sud]
;~ cope
;~ coax
2015-12-15 01:21:10 +03:00
|=({cof+cafe _sud} ^$(cof cof, sud l))
|=({cof+cafe _sud} ^$(cof cof, sud r))
2015-12-07 03:46:01 +03:00
|= {cof+cafe {dir+@ta $~} ^}
2015-07-31 00:28:42 +03:00
%+ cope (fun cof dir)
(flux (lift |*(* [dir +<])))
==
%- flux
2015-12-07 03:46:01 +03:00
|= {lam+marv ram+marv nod+(unit {span res})}
2015-07-31 00:28:42 +03:00
?^(nod [u.nod lam ram] (~(uni by lam) ram))
==
++ dash :: process cache
2015-12-07 03:46:01 +03:00
|= cof+cafe
2014-05-16 04:46:48 +04:00
^+ +>
:: ~? |
:: :+ %dash (lent (skim (~(tap in p.cof)) |=(a=calx ?=($bake -.a))))
:: =. q.cof (~(dif by q.cof) jav.bay)
:: =+ num=10
:: %. |= a+(list calx)
:: =+ len=(lent a)
:: =- [len (scag num (turn a f)) ?:((gth len num) %etc ~)]
:: =+ dewe=|=(beam +<(s ?+(s s {@ $web *} t.t.s)))
:: f=|=(b+calx [-.b ?+(-.b ~ %bake [p.q.b (tope (dewe q.q.b))])])
:: %~ run by
:: =< `(jar term calx)`(~(rep by q.cof) .)
:: |= {{* a+calx} b+(jar term calx)}
:: (~(add ja b) -.a a)
2015-04-29 03:43:23 +03:00
%_(+> jav.bay q.cof)
2014-05-16 04:46:48 +04:00
::
2015-02-27 09:35:41 +03:00
++ diff :: diff
2015-12-07 03:46:01 +03:00
|= {cof+cafe kas+silk kos+silk}
2015-02-27 09:35:41 +03:00
^- (bolt gage)
%. [cof kas kos]
;~ cope
;~ coax
2015-12-07 03:46:01 +03:00
|=({cof+cafe p+silk q+silk} (cope (make cof p) furl))
|=({cof+cafe p+silk q+silk} (cope (make cof q) furl))
2015-02-27 09:35:41 +03:00
==
2015-12-07 03:46:01 +03:00
|= {cof+cafe cay+cage coy+cage} ^- (bolt gage)
2015-02-27 09:35:41 +03:00
?. =(p.cay p.coy)
%+ flaw cof :_ ~
leaf/"diff on data of different marks: {(trip p.cay)} {(trip p.coy)}"
?: =(q.q.cay q.q.coy)
2015-05-26 04:17:59 +03:00
(fine cof %& %null [%atom %n] ~)
2015-07-06 22:48:16 +03:00
::
2015-03-12 03:37:37 +03:00
%+ cope (fang cof p.cay)
2015-12-07 03:46:01 +03:00
|= {cof+cafe pro+vase}
2015-02-27 09:35:41 +03:00
?. (slab %grad p.pro)
(flaw cof leaf/"no ++grad" ~)
=+ gar=(slap pro [%cnzy %grad])
2015-07-08 01:22:32 +03:00
?@ q.gar
=+ for=((sand %tas) q.gar)
?~ for (flaw cof leaf/"bad mark ++grad" ~)
2015-02-27 09:35:41 +03:00
%^ make cof %diff
:- [%cast u.for `cay]
[%cast u.for `coy]
2015-07-08 01:22:32 +03:00
?. (slab %form p.gar)
(flaw cof leaf/"no ++form:grad" ~)
2015-02-27 09:35:41 +03:00
?. (slab %diff p.gar)
(flaw cof leaf/"no ++diff:grad" ~)
%+ cope (keel cof pro [[%& 6]~ q.cay]~)
2015-12-07 03:46:01 +03:00
|= {cof+cafe pox+vase}
2015-02-27 09:35:41 +03:00
%+ cope
%^ maul cof
(slap (slap pox [%cnzy %grad]) [%cnzy %diff])
q.coy
2015-12-07 03:46:01 +03:00
|= {cof+cafe dif+vase}
=+ for=((soft @tas) q:(slap gar [%cnzy %form]))
2015-02-27 09:35:41 +03:00
?~ for
(flaw cof leaf/"bad ++form:grad" ~)
2015-05-26 04:17:59 +03:00
(fine cof %& u.for dif)
2015-02-27 09:35:41 +03:00
==
::
2015-02-19 00:35:22 +03:00
++ daze :: remember depends
2015-12-07 03:46:01 +03:00
|= dep+(set beam)
2015-02-19 02:15:27 +03:00
^+ [*@uvH deh.bay]
2015-06-04 04:03:35 +03:00
=. dep
=< (sa (skip (~(tap in dep)) .))
2015-12-07 03:46:01 +03:00
|= dap+beam ^- ?
2015-06-04 04:03:35 +03:00
?~ s.dap |
=>(.(s.dap t.s.dap) |((~(has in dep) dap) $))
2015-02-19 02:15:27 +03:00
?~ dep [0v0 deh.bay]
2015-02-19 00:35:22 +03:00
=+ hap=(sham dep)
2015-04-29 03:43:23 +03:00
?: (~(has by deh.bay) hap)
[hap deh.bay]
[hap (~(put by deh.bay) hap [%init dep])]
2015-01-08 04:49:57 +03:00
::
2014-05-07 21:42:31 +04:00
++ exec :: execute app
2014-04-30 21:04:07 +04:00
^+ ..zo
2014-05-09 04:34:57 +04:00
?: !=(~ q.kig) ..zo
2015-04-29 03:43:23 +03:00
=+ bot=(make [~ jav.bay] kas)
2014-05-16 04:46:48 +04:00
=. ..exec (dash p.bot)
2014-05-14 04:04:23 +04:00
?- -.q.bot
2015-12-07 03:46:01 +03:00
$0 =^ dep deh.bay (daze p.q.bot)
2015-05-26 04:17:59 +03:00
amok:(expo [%made dep q.q.bot])
2015-12-07 03:46:01 +03:00
$2 =^ dep deh.bay (daze p.q.bot)
2015-02-19 00:35:22 +03:00
amok:(expo [%made dep %| q.q.bot])
2015-12-07 03:46:01 +03:00
$1 =+ zuk=(~(tap by p.q.bot) ~)
2014-05-09 04:34:57 +04:00
=< abet
|- ^+ ..exec
?~ zuk ..exec
2015-12-15 01:21:10 +03:00
$(zuk t.zuk, ..exec `_..exec`(camp p.i.zuk q.i.zuk))
==
2014-05-07 21:42:31 +04:00
::
2014-06-03 09:07:32 +04:00
++ expo :: return gift
2015-12-07 03:46:01 +03:00
|= gef+gift
2014-06-03 09:07:32 +04:00
%_(+> mow :_(mow [hen %give gef]))
2014-05-09 04:34:57 +04:00
::
++ fade :: compile to hood
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark bem+beam}
^- (bolt hood)
2015-08-20 01:55:51 +03:00
%+ cool |.(leaf/"ford: fade {<[(tope bem)]>}")
2015-05-26 04:17:59 +03:00
%+ cope (cope (make cof [%bake for bem ~]) furl)
2015-12-07 03:46:01 +03:00
|= {cof+cafe cay+cage}
2015-05-02 03:16:57 +03:00
%+ (clef %hood) (fine cof bem(r [%ud 0]) cay)
2015-05-26 04:17:59 +03:00
^- (burg (pair beam cage) hood)
2015-12-07 03:46:01 +03:00
|= {cof+cafe bum+beam cay+cage}
2015-07-06 22:48:16 +03:00
~| fade/(tope bum)
2015-06-12 00:42:05 +03:00
:: ~& fade/clef-miss/bem
2015-05-02 03:16:57 +03:00
=+ rul=(fair bum)
2014-07-19 04:51:22 +04:00
?. ?=(@ q.q.cay)
(flaw cof ~)
=+ vex=((full rul) [[1 1] (trip q.q.cay)])
?~ q.vex
(flaw cof [%leaf "syntax error: {<p.p.vex>} {<q.p.vex>}"] ~)
(fine cof p.u.q.vex)
::
2015-07-08 03:05:25 +03:00
++ fame
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam} :: beam with - as /
2015-07-08 03:05:25 +03:00
^- (bolt beam)
2015-12-07 03:46:01 +03:00
%- cope :_ (flux |=(a+(unit beam) (fall a bem)))
2015-07-08 03:05:25 +03:00
?~ s.bem (flue cof)
=+ opt=`(list term)`(fall (tear i.s.bem) ~)
?~ opt (flue cof)
|- ^- (bolt (unit beam))
=. i.s.bem (tack opt)
%+ cope (lima cof %hoon bem ~)
2015-12-07 03:46:01 +03:00
|= {cof+cafe vax+(unit vase)} ^- (bolt (unit beam))
2015-07-08 03:05:25 +03:00
?^ vax (fine cof `bem)
?~ t.opt (flue cof)
%+ cope ^$(opt t.opt, t.s.bem :_(t.s.bem i.opt), cof cof)
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+(unit beam)} ^- (bolt (unit beam))
2015-07-08 03:05:25 +03:00
?^ bem (fine cof bem)
^$(opt :_(t.t.opt (tack i.opt i.t.opt ~)), cof cof)
::
2014-07-29 02:46:03 +04:00
++ fang :: protocol door
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark} ^- (bolt vase)
2015-07-29 03:04:15 +03:00
(cope (lamp cof bek /[for]/mar) lear)
2014-07-29 02:46:03 +04:00
::
2014-07-19 04:51:22 +04:00
++ fair :: hood parsing rule
2015-12-07 03:46:01 +03:00
|= bem+beam
?> ?=({$ud $0} r.bem) :: XX sentinel
2015-09-02 01:20:17 +03:00
=+ vez=(vang & (tope bem))
2014-07-19 04:51:22 +04:00
=< hood
2014-10-02 23:46:00 +04:00
|%
2014-07-19 04:51:22 +04:00
++ case
2014-10-02 23:46:00 +04:00
%- sear
2014-07-19 04:51:22 +04:00
:_ nuck:so
2015-12-07 03:46:01 +03:00
|= a+coin
?. ?=({$$ ?($da $ud $tas) *} a) ~
2014-07-19 04:51:22 +04:00
[~ u=(^case a)]
::
2015-05-02 03:16:57 +03:00
++ hath (sear plex:vez (stag %clsg poor:vez)) :: hood path
2014-08-04 21:18:26 +04:00
++ have (sear tome ;~(pfix fas hath)) :: hood beam
2014-07-19 04:51:22 +04:00
++ hood
2014-07-21 07:15:02 +04:00
%+ ifix [gay gay]
2014-07-19 04:51:22 +04:00
;~ plug
2014-07-21 07:15:02 +04:00
;~ pose
(ifix [;~(plug fas wut gap) gap] dem)
2014-07-21 07:15:02 +04:00
(easy zuse)
==
::
;~ pose
(ifix [;~(plug fas hep gap) gap] (most ;~(plug com gaw) hoof))
(easy ~)
==
::
;~ pose
(ifix [;~(plug fas lus gap) gap] (most ;~(plug com gaw) hoof))
(easy ~)
==
::
2014-08-02 03:39:15 +04:00
(star ;~(sfix horn gap))
(most gap hoop)
2014-07-19 04:51:22 +04:00
==
::
++ hoof
2015-12-07 03:46:01 +03:00
%+ cook |=(a+^hoof a)
2014-07-22 05:55:40 +04:00
;~ plug
sym
;~ pose
%+ stag ~
;~(plug ;~(pfix fas case) ;~(pfix ;~(plug fas sig) fed:ag))
(easy ~)
==
2014-07-19 04:51:22 +04:00
==
::
++ hoop
;~ pose
2014-08-04 21:18:26 +04:00
(stag %| ;~(pfix ;~(plug fas fas gap) have))
(stag %& tall:vez)
==
::
++ horn
=< apex
2015-12-07 03:46:01 +03:00
=| tol+?
|%
++ apex
%+ knee *^horn |. ~+
;~ pfix fas
;~ pose
(stag %toy ;~(sfix sym fas))
2014-08-06 04:17:36 +04:00
(stag %ape ;~(pfix sig ape:read))
(stag %arg ;~(pfix buc ape:read))
(stag %day ;~(pfix bar day:read))
(stag %dub ;~(pfix tis dub:read))
(stag %fan ;~(pfix dot fan:read))
(stag %for ;~(pfix com for:read))
2015-02-03 21:41:17 +03:00
(stag %hel ;~(pfix cen hel:read))
2014-08-06 04:17:36 +04:00
(stag %hub ;~(pfix pat day:read))
(stag %man ;~(pfix tar man:read))
2015-01-13 01:40:50 +03:00
(stag %nap ;~(pfix cab day:read))
2014-09-03 03:31:56 +04:00
(stag %now ;~(pfix pam day:read))
2014-08-06 04:17:36 +04:00
(stag %saw ;~(pfix sem saw:read))
(stag %see ;~(pfix col see:read))
(stag %sic ;~(pfix ket sic:read))
==
==
::
++ rail
2015-12-07 03:46:01 +03:00
|* {wid+rule tal+rule}
?. tol wid
;~(pose wid tal)
::
++ read
|% ++ ape
%+ rail
(ifix [sel ser] (stag %cltr (most ace wide:vez)))
;~(pfix gap tall:vez)
::
2014-10-02 23:46:00 +04:00
++ day
%+ rail
2014-10-02 23:46:00 +04:00
apex(tol |)
;~(pfix gap apex)
::
++ dub
2014-10-02 23:46:00 +04:00
%+ rail
;~(plug sym ;~(pfix tis apex(tol |)))
;~(pfix gap ;~(plug sym ;~(pfix gap apex)))
::
++ fan
2014-10-02 23:46:00 +04:00
%+ rail fail
;~(sfix (star ;~(pfix gap apex)) ;~(plug gap duz))
::
++ for
%+ rail
;~(plug (ifix [sel ser] hath) apex(tol |))
;~(pfix gap ;~(plug hath ;~(pfix gap apex)))
2015-02-03 21:41:17 +03:00
::
++ hel
%+ rail
;~(plug ;~(pose ;~(sfix dem:ag cen) (easy 0)) apex(tol |))
;~(pfix gap ;~(plug ;~(pose ;~(sfix dem:ag gap) (easy 0)) apex))
::
++ man
%+ rail fail
%- sear
:_ ;~(sfix (star ;~(pfix gap apex)) ;~(plug gap duz))
2015-12-07 03:46:01 +03:00
|= fan+(list ^horn)
=| naf+(list (pair term ^horn))
|- ^- (unit (map term ^horn))
?~ fan (some (~(gas by *(map term ^horn)) naf))
2015-12-07 03:46:01 +03:00
?. ?=($dub -.i.fan) ~
$(fan t.fan, naf [[p.i.fan q.i.fan] naf])
::
++ saw
%+ rail
;~(plug ;~(sfix wide:vez sem) apex(tol |))
;~(pfix gap ;~(plug tall:vez ;~(pfix gap apex)))
2014-09-24 05:03:20 +04:00
::
++ see
2014-10-02 23:46:00 +04:00
%+ rail
2014-09-24 05:03:20 +04:00
;~(plug ;~(sfix have col) apex(tol |))
;~(pfix gap ;~(plug have ;~(pfix gap apex)))
::
++ sic
2014-10-02 23:46:00 +04:00
%+ rail
2015-12-14 09:52:13 +03:00
;~(plug ;~(sfix wide:vez ket) apex(tol |))
;~(pfix gap ;~(plug tall:vez ;~(pfix gap apex)))
--
::
--
2014-07-19 04:51:22 +04:00
--
::
2015-02-27 09:35:41 +03:00
++ join
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark kas+silk kos+silk}
2015-02-27 09:35:41 +03:00
^- (bolt gage)
%. [cof kas kos]
;~ cope
;~ coax
2015-12-07 03:46:01 +03:00
|=({cof+cafe p+silk q+silk} (cope (make cof p) furl))
|=({cof+cafe p+silk q+silk} (cope (make cof q) furl))
2015-02-27 09:35:41 +03:00
==
2015-12-07 03:46:01 +03:00
|= {cof+cafe cay+cage coy+cage} ^- (bolt gage)
2015-07-06 22:48:16 +03:00
::
2015-03-12 03:37:37 +03:00
%+ cope (fang cof for)
2015-12-07 03:46:01 +03:00
|= {cof+cafe pro+vase}
2015-02-27 09:35:41 +03:00
?. (slab %grad p.pro)
(flaw cof leaf/"no ++grad" ~)
=+ gar=(slap pro [%cnzy %grad])
2015-07-08 01:22:32 +03:00
?@ q.gar
=+ too=((sand %tas) q.gar)
?~ too (flaw cof leaf/"bad mark ++grad" ~)
(make cof %join u.too `cay `coy)
2015-07-08 01:22:32 +03:00
?. (slab %form p.gar)
(flaw cof leaf/"no ++form:grad" ~)
=+ fom=((soft @tas) q:(slap gar [%cnzy %form]))
2015-02-27 09:35:41 +03:00
?~ fom
(flaw cof leaf/"bad ++form:grad" ~)
?. &(=(u.fom p.cay) =(u.fom p.coy))
%+ flaw cof :_ :_ ~
leaf/"join on data of bad marks: {(trip p.cay)} {(trip p.coy)}"
leaf/"expected mark {(trip u.fom)}"
?: =(q.q.cay q.q.coy)
2015-05-26 04:17:59 +03:00
(fine cof %& cay)
2015-02-27 09:35:41 +03:00
?. (slab %join p.gar)
(flaw cof leaf/"no ++join:grad" ~)
%+ cope
%^ maul cof
(slap (slap pro [%cnzy %grad]) [%cnzy %join])
(slop q.cay q.coy)
2015-12-07 03:46:01 +03:00
|= {cof+cafe dif+vase}
2015-02-27 09:35:41 +03:00
?@ q.dif
2015-05-26 04:17:59 +03:00
(fine cof %& %null dif)
(fine cof %& u.fom (slot 3 dif))
2015-02-27 09:35:41 +03:00
==
::
2015-04-04 04:31:57 +03:00
++ mash
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark mas+milk mos+milk}
2015-04-04 04:31:57 +03:00
^- (bolt gage)
2015-04-14 00:29:39 +03:00
%. [cof r.mas r.mos]
2015-04-04 04:31:57 +03:00
;~ cope
;~ coax
2015-12-07 03:46:01 +03:00
|=({cof+cafe p+silk q+silk} (cope (make cof p) furl))
|=({cof+cafe p+silk q+silk} (cope (make cof q) furl))
2015-04-04 04:31:57 +03:00
==
2015-12-07 03:46:01 +03:00
|= {cof+cafe cay+cage coy+cage} ^- (bolt gage)
2015-04-04 04:31:57 +03:00
%+ cope (fang cof for)
2015-12-07 03:46:01 +03:00
|= {cof+cafe pro+vase}
2015-04-04 04:31:57 +03:00
?. (slab %grad p.pro)
(flaw cof leaf/"no ++grad" ~)
=+ gar=(slap pro [%cnzy %grad])
2015-07-08 01:22:32 +03:00
?@ q.gar
=+ too=((sand %tas) q.gar)
?~ too (flaw cof leaf/"bad mark ++grad" ~)
2015-04-14 00:29:39 +03:00
%+ make cof
[%mash u.too [p.mas q.mas `cay] [p.mos q.mos `coy]]
2015-07-08 01:22:32 +03:00
?. (slab %form p.gar)
(flaw cof leaf/"no ++form:grad" ~)
2015-12-07 03:46:01 +03:00
=+ fom=((soft @tas) q:(slap gar [%cnzy %form]))
2015-04-04 04:31:57 +03:00
?~ fom
(flaw cof leaf/"bad ++form:grad" ~)
?. &(=(u.fom p.cay) =(u.fom p.coy))
%+ flaw cof :_ :_ ~
leaf/"mash on data of bad marks: {(trip p.cay)} {(trip p.coy)}"
leaf/"expected mark {(trip u.fom)}"
?: =(q.q.cay q.q.coy)
2015-05-26 04:17:59 +03:00
(fine cof %& cay)
2015-04-04 04:31:57 +03:00
?. (slab %mash p.gar)
2015-05-26 04:17:59 +03:00
(fine cof %& %null [%atom %n] ~)
2015-04-04 04:31:57 +03:00
%+ cope
%^ maul cof
(slap (slap pro [%cnzy %grad]) [%cnzy %mash])
%+ slop
:(slop [[%atom %p] p.mas] [[%atom %tas] q.mas] q.cay)
:(slop [[%atom %p] p.mos] [[%atom %tas] q.mos] q.coy)
2015-12-13 05:51:23 +03:00
(flux |=(dif+vase [%& u.fom dif]))
2015-04-04 04:31:57 +03:00
==
::
2014-05-31 16:52:06 +04:00
++ kale :: mutate
2015-12-07 03:46:01 +03:00
|= {cof+cafe kas+silk muy+(list (pair wing silk))}
2015-02-27 09:35:41 +03:00
^- (bolt gage)
2014-05-31 16:52:06 +04:00
%+ cope
|- ^- (bolt (list (pair wing vase)))
2015-02-13 00:03:54 +03:00
?~ muy (flue cof)
2015-05-26 04:17:59 +03:00
%+ cope (cope (make cof q.i.muy) furl)
2015-12-07 03:46:01 +03:00
|= {cof+cafe cay+cage}
2014-05-31 16:52:06 +04:00
%+ cope ^$(muy t.muy)
2015-12-07 03:46:01 +03:00
|= {cof+cafe rex+(list (pair wing vase))}
2014-05-31 16:52:06 +04:00
(fine cof [[p.i.muy q.cay] rex])
2015-12-07 03:46:01 +03:00
|= {cof+cafe yom+(list (pair wing vase))}
2014-05-31 16:52:06 +04:00
%+ cope (make cof kas)
2015-05-26 04:17:59 +03:00
%- tabl-run
2015-12-07 03:46:01 +03:00
|= {cof+cafe cay+cage}
%+ cope (keel cof q.cay yom)
2015-12-07 03:46:01 +03:00
(flux |=(vax+vase [%& p.cay vax]))
2014-05-31 16:52:06 +04:00
::
++ keel :: apply mutations
2015-12-07 03:46:01 +03:00
|= {cof+cafe suh+vase yom+(list (pair wing vase))}
^- (bolt vase)
2015-07-06 22:48:16 +03:00
%+ cool =< |.(leaf/"ford: keel {<(murn yom +)>}")
2015-12-07 03:46:01 +03:00
|= {a+wing b+type *}
2015-07-06 22:48:16 +03:00
=+ c=p:(slap suh cnzz/a)
?: (~(nest ut c) | b) ~
(some [a c b])
2014-10-02 23:46:00 +04:00
%^ maim cof
%+ slop suh
|- ^- vase
?~ yom [[%atom %n] ~]
(slop q.i.yom $(yom t.yom))
^- twig
:+ %cncb [%& 2]~
=+ axe=3
|- ^- (list (pair wing twig))
?~ yom ~
:- [p.i.yom [%$ (peg axe 2)]]
$(yom t.yom, axe (peg axe 3))
::
2015-07-31 00:28:42 +03:00
++ lads :: possible children
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam arg+heel}
^- (bolt (map span $~))
=| {res+(map span $~) new+(qeu beam)}
2015-07-31 00:28:42 +03:00
=+ all=`(set beam)`[bem `~]
|^ %+ with (cope ?^(arg (flue cof) kids) return)
2015-12-15 01:21:10 +03:00
|=(_. (with (cope marks look) next))
2015-07-31 00:28:42 +03:00
::
++ done .
++ with
2015-12-15 01:21:10 +03:00
|* {a+(bolt _done) b+$+(_done (bolt))} ^+ *b
(cope a |=({cof+cafe c+_done} (b c(cof cof))))
2015-07-31 00:28:42 +03:00
::
++ return
%- flux
2015-12-13 05:51:23 +03:00
|=(a+(map span $~) done(res (~(uni by res) a)))
2015-07-31 00:28:42 +03:00
::
++ next
2015-12-15 01:21:10 +03:00
|= _. => +<
2015-12-07 03:46:01 +03:00
^- (bolt (map span $~))
2015-07-31 00:28:42 +03:00
?^ s.bem
$(s.bem t.s.bem, arg [i.s.bem arg])
?: =(~ new) (fine cof res)
=^ bem new ~(get to new)
~| next-beam/(tope bem)
?< (gth (lent +.bem) 10)
$(bem bem, arg ~)
::
++ kids
%^ lash cof bem
2015-12-07 03:46:01 +03:00
|= {cof+cafe dir+span}
2015-07-31 00:28:42 +03:00
%+ cope (lend cof bem(s [dir s.bem]))
2015-12-07 03:46:01 +03:00
(flux |=(a+arch ?~(dir.a ~ (some ~))))
2015-07-31 00:28:42 +03:00
::
++ marks
=< (cope (laze cof bem) (flux .))
2015-12-07 03:46:01 +03:00
|= a+(map mark ?) ^- (list mark)
2015-07-31 00:28:42 +03:00
(turn :_(head (skip :_(tail (~(tap by a)))))) :: | = %hook
::
++ look
2015-12-15 01:21:10 +03:00
|= {cof+cafe hok+(list mark)} ^- (bolt _done)
2015-07-31 00:28:42 +03:00
?~ hok (fine cof done)
%+ with $(hok t.hok)
2015-12-15 01:21:10 +03:00
|= _done ^- (bolt _done)
2015-07-31 00:28:42 +03:00
=+ bim=bem(s [i.hok s.bem])
=+ hid=(fade cof %hook bim)
2015-12-07 03:46:01 +03:00
?: ?=($2 -.q.hid)
2015-07-31 00:28:42 +03:00
(fine cof done)
=< (cope hid (flux .))
2015-12-07 03:46:01 +03:00
|= hyd+hood
2015-07-31 00:28:42 +03:00
=^ neu all
(chop:(meow bim (flop arg)) all %fan fan.hyd)
done(new (~(gas to new) (~(tap in `(set beam)`neu))))
--
::
2015-07-29 03:04:15 +03:00
++ laze :: find real or virtual
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam}
2015-07-29 03:04:15 +03:00
%^ lash cof bem
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark}
^- (bolt (unit ?))
2015-07-29 03:04:15 +03:00
?. ((sane %tas) for) (flue cof)
=. s.bem [for s.bem]
2014-05-16 00:17:54 +04:00
%+ cope (lend cof bem)
2015-12-07 03:46:01 +03:00
|= {cof+cafe arc+arch}
2015-09-06 04:14:00 +03:00
?^ fil.arc (fine cof (some &))
?. (~(has by dir.arc) %hook)
2015-06-03 04:05:11 +03:00
(flue cof)
%+ cope (lend cof bem(s [%hook s.bem]))
2015-12-07 03:46:01 +03:00
|= {cof+cafe arc+arch}
2015-09-06 04:14:00 +03:00
?~ fil.arc
2015-06-03 04:05:11 +03:00
(flue cof)
2015-07-29 03:04:15 +03:00
(fine cof (some |))
::
++ lace :: load real or virtual
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark bem+beam arg+heel lit+?}
2015-07-29 03:04:15 +03:00
^- (bolt vase)
=. s.bem [for s.bem]
?: lit
%+ cool |.(leaf/"ford: load {<for>} {<(tope bem)>}")
%+ cope (liar cof bem)
|= {cof+cafe cay+cage}
2015-07-29 03:04:15 +03:00
?. =(for p.cay)
(flaw cof leaf/"unexpected mark {<p.cay>}" ~)
((lake for) cof q.cay)
2015-06-10 02:35:04 +03:00
%+ cool |.(leaf/"ford: hook {<for>} {<(tope bem)>}")
2015-06-03 04:05:11 +03:00
%+ cope (fade cof %hook bem)
2015-12-07 03:46:01 +03:00
|= {cof+cafe hyd+hood}
2015-06-03 04:05:11 +03:00
(cope (abut:(meow bem arg) cof hyd) (lake for))
2014-05-07 21:42:31 +04:00
::
++ lake :: check/coerce
2015-12-07 03:46:01 +03:00
|= for+mark
|= {cof+cafe sam+vase}
2014-07-27 14:26:17 +04:00
^- (bolt vase)
%+ cool |.(leaf/"ford: check {<[for bek `@p`(mug q.sam)]>}")
2015-12-07 03:46:01 +03:00
?: ?=(?($hoon $hook) for)
=+ mas=((soft @t) q.sam)
?~ mas
(flaw cof [leaf/"ford: bad hoon or hook: {<[for bek]>}"]~)
(fine cof [%atom %t] u.mas)
2015-03-12 03:37:37 +03:00
%+ cope (fang cof for)
2015-12-07 03:46:01 +03:00
|= {cof+cafe tux+vase}
2015-09-11 20:54:28 +03:00
=+ typ=p:(slot 6 tux)
=. typ ?+(-.typ typ $face q.typ) :: XX vulcanization
2015-09-11 20:54:28 +03:00
?: (~(nest ut typ) | p.sam)
(fine cof typ q.sam)
?. (slob %grab p.tux)
2014-07-29 02:46:03 +04:00
(flaw cof [%leaf "ford: no grab: {<[for bek]>}"]~)
=+ gab=(slap tux [%cnzy %grab])
?. (slob %noun p.gab)
2014-07-29 02:46:03 +04:00
(flaw cof [%leaf "ford: no noun: {<[for bek]>}"]~)
%+ cope (maul cof (slap gab [%cnzy %noun]) [%noun q.sam])
2015-12-07 03:46:01 +03:00
|= {cof+cafe pro+vase}
2015-09-11 20:54:28 +03:00
?> (~(nest ut typ) | p.pro)
2014-10-08 23:06:40 +04:00
?: =(q.pro q.sam)
2015-09-11 20:54:28 +03:00
(fine cof typ q.pro)
2014-07-30 03:29:56 +04:00
(flaw cof [%leaf "ford: invalid content: {<[for bek]>}"]~)
2014-05-07 21:42:31 +04:00
::
2014-08-14 05:32:15 +04:00
++ lamp :: normalize version
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam}
2014-08-14 05:32:15 +04:00
^- (bolt beam)
2015-10-13 21:57:56 +03:00
%+ cope
2015-12-07 03:46:01 +03:00
?: ?=($ud -.r.bem) (fine cof bem)
2015-10-13 21:57:56 +03:00
=+ von=(save ~ %cw bem(s ~))
?~ von [p=cof q=[%1 [%w bem ~] ~ ~]]
(fine cof bem(r [%ud ((hard @) +.+:(need u.von))]))
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+{{ship desk $ud r+@u} s+spur}}
2015-10-13 21:57:56 +03:00
?: =(0 r.bem)
(flaw cof [leaf/"ford: no data: {<(tope bem(s ~))>}"]~)
2015-10-13 21:57:56 +03:00
(fine cof bem)
2014-08-14 05:32:15 +04:00
::
2014-06-26 16:18:30 +04:00
++ lave :: validate
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark som+*}
2014-05-12 02:48:41 +04:00
^- (bolt vase)
2015-03-12 03:37:37 +03:00
((lake for) cof [%noun som])
2014-05-12 02:48:41 +04:00
::
2014-05-07 21:42:31 +04:00
++ lane :: type infer
2015-12-07 03:46:01 +03:00
|= {cof+cafe typ+type gen+twig}
2014-07-26 04:29:01 +04:00
%+ (cowl cof) (mule |.((~(play ut typ) gen)))
2015-12-07 03:46:01 +03:00
|=(ref+type ref)
2014-05-07 21:42:31 +04:00
::
2015-07-29 03:04:15 +03:00
++ lash :: filter at beam
2015-12-07 03:46:01 +03:00
|* {cof+cafe bem+beam fun+(burg span (unit))}
2014-07-24 03:23:53 +04:00
%+ cope (lend cof bem)
2015-12-07 03:46:01 +03:00
|=({cof+cafe arc+arch} ((some-in-map fun) cof dir.arc))
2014-07-24 03:23:53 +04:00
::
2015-07-08 04:01:17 +03:00
++ lear :: load core
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam} ^- (bolt vase)
2015-07-08 04:01:17 +03:00
%+ cope (fame cof bem)
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam}
2015-07-08 04:01:17 +03:00
(cope (fade cof %hoon bem) abut:(meow bem ~))
::
2014-05-07 21:42:31 +04:00
++ lend :: load arch
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam}
2014-05-07 21:42:31 +04:00
^- (bolt arch)
2015-04-14 00:29:39 +03:00
=+ von=(save ~ %cy bem)
2014-12-10 01:59:31 +03:00
?~ von [p=cof q=[%1 [%y bem ~] ~ ~]]
?> ?=({$~ $arch ^} u.von)
2015-07-29 03:04:15 +03:00
=+ arc=((hard arch) q.q.u.u.von)
%+ cope (lamp cof bem)
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam}
2015-07-29 03:04:15 +03:00
(flag bem (fine cof arc))
2014-05-07 21:42:31 +04:00
::
2015-07-08 04:01:17 +03:00
++ liar :: load cage
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam}
2015-07-08 04:01:17 +03:00
^- (bolt cage)
2015-04-14 00:29:39 +03:00
=+ von=(save ~ %cx bem)
2014-05-07 21:42:31 +04:00
?~ von
2014-12-10 01:59:31 +03:00
[p=*cafe q=[%1 [[%x bem ~] ~ ~]]]
2014-05-07 21:42:31 +04:00
?~ u.von
2015-06-06 01:07:40 +03:00
(flaw cof leaf/"file not found" (smyt (tope bem)) ~)
2015-07-08 04:01:17 +03:00
(fine cof u.u.von)
2014-05-07 21:42:31 +04:00
::
++ lily :: translation targets
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark} ^- (bolt (set @tas))
2015-06-03 04:05:11 +03:00
%+ cope (lilt cof)
2015-12-07 03:46:01 +03:00
|= {cof+cafe lil+(jug mark mark)}
2015-06-03 04:05:11 +03:00
(fine cof (~(get ju lil) for))
::
++ lilt
2015-12-07 03:46:01 +03:00
|= cof+cafe ^- (bolt (jug mark mark))
2015-06-12 00:42:05 +03:00
%+ (clef %lilt) (fine cof bek)
^- (burg beak (jug mark mark))
2015-12-07 03:46:01 +03:00
|= {cof+cafe bek+beak}
2015-07-08 04:01:17 +03:00
%+ cope (lyle(bek bek) cof)
%- flux
2015-12-07 03:46:01 +03:00
|= mav+(map mark vase)
2015-07-08 04:01:17 +03:00
=+ all=(~(tap by mav))
2015-06-24 01:59:48 +03:00
|- ^- (jug mark mark)
?~ all ~
%- ~(gas ju $(all t.all))
2015-12-07 03:46:01 +03:00
=+ `{for+mark vax+vase}`i.all
2015-06-03 04:05:11 +03:00
~| weg=(jam 3 p.vax)
2014-07-29 02:46:03 +04:00
%+ weld
^- (list {mark mark})
2015-06-03 04:05:11 +03:00
?. (slob %grab p.vax) ~
=+ gab=(slap vax [%cnzy %grab])
2015-12-07 03:46:01 +03:00
:: =+ opt=(skip (sloe p.gap) |=(fro+mark =(fro %noun)))
(turn (sloe p.gab) |=(fro+mark [fro for]))
?. (slob %grow p.vax) ~
2014-07-29 02:46:03 +04:00
=+ gow=(slap vax [%cnzy %grow])
2015-12-13 05:51:23 +03:00
(turn (sloe p.gow) |=(too+mark [for too]))
2014-05-07 21:42:31 +04:00
::
2015-07-08 04:01:17 +03:00
++ lyle :: all mark doors
2015-12-13 05:51:23 +03:00
|= cof+cafe ^- (bolt (map mark vase))
2015-12-07 03:46:01 +03:00
=| {sup+path res+(map mark vase)}
2015-07-08 05:46:30 +03:00
|^ `(bolt (map mark vase))`wide
++ here [bek (welp sup /mar)]
++ wide
%+ cope (lend cof here)
2015-12-07 03:46:01 +03:00
|= {cof+cafe arc+arch}
2015-09-06 04:14:00 +03:00
=+ all=(skim (turn (~(tap by dir.arc)) head) (sane %tas))
2015-07-08 05:46:30 +03:00
=. all (sort all gth) :: short-deepest
|- ^- (bolt (map mark vase))
?~ all (fine cof res)
%+ cope $(all t.all)
2015-12-07 03:46:01 +03:00
|= {cof+cafe res+(map mark vase)}
2015-07-08 05:46:30 +03:00
=. ^res res
=- (cope - (tall i.all))
2015-09-06 04:14:00 +03:00
?. (~(has by dir.arc) %hoon) (flue cof)
2015-07-08 05:46:30 +03:00
node(cof cof)
::
++ tall
2015-12-07 03:46:01 +03:00
|= for+term
|= {cof+cafe new+(unit {mark vase})}
2015-07-08 05:46:30 +03:00
wide(cof cof, sup [for sup], res (~(gas by res) (drop new)))
::
++ node
2015-12-07 03:46:01 +03:00
^- (bolt (unit {mark vase}))
2015-07-08 05:46:30 +03:00
=+ pax=(flop sup)
?~ pax (flue cof)
=+ for=(tack pax)
?: (~(has by res) for) (flue cof)
=+ raf=(lear cof here)
2015-12-07 03:46:01 +03:00
?. ?=($2 -.q.raf)
(cope raf (flux |=(vax+vase (some [for vax]))))
2015-07-28 01:39:36 +03:00
=- ((slog (flop `tang`-)) (flue cof))
2015-08-19 03:12:54 +03:00
=+ (lent t.pax)
?: ?~ - | :: error if level above built
(~(has by res) (tack i.pax (scag (dec -) t.pax)))
~
2015-07-08 04:01:17 +03:00
:_(q.q.raf leaf/"! {<`mark`for>} build failed, ignoring.")
2015-07-08 05:46:30 +03:00
--
2015-07-08 04:01:17 +03:00
::
2014-05-07 21:42:31 +04:00
++ lima :: load at depth
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark bem+beam arg+heel}
2015-02-26 04:20:45 +03:00
%+ (clef %bake) [p=cof q=[%0 p=[bem `~] q=[for bem arg]]]
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark bem+beam arg+heel}
2014-05-07 21:42:31 +04:00
^- (bolt (unit vase))
2015-07-29 03:04:15 +03:00
%+ cope (laze cof bem)
2015-12-07 03:46:01 +03:00
|= {cof+cafe mal+(map mark ?)}
2015-06-03 04:05:11 +03:00
=+ lit=(~(get by mal) for)
?^ lit
2015-07-29 03:04:15 +03:00
(cope (lace cof for bem arg u.lit) (flux some))
2015-06-03 04:05:11 +03:00
=+ opt=(sa (turn (~(tap by mal)) head)) :: XX asymptotics
%+ cope (lion cof for opt)
2015-12-07 03:46:01 +03:00
|= {cof+cafe wuy+(list @tas)}
2015-02-13 00:03:54 +03:00
?~ wuy (flue cof)
2015-07-29 03:04:15 +03:00
%+ cope
(lace cof i.wuy bem arg (~(got by mal) i.wuy))
2015-12-07 03:46:01 +03:00
|= {cof+cafe hoc+vase}
2015-06-04 04:03:35 +03:00
(cope (lope cof i.wuy t.wuy hoc) (flux some))
::
2014-06-07 22:36:31 +04:00
++ lime :: load beam
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark bem+beam arg+heel}
=+ [mob=bem mer=(flop arg)]
2014-05-07 21:42:31 +04:00
|- ^- (bolt vase)
2014-07-11 03:13:42 +04:00
%+ cope (lima cof for mob (flop mer))
2015-12-07 03:46:01 +03:00
|= {cof+cafe vux+(unit vase)}
2014-05-16 00:17:54 +04:00
?^ vux (fine cof u.vux)
2014-07-09 02:46:34 +04:00
?~ s.mob
2015-06-04 04:03:35 +03:00
%+ flaw cof
~[leaf/"build {<for>}" leaf/"no usable ancestors" (smyt (tope bem))]
2014-07-11 03:13:42 +04:00
^$(s.mob t.s.mob, mer [i.s.mob mer])
2014-05-07 21:42:31 +04:00
::
++ link :: translate
2015-12-07 03:46:01 +03:00
|= {cof+cafe too+mark for+mark vax+vase}
2014-05-07 21:42:31 +04:00
^- (bolt vase)
:: %+ cool |.(leaf/"ford: link {<too>} {<for>} {<p.vax>}")
2014-05-16 00:17:54 +04:00
?: =(too for) (fine cof vax)
2014-07-10 04:48:53 +04:00
?: |(=(%noun for) =(%$ for))
2015-03-12 03:37:37 +03:00
((lake too) cof vax)
%+ cope (fang cof for)
2015-12-07 03:46:01 +03:00
|= {cof+cafe pro+vase} ^- (bolt vase)
?: &((slob %grow p.pro) (slob too p:(slap pro [%cnzy %grow])))
2014-07-29 02:46:03 +04:00
%+ cope (keel cof pro [[%& 6]~ vax]~)
|= {cof+cafe pox+vase}
2014-07-29 02:46:03 +04:00
(maim cof pox [%tsgr [%cnzy %grow] [%cnzy too]])
2015-03-12 03:37:37 +03:00
%+ cope (fang cof too)
2015-12-07 03:46:01 +03:00
|= {cof+cafe pro+vase}
2014-07-29 02:46:03 +04:00
=+ ^= zat ^- (unit vase)
?. (slob %grab p.pro) ~
2014-07-29 02:46:03 +04:00
=+ gab=(slap pro [%cnzy %grab])
?. (slob for p.gab) ~
2014-07-29 02:46:03 +04:00
`(slap gab [%cnzy for])
?~ zat
(flaw cof [%leaf "ford: no link: {<[for too]>}"]~)
~| [%link-maul for too]
2014-07-29 02:46:03 +04:00
(maul cof u.zat vax)
2014-05-07 21:42:31 +04:00
::
2014-05-09 04:34:57 +04:00
++ lion :: translation search
2015-12-07 03:46:01 +03:00
|= {cof+cafe too+mark fro+(set mark)}
:: ~& lion/[too=too fro=(sa fro)]
^- (bolt (list mark))
2015-12-14 10:58:14 +03:00
=| $: war+(map mark (list mark))
2015-12-07 03:46:01 +03:00
pax+(list mark)
won+{p+mark q+(qeu mark)}
==
%. [cof fro]
2015-12-07 03:46:01 +03:00
|= {cof+cafe fro+(set mark)} ^- (bolt (list mark))
?: =(too p.won)
(fine cof (flop pax))
2015-06-03 04:05:11 +03:00
=+ for=(skip (~(tap by fro)) ~(has by war))
=. for (sort for aor) :: XX useful?
=: q.won (~(gas to q.won) for)
war (~(gas by war) (turn for |=(mark [+< pax])))
==
?: =(~ q.won)
(flue cof)
=. won ~(get to q.won)
%+ cope (lily cof p.won)
..$(pax [p.won (~(got by war) p.won)])
2014-05-07 21:42:31 +04:00
::
2014-05-16 00:17:54 +04:00
++ lope :: translation pipe
2015-12-07 03:46:01 +03:00
|= {cof+cafe for+mark yaw+(list mark) vax+vase}
2014-05-07 21:42:31 +04:00
^- (bolt vase)
2014-05-16 00:17:54 +04:00
?~ yaw (fine cof vax)
2015-03-12 03:37:37 +03:00
%+ cope (link cof i.yaw for vax)
2015-12-07 03:46:01 +03:00
|= {cof+cafe yed+vase}
2014-07-08 03:17:21 +04:00
^$(cof cof, for i.yaw, yaw t.yaw, vax yed)
2014-05-07 21:42:31 +04:00
::
2015-01-13 04:49:31 +03:00
++ mail :: cached mint
2015-12-07 03:46:01 +03:00
|= {cof+cafe sut+type gen+twig}
2015-01-13 04:49:31 +03:00
^- (bolt (pair type nock))
2015-06-12 00:42:05 +03:00
%+ (clef %slim) (fine cof sut gen)
2015-12-07 03:46:01 +03:00
|= {cof+cafe sut+type gen+twig}
2015-01-13 04:49:31 +03:00
=+ puz=(mule |.((~(mint ut sut) [%noun gen])))
2014-07-19 04:51:22 +04:00
?- -.puz
$| (flaw cof p.puz)
$& (fine cof p.puz)
2014-07-19 04:51:22 +04:00
==
2014-07-09 13:40:49 +04:00
::
2015-01-13 04:49:31 +03:00
++ maim :: slap
2015-12-07 03:46:01 +03:00
|= {cof+cafe vax+vase gen+twig}
2015-01-13 04:49:31 +03:00
^- (bolt vase)
%+ cope (mail cof p.vax gen)
2015-12-07 03:46:01 +03:00
|= {cof+cafe typ+type fol+nock}
2015-04-14 00:29:39 +03:00
%+ (coup cof) (mock [q.vax fol] (mole (slod save)))
2015-12-07 03:46:01 +03:00
|=(val+* `vase`[typ val])
2015-01-13 04:49:31 +03:00
::
2014-05-07 21:42:31 +04:00
++ make :: reduce silk
2015-12-07 03:46:01 +03:00
|= {cof+cafe kas+silk}
2015-07-07 22:51:25 +03:00
:: =+ ^= pre
:: ?+ -.kas -.kas
:: ^ %cell
:: %boil [-.kas p.kas (tope q.kas)]
:: %bake [-.kas p.kas (tope q.kas)]
:: %core [-.kas (tope p.kas)]
:: ==
:: ~& [dyv `term`(cat 3 %make (fil 3 dyv ' ')) pre]
:: =- ~& [dyv `term`(cat 3 %made (fil 3 dyv ' ')) pre] -
:: =. dyv +(dyv)
2015-02-27 09:35:41 +03:00
^- (bolt gage)
2014-05-07 21:42:31 +04:00
?- -.kas
2014-04-30 21:04:07 +04:00
^
2014-05-16 00:17:54 +04:00
%. [cof p.kas q.kas]
2014-05-07 21:42:31 +04:00
;~ cope
;~ coax
2015-12-07 03:46:01 +03:00
|=({cof+cafe p+silk q+silk} (cope ^$(cof cof, kas p.kas) furl))
|=({cof+cafe p+silk q+silk} (cope ^$(cof cof, kas q.kas) furl))
2015-05-26 04:17:59 +03:00
== :: XX merge %tabl
2014-05-07 21:42:31 +04:00
::
2015-12-07 03:46:01 +03:00
|= {cof+cafe bor+cage heg+cage} ^- (bolt gage)
2015-05-26 04:17:59 +03:00
(faun cof (slop q.bor q.heg))
2014-05-07 21:42:31 +04:00
==
2014-04-30 21:04:07 +04:00
::
2015-12-07 03:46:01 +03:00
$$ (fine cof %& p.kas)
$bake
2015-06-06 01:07:40 +03:00
:: ~& > [p.kas (tope q.kas)]
:: %+ cool |.(leaf/"ford: bake {<p.kas>} {<(tope q.kas)>}")
2014-07-09 07:24:40 +04:00
%+ cope (lima cof p.kas q.kas r.kas)
2015-12-07 03:46:01 +03:00
|= {cof+cafe vux+(unit vase)}
2014-05-09 04:34:57 +04:00
?~ vux
2015-06-06 01:07:40 +03:00
(flaw cof leaf/"file not found" (smyt (tope q.kas)) ~)
2015-05-26 04:17:59 +03:00
(fine cof [%& p.kas u.vux])
2014-05-16 00:17:54 +04:00
::
2015-12-07 03:46:01 +03:00
$boil
2015-05-09 03:13:10 +03:00
^- (bolt gage)
2015-06-10 02:35:04 +03:00
%+ cool |.(leaf/"ford: boil {<p.kas>} {<(tope q.kas)>} {<r.kas>}")
2014-08-14 05:32:15 +04:00
%+ cope (lamp cof q.kas)
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam}
2014-08-14 05:32:15 +04:00
%+ cope (lime cof p.kas bem r.kas)
2015-12-07 03:46:01 +03:00
|= {cof+cafe vax+vase}
2015-05-26 04:17:59 +03:00
(fine cof `gage`[%& p.kas vax])
2015-03-11 00:11:48 +03:00
::
2015-12-07 03:46:01 +03:00
$bunt
2015-03-11 00:11:48 +03:00
%+ cool |.(leaf/"ford: bunt {<p.kas>}")
?: ?=(?($hoon $hook) p.kas)
2015-05-26 04:17:59 +03:00
(fine cof %& p.kas [%atom %t] '')
2015-03-12 03:37:37 +03:00
%+ cope (fang cof p.kas)
2015-12-07 03:46:01 +03:00
|= {cof+cafe tux+vase}
2015-09-11 20:54:28 +03:00
=+ [typ=p val=q]:(slot 6 tux)
2015-12-07 03:46:01 +03:00
=. typ ?+(-.typ typ $face q.typ) :: XX vulcanization
2015-09-11 20:54:28 +03:00
(fine cof [%& p.kas [typ val]])
2014-04-30 21:04:07 +04:00
::
2015-12-07 03:46:01 +03:00
$call
2015-01-22 06:31:17 +03:00
:: %+ cool |.(leaf/"ford: call {<`@p`(mug kas)>}")
2014-05-16 00:17:54 +04:00
%. [cof p.kas q.kas]
2014-05-07 21:42:31 +04:00
;~ cope
;~ coax
2015-12-07 03:46:01 +03:00
|=({cof+cafe p+silk q+silk} (cope ^$(cof cof, kas p) furl))
|=({cof+cafe p+silk q+silk} ^$(cof cof, kas q))
2014-05-07 21:42:31 +04:00
==
::
2015-12-07 03:46:01 +03:00
|= {cof+cafe gat+cage sam+gage}
2015-05-26 04:17:59 +03:00
%. [cof sam]
%- tabl-run
2015-12-07 03:46:01 +03:00
|= {cof+cafe sam+cage}
2015-05-26 04:17:59 +03:00
(cope (maul cof q.gat q.sam) faun)
2014-05-07 21:42:31 +04:00
==
2014-04-30 21:04:07 +04:00
::
2015-12-07 03:46:01 +03:00
$cast
2014-07-27 14:26:17 +04:00
%+ cool |.(leaf/"ford: cast {<p.kas>}")
%+ cope $(kas q.kas)
2015-05-26 04:17:59 +03:00
%- tabl-run
2015-12-07 03:46:01 +03:00
|= {cof+cafe cay+cage}
2015-02-27 09:35:41 +03:00
^- (bolt gage)
%+ cool |.(leaf/"ford: casting {<p.cay>} to {<p.kas>}")
2015-06-03 04:05:11 +03:00
%+ cope (lion cof p.kas p.cay `~)
2015-12-07 03:46:01 +03:00
|= {cof+cafe wuy+(list @tas)}
2015-05-29 00:36:19 +03:00
%+ cope
?~ wuy
(link cof p.kas p.cay q.cay)
(lope cof i.wuy t.wuy q.cay)
2015-12-07 03:46:01 +03:00
(flux |=(vax+vase [%& p.kas vax]))
::
2015-12-07 03:46:01 +03:00
$core
%+ cool |.(leaf/"ford: core {<(tope p.kas)>}")
2015-12-13 05:51:23 +03:00
(cope (lear cof p.kas) (flux |=(a+vase [%& %core a])))
2015-02-27 09:35:41 +03:00
::
2015-12-07 03:46:01 +03:00
$diff
2015-02-27 09:35:41 +03:00
%+ cool |.(leaf/"ford: diff {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}")
(diff cof p.kas q.kas)
2014-04-30 21:04:07 +04:00
::
2015-12-07 03:46:01 +03:00
$dude (cool p.kas $(kas q.kas))
$file
%+ cool |.(leaf/"ford: file {<p.kas>}")
2015-07-08 04:01:17 +03:00
%+ cope (liar cof p.kas)
2015-12-07 03:46:01 +03:00
(flux |=(cay+cage [%& cay]))
2015-05-15 21:27:44 +03:00
::
2015-12-07 03:46:01 +03:00
$flag
=+ rez=$(kas q.kas)
2015-12-07 03:46:01 +03:00
?: ?=($1 -.q.rez) rez
=- rez(p.q -)
|- ^- (set beam)
?~ p.kas p.q.rez
=. p.q.rez $(p.kas l.p.kas)
=. p.q.rez $(p.kas r.p.kas)
?^ n.p.kas
(~(put in p.q.rez) n.p.kas)
=+ dap=(~(get by deh.bay) n.p.kas)
?~ dap ~&(flag-missed/n.p.kas p.q.rez)
%- ~(uni in p.q.rez) ^- (set beam)
2015-12-07 03:46:01 +03:00
?-(-.u.dap $init p.u.dap, $sent q.u.dap, $done [[bek ~] ~ ~])
:: XX revisit ^ during dependency review
2015-12-07 03:46:01 +03:00
$join
2015-02-27 09:35:41 +03:00
%+ cool
|.
leaf/"ford: join {<p.kas>} {<`@p`(mug q.kas)>} {<`@p`(mug r.kas)>}"
(join cof p.kas q.kas r.kas)
2015-04-04 04:31:57 +03:00
::
2015-12-07 03:46:01 +03:00
$mash
2015-04-04 04:31:57 +03:00
%+ cool
|.
leaf/"ford: mash {<p.kas>} {<`@p`(mug q.kas)>} {<`@p`(mug r.kas)>}"
(mash cof p.kas q.kas r.kas)
2014-06-14 04:38:51 +04:00
::
2015-12-07 03:46:01 +03:00
$mute (kale cof p.kas q.kas)
$pact
2015-02-27 09:35:41 +03:00
%+ cool |.(leaf/"ford: pact {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}")
(pact cof p.kas q.kas)
::
2015-12-07 03:46:01 +03:00
$plan (cope (abut:(meow p.kas q.kas) cof r.kas) faun)
$reef (faun cof pit)
$ride
%+ cool |.(leaf/"ford: build failed")
2014-07-29 02:46:03 +04:00
%+ cope $(kas q.kas)
2015-05-26 04:17:59 +03:00
%- tabl-run
2015-12-07 03:46:01 +03:00
|= {cof+cafe cay+cage}
2014-07-29 02:46:03 +04:00
%+ cope (maim cof q.cay p.kas)
2015-12-07 03:46:01 +03:00
|= {cof+cafe vax+vase}
2015-05-26 04:17:59 +03:00
(faun cof vax)
2015-02-27 09:35:41 +03:00
::
2015-12-07 03:46:01 +03:00
$tabl
2015-12-13 05:51:23 +03:00
%- cope :_ (flux |=(rex+(list (pair gage gage)) [%tabl rex]))
2015-08-27 21:47:45 +03:00
!.
2015-07-06 22:48:16 +03:00
|- ^- (bolt (list (pair gage gage)))
?~ p.kas (fine cof ~)
%. [cof p.kas]
;~ cope
;~ coax
2015-12-15 01:21:10 +03:00
|=({cof+cafe _p.kas} (fret ^^$(cof cof, kas p.i)))
|=({cof+cafe _p.kas} (fret ^^$(cof cof, kas q.i)))
|=({cof+cafe _p.kas} ^$(cof cof, p.kas t))
2015-07-06 22:48:16 +03:00
==
2015-12-07 03:46:01 +03:00
(flux |=({k+gage v+gage t+(list {gage gage})} [[k v] t]))
2015-07-06 22:48:16 +03:00
==
2014-05-31 16:52:06 +04:00
::
2015-12-07 03:46:01 +03:00
$vale
%+ cool |.(leaf/"ford: vale {<p.kas>} {<`@p`(mug q.kas)>}")
%+ cope (lave cof p.kas q.kas)
2015-12-07 03:46:01 +03:00
(flux |=(vax+vase `gage`[%& p.kas vax]))
2015-03-11 02:56:08 +03:00
::
2015-12-07 20:23:58 +03:00
$volt
%+ cool |.(leaf/"ford: volt {<p.p.kas>}")
%+ cope $(kas [%bunt p.p.kas])
2015-05-26 04:17:59 +03:00
%- tabl-run
2015-12-07 03:46:01 +03:00
|= {cof+cafe cay+cage}
2015-03-11 02:56:08 +03:00
^- (bolt gage)
(fine cof [%& p.p.kas p.q.cay q.p.kas])
2014-04-30 21:04:07 +04:00
==
::
2015-01-13 04:49:31 +03:00
++ malt :: cached slit
2015-12-07 03:46:01 +03:00
|= {cof+cafe gat+type sam+type}
2015-01-13 04:49:31 +03:00
^- (bolt type)
%+ (clef %slit) (fine cof gat sam)
|= {cof+cafe gat+type sam+type}
2015-10-22 01:02:00 +03:00
%+ cool |.(%.(%have ~(dunk ut sam)))
%+ cool |.(%.(%want ~(dunk ut (~(peek ut gat) %free 6))))
2015-01-13 04:49:31 +03:00
=+ top=(mule |.((slit gat sam)))
?- -.top
$| (flaw cof p.top)
$& (fine cof p.top)
2014-05-09 04:34:57 +04:00
==
2014-04-30 21:04:07 +04:00
::
2015-01-13 04:49:31 +03:00
++ maul :: slam
2015-12-07 03:46:01 +03:00
|= {cof+cafe gat+vase sam+vase}
2015-01-13 04:49:31 +03:00
^- (bolt vase)
%+ cope (malt cof p.gat p.sam)
2015-12-07 03:46:01 +03:00
|= {cof+cafe typ+type}
2015-04-14 00:29:39 +03:00
%+ (coup cof) (mong [q.gat q.sam] (mole (slod save)))
2015-12-07 03:46:01 +03:00
|=(val+* `vase`[typ val])
2015-01-13 04:49:31 +03:00
::
2014-07-19 04:51:22 +04:00
++ meow :: assemble
2015-12-07 03:46:01 +03:00
|= {how+beam arg+heel}
2015-12-14 10:58:14 +03:00
=| $: rop+(map term (pair hoof twig)) :: structures
2015-12-07 03:46:01 +03:00
bil+(map term (pair hoof twig)) :: libraries
boy+(list twig) :: body stack
2014-07-19 04:51:22 +04:00
==
~% %meow ..meow
==
%able able
%abut abut
%apex apex
%body body
%chad chad
%chai chai
%chap chap
%head head
%hone hone
%neck neck
%wilt wilt
==
2014-07-19 04:51:22 +04:00
|%
2014-07-27 14:26:17 +04:00
++ able :: assemble preamble
^- twig
:+ %tsgr
2015-12-07 03:46:01 +03:00
?:(=(~ rop) [%$ 1] [%brcn (~(run by rop) |=({^ a+twig} [%ash a]))])
?:(=(~ bil) [%$ 1] [%brcn (~(run by bil) |=({^ a+twig} [%ash a]))])
2014-07-27 14:26:17 +04:00
::
2014-07-19 04:51:22 +04:00
++ abut :: generate
2015-12-07 03:46:01 +03:00
|= {cof+cafe hyd+hood}
^- (bolt vase)
2014-07-19 04:51:22 +04:00
%+ cope (apex cof hyd)
2015-12-15 01:21:10 +03:00
|= {cof+cafe sel+_..abut}
2014-07-26 04:29:01 +04:00
=. ..abut sel
%+ cope (maim cof pit able)
2015-12-07 03:46:01 +03:00
|= {cof+cafe bax+vase}
%+ cope (chap cof bax [%fan fan.hyd])
2015-12-07 03:46:01 +03:00
|= {cof+cafe gox+vase}
2014-07-26 04:29:01 +04:00
%+ cope (maim cof (slop gox bax) [%tssg (flop boy)])
2015-12-07 03:46:01 +03:00
|= {cof+cafe fin+vase}
2014-10-02 23:46:00 +04:00
(fine cof fin)
2014-07-26 04:29:01 +04:00
:: ~> %slog.[0 ~(duck ut p.q.cay)]
2014-07-19 04:51:22 +04:00
::
++ apex :: build to body
2015-12-07 03:46:01 +03:00
|= {cof+cafe hyd+hood}
2015-12-15 01:21:10 +03:00
^- (bolt _..apex)
2014-07-19 04:51:22 +04:00
%+ cope (body cof src.hyd)
2015-12-15 01:21:10 +03:00
|= {cof+cafe sel+_..apex}
2014-07-19 04:51:22 +04:00
=. ..apex sel
%+ cope (neck cof lib.hyd)
2015-12-15 01:21:10 +03:00
|= {cof+cafe sel+_..apex}
2014-07-26 04:29:01 +04:00
=. ..apex sel(boy boy)
%+ cope (head cof sur.hyd)
2015-12-15 01:21:10 +03:00
|= {cof+cafe sel+_..apex}
2014-07-19 04:51:22 +04:00
(fine cof sel)
::
++ body :: produce functions
2015-12-07 03:46:01 +03:00
|= {cof+cafe src+(list hoop)}
2015-12-15 01:21:10 +03:00
^- (bolt _..body)
2014-07-19 04:51:22 +04:00
?~ src (fine cof ..body)
%+ cope (wilt cof i.src)
2015-12-15 01:21:10 +03:00
|= {cof+cafe sel+_..body}
2015-06-03 04:05:11 +03:00
^$(src t.src, ..body sel, cof cof)
2014-07-19 04:51:22 +04:00
::
++ chad :: atomic list
2015-12-07 03:46:01 +03:00
|= {cof+cafe bax+vase doe+term hon+horn}
2014-07-24 03:23:53 +04:00
^- (bolt vase)
2015-07-29 03:04:15 +03:00
%+ cope (lash cof how (flux (slat doe)))
2015-12-07 03:46:01 +03:00
|= {cof+cafe yep+(map span @)}
=+ ^= poy ^- (list (pair span @))
%+ sort (~(tap by yep) ~)
2015-12-07 03:46:01 +03:00
|=({{* a+@} {* b+@}} (lth a b))
%+ cope
2015-12-07 03:46:01 +03:00
|- ^- (bolt (list (pair @ vase)))
2015-02-13 00:03:54 +03:00
?~ poy (flue cof)
%+ cope $(poy t.poy)
2015-12-07 03:46:01 +03:00
|= {cof+cafe nex+(list (pair @ vase))}
%+ cope (chap(s.how [p.i.poy s.how]) cof bax hon)
2015-12-07 03:46:01 +03:00
(flux |=(elt+vase [[q.i.poy elt] nex]))
2015-07-29 03:04:15 +03:00
%- flux
2015-12-07 03:46:01 +03:00
|= yal+(list (pair @ vase)) ^- vase
?~ yal [[%cube 0 [%atom %n]] 0]
(slop (slop [[%atom doe] p.i.yal] q.i.yal) $(yal t.yal))
::
++ chai :: atomic map
2015-12-07 03:46:01 +03:00
|= {cof+cafe bax+vase hon+horn}
^- (bolt vase)
2014-07-24 03:23:53 +04:00
%+ cope
2015-07-31 00:28:42 +03:00
%+ cope (lads cof how ~)
%- some-in-map
2015-12-07 03:46:01 +03:00
|= {cof+cafe dir+span}
2015-07-29 03:04:15 +03:00
=+ nod=(chap(s.how [dir s.how]) cof bax hon)
2015-12-07 03:46:01 +03:00
?: ?=($2 -.q.nod)
2015-07-29 03:04:15 +03:00
(flue cof)
(cope nod (flux some))
%- flux
2015-12-07 03:46:01 +03:00
|= doy+(map @ vase) ^- vase
2014-07-24 03:23:53 +04:00
?~ doy [[%cube 0 [%atom %n]] 0]
%+ slop
2015-02-03 21:41:17 +03:00
(slop [[%atom %ta] p.n.doy] q.n.doy)
2014-07-24 03:23:53 +04:00
(slop $(doy l.doy) $(doy r.doy))
::
++ chap :: produce resources
2015-12-07 03:46:01 +03:00
|= {cof+cafe bax+vase hon+horn}
2014-07-24 03:23:53 +04:00
^- (bolt vase)
?- -.hon
2015-12-07 03:46:01 +03:00
$ape (maim cof bax p.hon)
$arg
%+ cope (maim cof bax p.hon)
2015-12-07 03:46:01 +03:00
|= {cof+cafe gat+vase}
2014-08-02 03:39:15 +04:00
(maul cof gat !>([how arg]))
2014-07-24 03:23:53 +04:00
::
2015-12-07 03:46:01 +03:00
$day (chad cof bax %dr p.hon)
$dub
%+ cope $(hon q.hon)
2015-12-07 03:46:01 +03:00
(flux |=(vax+vase [[%face p.hon p.vax] q.vax]))
::
2015-12-07 03:46:01 +03:00
$fan
%+ cope
|- ^- (bolt (list vase))
2015-02-13 00:03:54 +03:00
?~ p.hon (flue cof)
2015-06-03 04:05:11 +03:00
%+ cope ^$(cof cof, hon i.p.hon)
|= {cof+cafe vax+vase}
%+ cope ^$(cof cof, p.hon t.p.hon)
2015-12-07 03:46:01 +03:00
(flux |=(tev+(list vase) [vax tev]))
|= {cof+cafe tev+(list vase)}
%+ fine cof
|- ^- vase
?~ tev [[%cube 0 [%atom %n]] 0]
(slop i.tev $(tev t.tev))
2014-07-24 03:23:53 +04:00
::
2015-12-07 03:46:01 +03:00
$for $(hon q.hon, s.how (weld (flop p.hon) s.how))
$hel
2015-02-03 21:41:17 +03:00
%= $
hon q.hon
arg (scag p.hon arg)
s.how (weld (slag p.hon arg) s.how)
==
2015-12-07 03:46:01 +03:00
::
$hub (chad cof bax %ud p.hon)
$man
|- ^- (bolt vase)
?~ p.hon (fine cof [[%cube 0 [%atom %n]] 0])
%+ cope $(p.hon l.p.hon)
2015-12-07 03:46:01 +03:00
|= {cof+cafe lef+vase}
%+ cope ^$(cof cof, p.hon r.p.hon)
2015-12-07 03:46:01 +03:00
|= {cof+cafe rig+vase}
%+ cope ^^^$(cof cof, hon q.n.p.hon)
2015-12-07 03:46:01 +03:00
|= {cof+cafe vax+vase}
%+ fine cof
%+ slop
(slop [[%atom %tas] p.n.p.hon] vax)
(slop lef rig)
::
2015-12-07 03:46:01 +03:00
$now (chad cof bax %da p.hon)
$nap (chai cof bax p.hon)
$see
=. r.p.hon ?:(?=({$ud $0} r.p.hon) r.how r.p.hon)
2015-05-02 03:16:57 +03:00
$(hon q.hon, how p.hon)
2015-06-24 01:59:48 +03:00
::
2015-12-07 03:46:01 +03:00
$saw
2014-07-24 03:23:53 +04:00
%+ cope $(hon q.hon)
2015-12-07 20:23:58 +03:00
|= {cof+cafe sam+vase}
2014-07-24 03:23:53 +04:00
%+ cope (maim cof bax p.hon)
2015-12-07 20:23:58 +03:00
|= {cof+cafe gat+vase}
2014-07-24 03:23:53 +04:00
(maul cof gat sam)
::
2015-12-07 03:46:01 +03:00
$sic
2014-07-24 03:23:53 +04:00
%+ cope $(hon q.hon)
2015-12-07 20:23:58 +03:00
|= {cof+cafe vax+vase}
2015-12-14 09:52:13 +03:00
%+ cope (maim cof bax [%cnbc p.hon])
2015-12-07 20:23:58 +03:00
|= {cof+cafe tug+vase}
?. (~(nest ut p.tug) | p.vax)
(flaw cof [%leaf "type error: {<p.hon>} {<q.hon>}"]~)
(fine cof [p.tug q.vax])
::
2015-12-07 03:46:01 +03:00
$toy (cope (cope (make cof %boil p.hon how ~) furl) feel)
2014-07-24 03:23:53 +04:00
==
::
2015-07-31 00:28:42 +03:00
++ chop :: possible subpaths
2015-12-07 03:46:01 +03:00
|= {old+(set beam) hon+horn}
2015-07-31 00:28:42 +03:00
=+ acc=[new=*(set beam) old=old]
|- ^+ acc
?- -.hon
2015-12-07 03:46:01 +03:00
?($ape $arg $toy) acc
?($dub $sic $saw) $(hon q.hon)
?($day $hub $nap $now) acc :: drop to avoid cycles
$for $(hon q.hon, s.how (weld (flop p.hon) s.how))
$see
=. r.p.hon ?:(?=({$ud $0} r.p.hon) r.how r.p.hon)
2015-07-31 00:28:42 +03:00
$(hon q.hon, how p.hon)
::
2015-12-07 03:46:01 +03:00
$hel
2015-07-31 00:28:42 +03:00
=. s.how (weld (slag p.hon arg) s.how)
?: (~(has in old.acc) how) acc
[(~(put in new.acc) how) (~(put in old.acc) how)]
::
2015-12-07 03:46:01 +03:00
$fan
2015-07-31 00:28:42 +03:00
|- ^+ acc
?~ p.hon acc
^$(hon i.p.hon, acc $(p.hon t.p.hon))
::
2015-12-07 03:46:01 +03:00
$man
2015-07-31 00:28:42 +03:00
|- ^+ acc
?~ p.hon acc
=. acc $(p.hon l.p.hon, acc $(p.hon r.p.hon))
^$(hon q.n.p.hon)
==
::
2014-07-29 02:46:03 +04:00
++ head :: consume structures
2015-12-07 03:46:01 +03:00
|= {cof+cafe bir+(list hoof)}
2015-12-15 01:21:10 +03:00
^- (bolt _..head)
?~ bir
2014-07-26 04:29:01 +04:00
(fine cof ..head)
=+ byf=(~(get by rop) p.i.bir)
2014-07-19 04:51:22 +04:00
?^ byf
?. =(`hoof`i.bir `hoof`p.u.byf)
(flaw cof [%leaf "structure mismatch: {<~[p.u.byf i.bir]>}"]~)
2014-07-19 04:51:22 +04:00
$(bir t.bir)
%+ cope (fame cof (hone %sur i.bir))
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam}
2015-07-08 03:05:25 +03:00
%+ cope (fade cof %hoon bem)
2015-12-07 03:46:01 +03:00
|= {cof+cafe hyd+hood}
2015-07-08 03:05:25 +03:00
%+ cope (apex(how bem, boy ~) cof hyd)
2015-12-15 01:21:10 +03:00
|= {cof+cafe sel+_..head}
2014-07-19 04:51:22 +04:00
=. ..head
%= sel
boy boy
2015-07-08 03:05:25 +03:00
how how
rop %+ ~(put by (~(uni by rop) rop.sel))
p.i.bir
[i.bir [%tssg (flop boy.sel)]]
2014-07-19 04:51:22 +04:00
==
2015-07-08 03:05:25 +03:00
^^^$(cof cof, bir t.bir)
2014-07-19 04:51:22 +04:00
::
++ hone :: plant hoof
2015-12-07 03:46:01 +03:00
|= {way+@tas huf+hoof}
2014-07-19 04:51:22 +04:00
^- beam
2014-07-22 05:55:40 +04:00
?~ q.huf
how(s ~[p.huf way])
[[q.u.q.huf q.how p.u.q.huf] ~[p.huf way]]
2014-07-19 04:51:22 +04:00
::
++ neck :: consume libraries
2015-12-07 03:46:01 +03:00
|= {cof+cafe bir+(list hoof)}
2015-12-15 01:21:10 +03:00
^- (bolt _..neck)
2014-07-19 04:51:22 +04:00
?~ bir (fine cof ..neck)
2014-07-22 05:55:40 +04:00
=+ byf=(~(get by bil) p.i.bir)
2014-07-19 04:51:22 +04:00
?^ byf
?. =(`hoof`i.bir `hoof`p.u.byf)
2014-07-22 05:55:40 +04:00
(flaw cof [%leaf "library mismatch: {<~[p.u.byf i.bir]>}"]~)
2014-07-19 04:51:22 +04:00
$(bir t.bir)
2015-07-08 03:05:25 +03:00
%+ cope (fame cof (hone %lib i.bir))
2015-12-07 03:46:01 +03:00
|= {cof+cafe bem+beam}
2015-07-08 03:05:25 +03:00
%+ cope (fade cof %hoon bem)
2015-12-07 03:46:01 +03:00
|= {cof+cafe hyd+hood}
%+ cope (apex(how bem, boy ~) cof hyd)
2015-12-15 01:21:10 +03:00
|= {cof+cafe sel+_..neck}
2014-10-02 23:46:00 +04:00
=. ..neck
2014-07-19 04:51:22 +04:00
%= sel
2015-07-08 03:05:25 +03:00
how how
2014-07-22 05:55:40 +04:00
bil (~(put by bil) p.i.bir [i.bir [%tssg (flop boy.sel)]])
2014-07-19 04:51:22 +04:00
==
2015-07-08 03:05:25 +03:00
^^^$(cof cof, bir t.bir)
2014-07-19 04:51:22 +04:00
::
++ wilt :: process body entry
2015-12-07 03:46:01 +03:00
|= {cof+cafe hop+hoop}
2015-12-15 01:21:10 +03:00
^- (bolt _..wilt)
2014-07-24 03:23:53 +04:00
?- -.hop
$& (fine cof ..wilt(boy [p.hop boy]))
$|
=. r.p.hop ?:(?=({$ud $0} r.p.hop) r.how r.p.hop)
2014-08-04 21:18:26 +04:00
%+ cool |.(leaf/"ford: wilt {<[(tope p.hop)]>}")
2014-07-24 03:23:53 +04:00
%+ cope (lend cof p.hop)
2015-12-07 20:23:58 +03:00
|= {cof+cafe arc+arch}
2015-09-06 04:14:00 +03:00
?: (~(has by dir.arc) %hoon)
2014-08-04 21:18:26 +04:00
%+ cope (fade cof %hoon p.hop)
2015-12-07 20:23:58 +03:00
|= {cof+cafe hyd+hood}
2014-07-24 03:23:53 +04:00
%+ cope (apex(boy ~) cof hyd)
2015-12-15 01:21:10 +03:00
(flux |=(sel+_..wilt sel(boy [[%tssg boy.sel] boy])))
=+ [all=(lark (slat %tas) arc) sel=..wilt]
2014-07-24 03:23:53 +04:00
%+ cope
2015-12-15 01:21:10 +03:00
|- ^- (bolt (pair (map term foot) _..wilt))
?~ all (fine cof ~ ..wilt)
2014-07-24 03:23:53 +04:00
%+ cope $(all l.all)
2015-12-15 01:21:10 +03:00
|= {cof+cafe lef+(map term foot) sel+_..wilt}
%+ cope ^$(all r.all, cof cof, sel sel)
2015-12-15 01:21:10 +03:00
|= {cof+cafe rig+(map term foot) sel+_..wilt}
2014-10-02 23:46:00 +04:00
%+ cope
%= ^^^^$
cof cof
..wilt sel(boy ~)
s.p.hop [p.n.all s.p.hop]
==
2015-12-15 01:21:10 +03:00
|= {cof+cafe sel+_..wilt}
2014-07-24 03:23:53 +04:00
%+ fine cof
[`(map term foot)`[[p.n.all [%ash [%tssg boy.sel]]] lef rig] sel]
2015-12-15 01:21:10 +03:00
|= {cof+cafe mav+(map term foot) sel+_..wilt}
2014-07-24 03:23:53 +04:00
?~ mav
(flaw cof [%leaf "source missing: {<(tope p.hop)>}"]~)
2014-07-24 03:23:53 +04:00
(fine cof sel(boy [[%brcn mav] boy]))
2014-07-19 04:51:22 +04:00
==
--
::
2015-02-27 09:35:41 +03:00
++ pact :: patch
2015-12-07 20:23:58 +03:00
|= {cof+cafe kas+silk kos+silk}
2015-02-27 09:35:41 +03:00
^- (bolt gage)
%. [cof kas kos]
;~ cope
;~ coax
2015-12-07 20:23:58 +03:00
|=({cof+cafe p+silk q+silk} (cope (make cof p) furl))
|=({cof+cafe p+silk q+silk} (cope (make cof q) furl))
2015-02-27 09:35:41 +03:00
==
2015-12-07 20:23:58 +03:00
|= {cof+cafe cay+cage coy+cage} ^- (bolt gage)
?: ?=(?($hoon $hook) p.cay)
2015-12-07 03:46:01 +03:00
?. ?=($txt-diff p.coy)
(flaw cof leaf/"{<p.cay>} mark with bad diff type: {<p.coy>}" ~)
2015-12-07 20:23:58 +03:00
=+ txt=((soft @t) q.q.cay)
?~ txt
(flaw cof leaf/"{<p.cay>} mark on bad data" ~)
=+ dif=((soft (urge cord)) q.q.coy)
?~ dif
2015-04-07 02:20:28 +03:00
=- (flaw cof leaf/"{<p.cay>} data with bad diff" -)
2015-07-06 22:48:16 +03:00
[>type=p.q.coy< >want=p:!>(*(urge cord))< ~]
=+ pac=(role (lurk (lore (cat 3 u.txt '\0a')) u.dif))
2015-05-26 04:17:59 +03:00
(fine cof %& p.cay [%atom %t] (end 3 (dec (met 3 pac)) pac))
2015-07-06 22:48:16 +03:00
::
2015-03-12 03:37:37 +03:00
%+ cope (fang cof p.cay)
2015-12-07 20:23:58 +03:00
|= {cof+cafe pro+vase}
2015-02-27 09:35:41 +03:00
?. (slab %grad p.pro)
(flaw cof leaf/"no ++grad" ~)
=+ gar=(slap pro [%cnzy %grad])
2015-07-08 01:22:32 +03:00
?@ q.gar
=+ for=((sand %tas) q.gar)
?~ for (flaw cof leaf/"bad mark ++grad" ~)
(make cof %cast p.cay %pact [%cast u.for `cay] `coy)
2015-07-08 01:22:32 +03:00
?. (slab %form p.gar)
(flaw cof leaf/"no ++form:grad" ~)
2015-12-07 20:23:58 +03:00
=+ for=((soft @tas) q:(slap gar [%cnzy %form]))
2015-02-27 09:35:41 +03:00
?~ for
(flaw cof leaf/"bad ++form:grad" ~)
?. =(u.for p.coy)
%+ flaw cof :_ ~
=< leaf/"pact on data with wrong form: {-} {+<} {+>}"
[(trip p.cay) (trip u.for) (trip p.coy)]
?. (slab %pact p.gar)
(flaw cof leaf/"no ++pact:grad" ~)
%+ cope (keel cof pro [[%& 6]~ q.cay]~)
2015-12-07 20:23:58 +03:00
|= {cof+cafe pox+vase}
2015-02-27 09:35:41 +03:00
%+ cope
%^ maul cof
(slap (slap pox [%cnzy %grad]) [%cnzy %pact])
q.coy
2015-12-13 05:51:23 +03:00
(flux |=(pat+vase [%& p.cay pat]))
2015-02-27 09:35:41 +03:00
==
::
2014-04-30 21:04:07 +04:00
++ resp
2015-12-07 20:23:58 +03:00
|= {tik+@ud rot+riot}
2014-04-30 21:04:07 +04:00
^+ ..zo
?> (~(has by q.kig) tik)
2015-12-07 20:23:58 +03:00
=+ `{ren+care bem+beam}`(~(got by q.kig) tik)
2014-04-30 21:04:07 +04:00
?~ rot
=^ dep deh.bay (daze ~) :: dependencies?
2015-02-19 00:35:22 +03:00
amok:(expo [%made dep %| (smyt ren (tope bem)) ~])
2015-03-31 01:12:18 +03:00
=+ (cat 3 'c' ren)
exec(q.kig (~(del by q.kig) tik), keg (~(put by keg) [- bem] r.u.rot))
::
++ save
^- sled
2015-12-07 20:23:58 +03:00
|= {(unit (set monk)) tem+term bem+beam}
2015-03-31 01:12:18 +03:00
^- (unit (unit cage))
=+ (~(get by keg) tem bem)
?^ -
``u.-
2015-04-14 00:29:39 +03:00
(ska +<.$)
2014-04-30 21:04:07 +04:00
--
--
2015-01-15 22:25:22 +03:00
::
2014-04-30 21:04:07 +04:00
--
2014-04-23 21:02:36 +04:00
. ==
=| axle
=* lex -
2015-12-07 20:23:58 +03:00
|= {now+@da eny+@ ski+sled} :: activate
2014-04-23 21:02:36 +04:00
^? :: opaque core
~% %ford-d ..is ~
2014-04-23 21:02:36 +04:00
|% ::
2014-06-03 09:07:32 +04:00
++ call :: request
2015-12-07 20:23:58 +03:00
|= {hen+duct hic+(hypo (hobo kiss))}
^+ [p=*(list move) q=..^$]
2015-12-07 03:46:01 +03:00
=> .(q.hic ?.(?=($soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
?: ?=($wegh -.q.hic)
2015-05-07 05:25:41 +03:00
:_ ..^$ :_ ~
:^ hen %give %mass
2015-05-13 00:18:34 +03:00
:- %ford
2015-05-07 05:25:41 +03:00
:- %|
2015-12-07 20:23:58 +03:00
%- |= 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
2015-12-13 05:51:23 +03:00
[%& (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))
2015-12-07 20:23:58 +03:00
|= {@ baby}
:~ =< cache/[%| (turn `(list term)`/hood/bake/lilt/slit/slim/slap/slam .)]
2015-12-13 05:51:23 +03:00
=- |=(a+term [a `(~(get ja dep) a)])
=< `dep+(jar term *)`(~(rep by jav) .)
|=({{* a+{term *}} b+(jar term *)} (~(add ja b) a))
::
=< depends/[%| (turn `(list term)`/init/sent/done .)]
2015-12-13 05:51:23 +03:00
=- |=(a+term [a `(~(get ja dep) a)])
=< `dep+(jar term *)`(~(rep by deh) .)
|=({{@ a+{term *}} b+(jar term *)} (~(add ja b) a))
::
tasks/`[dym tad]
2015-05-07 05:25:41 +03:00
==
2015-07-10 21:49:03 +03:00
=+ our=p.q.hic
2014-05-14 04:04:23 +04:00
=+ ^= bay ^- baby
2014-05-22 21:39:51 +04:00
=+ buy=(~(get by pol.lex) our)
2014-05-14 04:04:23 +04:00
?~(buy *baby u.buy)
=^ mos bay
2015-07-10 21:49:03 +03:00
?- -.q.hic
2015-12-07 20:23:58 +03:00
$wasp
2015-07-10 21:49:03 +03:00
abet:(~(awap za [our hen [now eny ski] ~] bay) q.q.hic)
2015-12-07 20:23:58 +03:00
$exec
2015-07-10 21:49:03 +03:00
?~ q.q.hic
abet:~(apax za [our hen [now eny ski] ~] bay)
=. p.u.q.q.hic -:(norm ski p.u.q.q.hic ~)
abet:(~(apex za [our hen [now eny ski] ~] bay) u.q.q.hic)
==
2014-05-22 21:39:51 +04:00
[mos ..^$(pol (~(put by pol) our bay))]
::
2014-04-23 21:02:36 +04:00
++ doze
2015-12-07 20:23:58 +03:00
|= {now+@da hen+duct}
^- (unit @da)
2014-04-23 21:02:36 +04:00
~
::
2014-07-09 07:00:30 +04:00
++ load :: highly forgiving
2015-12-13 05:51:23 +03:00
|= old+axle
2015-12-10 04:25:07 +03:00
..^$(+>- old)
:: ..^$
2015-02-19 00:35:22 +03:00
::=. old
:: ?. ?=([%0 *] old) old :: remove at 1
:: :- %1
:: |- ^- *
:: ?~ +.old ~
:: ?> ?=([n=[p=* q=[tad=* dym=* deh=* jav=*]] l=* r=*] +.old)
:: :- [p.n.+.old [tad.q.n.+.old dym.q.n.+.old deh.q.n.+.old ~]]
:: [$(+.old l.+.old) $(+.old r.+.old)]
2015-06-12 00:42:05 +03:00
::|= old=*
::=+ lox=((soft axle) old)
::^+ ..^$
::?~ lox
:: ~& %ford-reset
:: ..^$
::..^$(+>- u.lox)
2014-04-23 21:02:36 +04:00
::
++ scry
2015-12-07 20:23:58 +03:00
|= {fur+(unit (set monk)) ren+@tas who+ship syd+desk lot+coin tyl+path}
2015-02-27 09:35:41 +03:00
^- (unit (unit cage))
2015-01-15 06:07:26 +03:00
[~ ~]
2014-04-23 21:02:36 +04:00
::
2014-07-09 07:00:30 +04:00
++ stay :: save w/o cache
2015-12-13 05:51:23 +03:00
`axle`+>-.$(pol (~(run by pol) |=(a+baby [tad.a dym.a deh.a ~])))
2014-07-09 07:00:30 +04:00
::
2014-06-03 09:07:32 +04:00
++ take :: response
2015-12-07 20:23:58 +03:00
|= {tea+wire hen+duct hin+(hypo sign)}
^+ [p=*(list move) q=..^$]
?> ?=({@ @ *} tea)
2015-04-29 03:43:23 +03:00
=+ our=(slav %p i.tea)
2015-01-08 04:49:57 +03:00
=+ bay=(~(got by pol.lex) our)
2014-06-03 09:07:32 +04:00
=^ mos bay
2015-04-29 03:43:23 +03:00
=+ dep=(slaw %uv i.t.tea)
?^ dep
2015-07-10 21:49:03 +03:00
=+ bem=(need (tome t.t.tea))
abet:(~(axun za [our hen [now eny ski] ~] bay) tea u.dep bem q.hin)
?> ?=({@ $~} t.t.tea)
2015-04-29 03:43:23 +03:00
=+ :* num=(slav %ud i.t.tea)
tik=(slav %ud i.t.t.tea)
2015-02-19 00:35:22 +03:00
==
2015-07-10 21:49:03 +03:00
abet:(~(axon za [our hen [now eny ski] ~] bay) num tik q.hin)
2014-06-03 09:07:32 +04:00
[mos ..^$(pol (~(put by pol) our bay))]
2014-04-23 21:02:36 +04:00
--