shrub/main/arvo/ford.hoon

1729 lines
63 KiB
Plaintext
Raw Normal View History

2014-11-01 01:36:01 +03:00
!:::::
2015-04-23 01:55:46 +03:00
:: :: %ford, new execution control
2014-04-23 21:02:36 +04:00
!? 164
::::
2014-10-02 23:46:00 +04:00
|= pit=vase
2014-04-23 21:02:36 +04:00
=> =~
2014-06-03 09:07:32 +04:00
:: structures
|%
2014-07-29 02:46:03 +04:00
::
2015-02-27 09:35:41 +03:00
++ bead ,[p=(set beam) q=gage] :: computed result
2014-06-03 09:07:32 +04:00
++ gift :: out result <-$
$% [%made p=@uvH q=(each gage tang)] :: computed result
2015-04-23 01:55:46 +03:00
[%news ~] :: fresh depends
2014-06-03 09:07:32 +04:00
== ::
2014-07-21 07:15:02 +04:00
++ heel path :: functional ending
++ hock :: standard label
$: [%c p=@ud] :: celsius version
[%k p=@ud] :: kelvin version
[%s p=@ud q=@ud r=@ud] :: semantic version
== ::
2014-07-12 22:24:52 +04:00
++ hood :: assembly plan
$: zus=@ud :: zuse kelvin
2014-08-05 07:23:29 +04:00
sur=(list hoot) :: structures
2014-07-19 04:51:22 +04:00
lib=(list hoof) :: libraries
fan=(list horn) :: resources
2014-07-19 04:51:22 +04:00
src=(list hoop) :: program
== ::
2014-07-22 05:55:40 +04:00
++ hoof (pair term (unit (pair case ship))) :: resource reference
2014-08-05 07:23:29 +04:00
++ hoot (pair bean hoof) :: structure gate/core
2014-07-12 22:24:52 +04:00
++ hoop :: source in hood
2014-07-24 03:23:53 +04:00
$% [%& p=twig] :: direct twig
2014-10-02 23:46:00 +04:00
[%| p=beam] :: resource location
2014-07-12 22:24:52 +04:00
== ::
2014-07-19 04:51:22 +04:00
++ horn :: resource tree
2014-09-24 05:03:20 +04:00
$% [%ape p=twig] :: /~ twig by hand
2014-08-02 03:39:15 +04:00
[%arg p=twig] :: /$ argument
[%day p=horn] :: /| list by @dr
[%dub p=term q=horn] :: /= apply face
[%fan p=(list horn)] :: /. list
[%for p=path q=horn] :: /, descend
[%hel p=@ud q=horn] :: /% propagate heel
[%hub p=horn] :: /@ list by @ud
[%man p=(map span horn)] :: /* hetero map
2015-01-13 01:40:50 +03:00
[%nap p=horn] :: /_ homo map
2014-09-24 05:03:20 +04:00
[%now p=horn] :: /& list by @da
2014-08-02 03:39:15 +04:00
[%saw p=twig q=horn] :: /; operate on
[%see p=beam q=horn] :: /: relative to
[%sic p=tile q=horn] :: /^ cast
[%toy p=mark] :: /mark/ static
2014-07-19 04:51:22 +04:00
== ::
2014-06-03 09:07:32 +04:00
++ kiss :: in request ->$
2015-03-12 03:37:37 +03:00
$% [%exec p=@p q=beak r=(unit silk)] :: make / kill
2015-02-19 00:35:22 +03:00
[%wasp p=@p q=@uvH] :: depends query
2014-06-03 09:07:32 +04:00
== ::
2015-04-14 00:29:39 +03:00
++ milk (trel ship desk silk) :: sourced silk
2014-06-22 09:49:10 +04:00
++ move ,[p=duct q=(mold note gift)] :: local move
2014-06-03 09:07:32 +04:00
++ note :: out request $->
2014-06-22 06:51:12 +04:00
$% $: %c :: to %clay
$% [%warp p=sock q=riff] ::
== == == ::
2014-06-11 18:06:36 +04:00
++ riff ,[p=desk q=(unit rave)] :: see %clay
2014-06-22 09:49:10 +04:00
++ sign :: in result $<-
2014-06-22 06:51:12 +04:00
$% $: %c :: by %clay
$% [%writ p=riot] ::
== == == ::
2014-07-12 22:24:52 +04:00
++ silk :: construction layer
$& [p=silk q=silk] :: cons
$% [%bake p=mark q=beam r=path] :: local synthesis
[%boil p=mark q=beam r=path] :: general synthesis
2015-03-11 00:11:48 +03:00
[%bunt p=mark] :: example of mark
2014-07-12 22:24:52 +04:00
[%call p=silk q=silk] :: slam
2014-07-27 14:26:17 +04:00
[%cast p=mark q=silk] :: translate
2015-02-27 09:35:41 +03:00
[%diff p=silk q=silk] :: diff
[%done p=(set beam) q=gage] :: literal
2014-07-12 22:24:52 +04:00
[%dude p=tank q=silk] :: error wrap
2015-02-27 09:35:41 +03:00
[%dune p=(set beam) q=(unit gage)] :: unit literal
[%file p=beam] :: from clay
2015-02-27 09:35:41 +03:00
[%join p=mark q=silk r=silk] :: merge
2015-04-14 00:29:39 +03:00
[%mash p=mark q=milk r=milk] :: annotate
2014-07-12 22:24:52 +04:00
[%mute p=silk q=(list (pair wing silk))] :: mutant
2015-02-27 09:35:41 +03:00
[%pact p=silk q=silk] :: patch
2014-07-19 04:51:22 +04:00
[%plan p=beam q=spur r=hood] :: structured assembly
2014-07-12 22:24:52 +04:00
[%reef ~] :: kernel reef
2014-07-29 02:46:03 +04:00
[%ride p=twig q=silk] :: silk thru twig
2015-02-27 09:35:41 +03:00
[%tabl p=(list (pair silk silk))] :: list
2014-07-27 14:26:17 +04:00
[%vale p=mark q=ship r=*] :: validate [our his]
2015-03-11 02:56:08 +03:00
[%volt p=(set beam) q=(cask ,*)] :: unsafe add type
2014-07-12 22:24:52 +04:00
== ::
2014-06-03 09:07:32 +04:00
-- ::
2014-04-23 21:02:36 +04:00
|% :: structures
++ axle :: all %ford state
2014-07-09 07:00:30 +04:00
$: %1 :: version for update
2014-05-14 04:04:23 +04:00
pol=(map ship baby) ::
== ::
++ baby :: state by ship
$: tad=[p=@ud q=(map ,@ud task)] :: tasks by number
2014-05-16 04:46:48 +04:00
dym=(map duct ,@ud) :: duct to task number
2015-04-29 03:43:23 +03:00
deh=(map ,@uvH deps) :: depends by hash
2014-05-16 04:46:48 +04:00
jav=(map ,* calx) :: cache
2014-04-23 21:02:36 +04:00
== ::
2014-05-07 21:42:31 +04:00
++ bolt :: gonadic edge
|* a=$+(* *) :: product clam
2014-05-14 04:04:23 +04:00
$: p=cafe :: cache
$= q ::
2014-06-07 22:36:31 +04:00
$% [%0 p=(set beam) q=a] :: depends/product
2015-02-19 00:35:22 +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
|* [a=$+(* *) b=$+(* *)] :: from and to
2014-05-16 00:17:54 +04:00
$+([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
$: p=(set calx) :: used
q=(map ,* calx) :: cache
== ::
:: ::
2014-05-14 21:32:00 +04:00
++ calm :: cache metadata
$: laz=@da :: last accessed
2014-06-07 22:36:31 +04: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-02-27 09:35:41 +03:00
$% [%hood p=calm q=(pair beam gage) r=hood] :: compile
[%bake p=calm q=(trel mark beam heel) r=(unit vase)]:: load
2015-01-13 04:49:31 +03:00
[%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
2014-07-27 14:26:17 +04:00
[%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
$% [%init p=(set beam)] :: given out
[%sent p=(set duct) q=(map beam $?(~ @uv))] :: listener exists
[%done ~] :: change seen
== ::
2014-04-30 21:04:07 +04:00
++ task :: problem in progress
2014-05-14 04:04:23 +04:00
$: nah=duct :: cause
2014-05-10 11:10:46 +04:00
kas=silk :: problem
2015-03-31 01:12:18 +03:00
keg=(map (pair term beam) cage) :: block results
2014-12-10 01:59:31 +03:00
kig=[p=@ud q=(map ,@ud ,[p=care q=beam])] :: blocks
2014-04-23 21:02:36 +04:00
== ::
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
|* sem=* :: a typesystem hack
|= cax=calx
?+ sem !!
2014-07-21 07:15:02 +04:00
%hood ?>(?=(%hood -.cax) r.cax)
%bake ?>(?=(%bake -.cax) r.cax)
2014-05-16 04:46:48 +04:00
%slap ?>(?=(%slap -.cax) r.cax)
%slam ?>(?=(%slam -.cax) r.cax)
2015-01-13 04:49:31 +03:00
%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
|= a=cafe ::
2014-05-14 06:44:44 +04:00
|= [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 ::
2014-05-14 04:04:23 +04:00
|= [a=cafe b=calx] :: cache install
^- cafe ::
a(q (~(put by q.a) [-.b q.b] b)) ::
:: ::
++ chub :: cache merge
|= [a=cafe b=cafe] ::
^- 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-04-29 03:43:23 +03:00
++ faun |=([a=cafe b=vase] (fine a `gage`[%noun b])) :: vase to cage
++ feel |=([a=cafe b=gage] (fine a q.b)) :: cage to vase
2015-02-13 00:03:54 +03:00
++ fest :: bolt to success
|= a=beam ::
2015-02-13 02:06:45 +03:00
|*([b=cafe c=*] (flag a (fine b [~ u=c]))) ::
2014-05-14 04:04:23 +04:00
:: ::
2014-05-16 00:17:54 +04: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-02-13 00:03:54 +03:00
++ flaw |= [a=cafe b=tang] :: bolt from error
[p=a q=[%2 p=*(set beam) q=b]] ::
2015-02-13 02:06:45 +03:00
++ flag :: beam into deps
|* [a=beam b=(bolt)] ::
?: ?=(%1 -.q.b) b
=. p.q.b (~(put in p.q.b) a)
b
2015-02-13 00:03:54 +03:00
:: ::
++ flue |=(a=cafe (fine a ~)) :: cafe to empty
2014-05-14 04:04:23 +04:00
++ grom :: merge sets
|* [one=(set) two=(set)]
^+ 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)]
^+ 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
|= [wox=$+(span (unit ,@)) arc=arch]
^- (map ,@ span)
%- ~(gas by *(map ,@ span))
2014-07-24 03:23:53 +04:00
=| rac=(list (pair ,@ span))
|- ^+ rac
?~ r.arc rac
=. rac $(r.arc l.r.arc, rac $(r.arc r.r.arc))
2014-07-24 03:23:53 +04:00
=+ gib=(wox p.n.r.arc)
?~(gib rac [[u.gib p.n.r.arc] rac])
::
++ slob :: XX belongs in h/h
|= [cog=@tas typ=type]
(~(has in (sa (sloe typ))) cog)
::
2014-04-30 21:04:07 +04:00
++ za :: per event
2014-05-14 04:04:23 +04:00
=| $: $: $: our=ship :: computation owner
2015-03-12 03:37:37 +03:00
bek=beak :: desk context
hen=duct :: event floor
== ::
$: now=@da :: event date
eny=@ :: unique entropy
2015-02-27 09:35:41 +03:00
ska=sled :: system namespace
== ::
mow=(list move) :: pending actions
== ::
2014-05-14 04:04:23 +04:00
bay=baby :: all owned state
== ::
|%
2014-06-03 09:07:32 +04:00
++ abet :: resolve
2014-05-14 04:04:23 +04:00
^- [(list move) baby]
[(flop mow) bay]
2015-04-29 03:43:23 +03:00
::x
2014-06-03 09:07:32 +04:00
++ apex :: call
|= kus=(unit silk)
2014-06-03 09:07:32 +04:00
^+ +>
?~ kus
2014-08-06 02:30:08 +04:00
=+ nym=(~(get by dym.bay) hen)
?~ nym :: XX should never
~& [%ford-mystery hen]
+>.$
=+ tas=(need (~(get by q.tad.bay) u.nym))
amok:~(camo zo [u.nym tas])
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-03-31 01:12:18 +03:00
~(exec zo [num `task`[hen u.kus ~ 0 ~]])
2014-06-03 09:07:32 +04:00
::
++ axon :: take
2014-06-22 09:49:10 +04:00
|= [num=@ud tik=@ud sih=sign]
2014-06-03 09:07:32 +04:00
^+ +>
2014-06-22 06:51:12 +04:00
?- -.+.sih
2014-06-03 09:07:32 +04:00
%writ
=+ 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-04-29 03:43:23 +03:00
|= [tea=wire dep=@uvH sih=sign]
2015-02-19 00:35:22 +03:00
^+ +>
?- -.+.sih
%writ
2015-04-29 03:43:23 +03:00
?~ p.sih +>.$
=+ ark=;;(arch |2.r.u.p.sih)
=+ [dap=(~(got by deh.bay) dep) bem=`beam`[bek q.u.p.sih] new=p.ark]
~& got-writ/[new bem dap]
=- ?~(dop con con(deh.bay (~(put by deh.bay) dep dop)))
^- [dop=$|(~ _dap) con=_+>.$]
?- -.dap
%done
~&(%writ-redundant `+>.$)
%init ~|(never-subscribed/dep !!)
%sent
=+ old=(~(got by q.dap) bem)
?: |(=(old new) =(old ~))
:- dap(q (~(put by q.dap) bem new))
=. r.bem q.p.u.p.sih
?> ?=(%ud -.r.bem)
=- +>.$(mow :_(mow [hen %pass tea noe]))
^- noe=note
[%c [%warp [our p.bem] q.bem ~ [%sing %y ud/+(p.r.bem) s.bem]]]
=- [[%done ~] +>.$(mow (weld - mow))]
^- (list move)
%+ weld (turn (~(tap in p.dap)) |=(hen=duct [hen %give %news ~]))
%+ turn (~(tap by q.dap)) :: cancel outstanding
|= [bem=beam @]
=. tea [(scot %p our) (scot %uv dep) (tope bem)]
[hen %pass tea %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-02-19 00:35:22 +03:00
|= dep=@uvH
2015-04-28 23:02:32 +03:00
?~ dep
~&(dep-empty/hen +>.$)
2015-04-29 03:43:23 +03:00
=+ dap=~|(dep-missed/dep (~(got by deh.bay) dep))
?- -.dap
%done +>.$(mow :_(mow [hen %give %news ~]))
%sent
=. p.dap (~(put in p.dap) hen)
+>.$(deh.bay (~(put by deh.bay) dep dap))
%init
%_ +>.$
deh.bay
=+ (turn (~(tap in p.dap)) |=(a=beam [a ~]))
(~(put by deh.bay) dep [%sent [hen ~ ~] (mo `(list ,[beam ~])`-)])
::
mow
=< (welp :_(mow (turn (~(tap in p.dap)) .)))
|= bem=beam
:^ hen %pass [(scot %p our) (scot %uv dep) (tope bem)]
=- [%c [%warp [our p.bem] q.bem ~ [%sing %y ud/- s.bem]]]
?. ?=(%ud -.r.bem)
;;(@ q.q:(need (need (ska ~ %cw -.bem /))))
?: =(0 p.r.bem)
;;(@ q.q:(need (need (ska ~ %cw -.bem(r da/now) /))))
p.r.bem
== ==
2015-02-19 00:35:22 +03:00
::
2014-04-30 21:04:07 +04:00
++ zo
~% %ford-z
..is
==
%fade fade
%fair fair
%fang fang
%lime lime
%lima lima
%link link
%lope lope
%make make
%meow meow
==
2014-04-30 21:04:07 +04: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
^+ .
2014-12-10 01:59:31 +03:00
=+ 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
[(scot %p our) (scot %ud num) (scot %ud p.i.kiz) (tope bek ~)]
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
2014-06-07 22:36:31 +04: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
[(scot %p our) (scot %ud num) (scot %ud p.kig) (tope bek ~)]
2014-06-21 22:42:34 +04:00
%c
2015-04-17 03:22:39 +03:00
~& >> [%camping 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
2014-05-14 23:38:37 +04:00
|* sem=*
2014-05-14 21:32:00 +04:00
|* [hoc=(bolt) fun=(burg)]
?- -.q.hoc
%2 hoc
%1 hoc
%0
=^ cux p.hoc ((calk p.hoc) sem q.q.hoc)
?^ cux
[p=p.hoc q=[%0 p=p.q.hoc q=((calf sem) u.cux)]]
=+ nuf=(cope hoc fun)
?- -.q.nuf
%2 nuf
%1 nuf
%0
:- 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
==
::
2014-05-07 21:42:31 +04:00
++ coax :: bolt across
|* [hoc=(bolt) fun=(burg)]
2014-05-14 04:04:23 +04:00
?- -.q.hoc
2014-05-16 00:17:54 +04:00
%0 =+ nuf=$:fun(..+<- p.hoc)
:- p=p.nuf
2014-05-14 04:04:23 +04:00
^= q
?- -.q.nuf
%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
==
2014-05-16 00:17:54 +04:00
%1 =+ nuf=$:fun(..+<- p.hoc)
:- p=p.nuf
2014-05-14 04:04:23 +04:00
^= q
?- -.q.nuf
%0 q.hoc
%1 [%1 p=(grom p.q.nuf p.q.hoc)]
%2 q.nuf
2014-05-07 21:42:31 +04:00
==
%2 hoc
==
::
2014-07-08 03:17:21 +04:00
++ cool :: error caption
|* [cyt=trap hoc=(bolt)]
?. ?=(%2 -.q.hoc) hoc
2015-02-12 00:10:07 +03:00
[p.hoc [%2 p.q.hoc *cyt q.q.hoc]]
::
2014-05-07 21:42:31 +04:00
++ cope :: bolt along
|* [hoc=(bolt) fun=(burg)]
2014-05-14 04:04:23 +04:00
?- -.q.hoc
2014-05-07 21:42:31 +04:00
%1 hoc
2015-02-13 02:06:45 +03:00
%2 hoc
2014-05-16 00:17:54 +04:00
%0 =+ nuf=(fun p.hoc q.q.hoc)
:- p=p.nuf
2014-05-14 04:04:23 +04:00
^= q
?- -.q.nuf
%1 q.nuf
2015-02-13 02:06:45 +03:00
%2 [%2 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
2014-05-14 04:04:23 +04:00
%0 [%0 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
== ==
2014-05-07 21:42:31 +04:00
::
++ coup :: toon to bolt
2014-05-16 00:17:54 +04:00
|= cof=cafe
|* [ton=toon fun=$+(* *)]
:- p=cof
2014-05-14 04:04:23 +04:00
^= q
2014-05-07 21:42:31 +04:00
?- -.ton
2015-02-12 00:10:07 +03:00
%2 [%2 p=*(set beam) q=p.ton]
2014-06-07 22:36:31 +04:00
%0 [%0 p=*(set beam) q=(fun p.ton)]
2014-12-10 01:59:31 +03:00
%1 :: ~& [%coup-need ((list path) p.ton)]
2014-10-02 22:53:53 +04:00
=- ?- -.faw
2014-12-10 01:59:31 +03:00
& :- %1
^= p
%- sa
%+ turn p.faw
2015-02-12 00:10:07 +03:00
|=(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-02-12 00:10:07 +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")
2014-12-10 01:59:31 +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
2014-12-10 01:59:31 +03:00
& [%& [u.ren u.zis] p.nex]
2014-05-07 21:42:31 +04:00
| nex
==
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
|= cof=cafe
2015-02-12 00:10:07 +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]
==
fun
::
2014-05-16 04:46:48 +04:00
++ dash :: process cache
|= cof=cafe
^+ +>
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
|= [cof=cafe kas=silk kos=silk]
^- (bolt gage)
%. [cof kas kos]
;~ cope
;~ coax
|=([cof=cafe p=silk q=silk] (make cof p))
|=([cof=cafe p=silk q=silk] (make cof q))
==
|= [cof=cafe cay=gage coy=gage]
?. &(?=(@ p.cay) ?=(@ p.coy))
(flaw cof leaf/"bad diff marc" ~)
?. =(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)
(fine cof %null [%atom %n] ~)
2015-03-12 03:37:37 +03:00
%+ cope (fang cof p.cay)
2015-02-27 09:35:41 +03:00
|= [cof=cafe pro=vase]
?. (slab %grad p.pro)
(flaw cof leaf/"no ++grad" ~)
=+ gar=(slap pro [%cnzy %grad])
?. (slab %form p.gar)
?. (slab %sted p.gar)
(flaw cof leaf/"no ++form:grad nor ++sted:grad" ~)
=+ for=((soft ,@tas) q:(slap gar [%cnzy %sted]))
?~ for
(flaw cof leaf/"bad ++sted:grad" ~)
%^ make cof %diff
:- [%cast u.for [%done ~ cay]]
[%cast u.for [%done ~ coy]]
?. (slab %diff p.gar)
(flaw cof leaf/"no ++diff:grad" ~)
%+ cope (keel cof pro [[%& 6]~ q.cay]~)
|= [cof=cafe pox=vase]
%+ cope
%^ maul cof
(slap (slap pox [%cnzy %grad]) [%cnzy %diff])
q.coy
|= [cof=cafe dif=vase]
=+ for=((soft ,@tas) q:(slap gar [%cnzy %form]))
?~ for
(flaw cof leaf/"bad ++form:grad" ~)
(fine cof u.for dif)
==
::
2015-02-19 00:35:22 +03:00
++ daze :: remember depends
|= dep=(set beam)
2015-02-19 02:15:27 +03:00
^+ [*@uvH deh.bay]
?~ 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-02-19 02:15:27 +03:00
%0 =^ dep deh.bay (daze p.q.bot)
2015-02-19 00:35:22 +03:00
amok:(expo [%made dep %& q.q.bot])
2015-02-19 02:15:27 +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])
2014-05-14 04:04:23 +04:00
%1 =+ zuk=(~(tap by p.q.bot) ~)
2014-05-09 04:34:57 +04:00
=< abet
|- ^+ ..exec
?~ zuk ..exec
2014-12-10 01:59:31 +03:00
=+ foo=`_..exec`(camp p.i.zuk q.i.zuk)
2014-05-09 04:34:57 +04:00
$(zuk t.zuk, ..exec foo)
==
2014-05-07 21:42:31 +04:00
::
2014-06-03 09:07:32 +04:00
++ expo :: return gift
|= gef=gift
%_(+> mow :_(mow [hen %give gef]))
2014-05-09 04:34:57 +04:00
::
++ fade :: compile to hood
2014-08-04 21:18:26 +04:00
|= [cof=cafe for=mark bem=beam]
^- (bolt hood)
2014-07-29 02:46:03 +04:00
%+ cool |.(leaf/"ford: fade {<[(tope bem)]>}")
2014-08-04 21:18:26 +04:00
%+ cope (make cof [%bake for bem ~])
2015-02-27 09:35:41 +03:00
|= [cof=cafe cay=gage]
2014-08-14 05:32:15 +04:00
%+ (clef %hood) (fine cof bem cay)
2015-02-27 09:35:41 +03:00
^- (burg (pair beam gage) hood)
|= [cof=cafe bum=beam cay=gage]
:: ~& fade/clef-miss/bem
2014-07-27 14:26:17 +04:00
=+ rul=(fair bem)
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)
::
2014-07-29 02:46:03 +04:00
++ fang :: protocol door
2015-03-12 03:37:37 +03:00
|= [cof=cafe for=mark]
2014-07-29 02:46:03 +04:00
^- (bolt vase)
2014-08-05 07:23:29 +04:00
=+ pax=/door/[for]/mar
2015-03-12 03:37:37 +03:00
(cope (fade cof %hook [bek pax]) abut:(meow [bek pax] ~))
2014-07-29 02:46:03 +04:00
::
2014-07-19 04:51:22 +04:00
++ fair :: hood parsing rule
2014-07-27 14:26:17 +04:00
|= bem=beam
2014-08-04 21:18:26 +04:00
=+ :* vez=(vang | (tope bem(r [%ud 0])))
voz=(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
|= a=coin
?. ?=([%$ ?(%da %ud %tas) *] a) ~
[~ u=(^case a)]
::
++ hath (sear plex:voz (stag %clsg poor:voz)) :: 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
2014-08-05 07:23:29 +04:00
(ifix [;~(plug fas hep gap) gap] (most ;~(plug com gaw) hoot))
(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
%+ 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
==
::
2014-08-05 07:23:29 +04:00
++ hoot
2014-08-02 03:39:15 +04:00
;~ pose
(stag %| ;~(pfix tar hoof))
(stag %& hoof)
==
::
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
=| 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
|* [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))
|= fan=(list ^horn)
=| naf=(list (pair term ^horn))
|- ^- (unit (map term ^horn))
?~ fan (some (~(gas by *(map term ^horn)) naf))
?. ?=(%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
;~(plug ;~(sfix toil:vez ket) apex(tol |))
;~(pfix gap ;~(plug howl:vez ;~(pfix gap apex)))
--
::
--
2014-07-19 04:51:22 +04:00
--
::
2015-02-27 09:35:41 +03:00
++ join
|= [cof=cafe for=mark kas=silk kos=silk]
^- (bolt gage)
%. [cof kas kos]
;~ cope
;~ coax
|=([cof=cafe p=silk q=silk] (make cof p))
|=([cof=cafe p=silk q=silk] (make cof q))
==
|= [cof=cafe cay=gage coy=gage]
?. &(?=(@ p.cay) ?=(@ p.coy))
(flaw cof leaf/"bad join marc: {<p.cay>} {<p.coy>}" ~)
2015-03-12 03:37:37 +03:00
%+ cope (fang cof for)
2015-02-27 09:35:41 +03:00
|= [cof=cafe pro=vase]
?. (slab %grad p.pro)
(flaw cof leaf/"no ++grad" ~)
=+ gar=(slap pro [%cnzy %grad])
?. (slab %form p.gar)
?. (slab %sted p.gar)
(flaw cof leaf/"no ++form:grad nor ++sted:grad" ~)
=+ too=((soft ,@tas) q:(slap gar [%cnzy %sted]))
?~ too
(flaw cof leaf/"bad ++sted:grad" ~)
(make cof %join u.too [%done ~ cay] [%done ~ coy])
=+ fom=((soft ,@tas) q:(slap gar [%cnzy %form]))
?~ 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)
(fine cof cay)
?. (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)
|= [cof=cafe dif=vase]
?@ q.dif
(fine cof %null dif)
(fine cof u.fom (slot 3 dif))
==
::
2015-04-04 04:31:57 +03:00
++ mash
2015-04-14 00:29:39 +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
|=([cof=cafe p=silk q=silk] (make cof p))
|=([cof=cafe p=silk q=silk] (make cof q))
==
|= [cof=cafe cay=gage coy=gage]
?. &(?=(@ p.cay) ?=(@ p.coy))
(flaw cof leaf/"bad mash marc: {<p.cay>} {<p.coy>}" ~)
%+ cope (fang cof for)
|= [cof=cafe pro=vase]
?. (slab %grad p.pro)
(flaw cof leaf/"no ++grad" ~)
=+ gar=(slap pro [%cnzy %grad])
?. (slab %form p.gar)
?. (slab %sted p.gar)
(flaw cof leaf/"no ++form:grad nor ++sted:grad" ~)
=+ too=((soft ,@tas) q:(slap gar [%cnzy %sted]))
?~ too
(flaw cof leaf/"bad ++sted:grad" ~)
2015-04-14 00:29:39 +03:00
%+ make cof
[%mash u.too [p.mas q.mas [%done ~ cay]] [p.mos q.mos [%done ~ coy]]]
2015-04-04 04:31:57 +03:00
=+ fom=((soft ,@tas) q:(slap gar [%cnzy %form]))
?~ 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)
(fine cof cay)
?. (slab %mash p.gar)
(fine cof %null [%atom %n] ~)
%+ cope
%^ maul cof
(slap (slap pro [%cnzy %grad]) [%cnzy %mash])
2015-04-14 00:29:39 +03:00
;: slop
(slop [[%atom %p] p.mas] [[%atom %tas] q.mas])
(slop [[%atom %p] p.mos] [[%atom %tas] q.mos])
q.cay
q.coy
==
2015-04-04 04:31:57 +03:00
|= [cof=cafe dif=vase]
(fine cof u.fom dif)
==
::
2014-05-31 16:52:06 +04:00
++ kale :: mutate
|= [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)
2014-05-31 16:52:06 +04:00
%+ cope (make cof q.i.muy)
2015-02-27 09:35:41 +03:00
|= [cof=cafe cay=gage]
2014-05-31 16:52:06 +04:00
%+ cope ^$(muy t.muy)
|= [cof=cafe rex=(list (pair wing vase))]
(fine cof [[p.i.muy q.cay] rex])
|= [cof=cafe yom=(list (pair wing vase))]
%+ cope (make cof kas)
2015-02-27 09:35:41 +03:00
|= [cof=cafe cay=gage]
%+ cope (keel cof q.cay yom)
2014-05-31 16:52:06 +04:00
|= [cof=cafe vax=vase]
(fine cof p.cay vax)
::
++ keel :: apply mutations
|= [cof=cafe suh=vase yom=(list (pair wing vase))]
^- (bolt vase)
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))
::
2014-05-07 21:42:31 +04:00
++ lace :: load and check
|= [cof=cafe for=mark bem=beam arg=heel]
2014-05-09 04:34:57 +04:00
^- (bolt (unit vase))
2014-05-16 00:17:54 +04:00
%+ cope (lend cof bem)
|= [cof=cafe arc=arch]
2014-05-07 21:42:31 +04:00
?^ q.arc
(cope (cope (liar cof bem) (lake for)) (fest (norm bem)))
2014-08-04 21:18:26 +04:00
?: (~(has by r.arc) %hook)
%+ cope (fade cof %hook bem)
|= [cof=cafe hyd=hood]
%+ cope (cope (abut:(meow bem arg) cof hyd) (lake for))
2015-02-14 06:43:17 +03:00
(fest (norm bem))
2015-02-13 00:03:54 +03:00
(flue cof)
2014-05-07 21:42:31 +04:00
::
++ lake :: check/coerce
2015-03-12 03:37:37 +03:00
|= for=mark
2014-05-16 00:17:54 +04:00
|= [cof=cafe sam=vase]
2014-07-27 14:26:17 +04:00
^- (bolt vase)
%+ cool |.(leaf/"ford: check {<[for bek `@p`(mug q.sam)]>}")
?: ?=(?(%gate %core %door) for)
2014-07-27 14:26:17 +04:00
:: ~& [%lake-easy for bek]
(fine cof sam)
?: ?=(?(%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)
2014-07-29 02:46:03 +04:00
|= [cof=cafe tux=vase]
=+ bob=(slot 6 tux)
?: (~(nest ut p.bob) | p.sam)
2014-07-27 14:26:17 +04:00
(fine cof 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])
2014-05-16 00:17:54 +04:00
|= [cof=cafe pro=vase]
2014-10-08 23:06:40 +04:00
?> (~(nest ut p.bob) | p.pro)
?: =(q.pro q.sam)
(fine cof p.bob 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
|= [cof=cafe bem=beam]
^- (bolt beam)
2015-01-08 23:50:31 +03:00
?: ?=(%ud -.r.bem) (fine cof bem)
2015-04-14 00:29:39 +03:00
=+ von=(save ~ %cw bem(s ~))
2014-12-10 01:59:31 +03:00
?~ von [p=cof q=[%1 [%w bem ~] ~ ~]]
2015-02-27 09:35:41 +03:00
(fine cof bem(r [%ud ((hard ,@) +.+:(need u.von))]))
2014-08-14 05:32:15 +04:00
::
2014-06-26 16:18:30 +04:00
++ lave :: validate
2014-07-27 14:26:17 +04:00
|= [cof=cafe for=mark his=ship 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
2014-05-16 00:17:54 +04:00
|= [cof=cafe typ=type gen=twig]
2014-07-26 04:29:01 +04:00
%+ (cowl cof) (mule |.((~(play ut typ) gen)))
2014-05-07 21:42:31 +04:00
|=(ref=type ref)
::
2014-07-24 03:23:53 +04:00
++ lash :: atomic sequence
|= wox=$+(span (unit ,@))
|= [cof=cafe bem=beam]
^- (bolt (map ,@ span))
%+ cope (lend cof bem)
|= [cof=cafe arc=arch]
(fine cof (lark wox arc))
::
++ lear :: load vase
|= [cof=cafe bem=beam]
^- (bolt cage)
2015-04-14 00:29:39 +03:00
=+ von=(save ~ %cx bem)
?~ von
[p=*cafe q=[%1 [[%x bem ~] ~ ~]]]
?~ u.von
(flaw cof leaf/"lear: file unavailable" (smyt (tope bem)) ~)
(fine cof u.u.von)
::
2014-05-07 21:42:31 +04:00
++ lend :: load arch
2014-06-07 22:36:31 +04: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 ~] ~ ~]]
2015-02-27 09:35:41 +03:00
(fine cof ((hard arch) q.q:(need u.von)))
2014-05-07 21:42:31 +04:00
::
++ liar :: load vase
2014-06-07 22:36:31 +04:00
|= [cof=cafe bem=beam]
^- (bolt vase)
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
(flaw cof leaf/"liar: file unavailable" (smyt (tope bem)) ~)
2015-02-27 09:35:41 +03:00
(fine cof q.u.u.von)
2014-05-07 21:42:31 +04:00
::
++ lily :: translation targets
2015-03-12 03:37:37 +03:00
|= [cof=cafe for=mark]
2014-05-07 21:42:31 +04:00
^- (bolt (list ,@tas))
2015-03-12 03:37:37 +03:00
=+ raf=(fang cof for)
?: =(%2 -.q.raf) (fine p.raf ~)
%+ cope raf
2014-07-29 02:46:03 +04:00
|= [cof=cafe vax=vase]
%+ fine cof
%+ weld
^- (list ,@tas)
?. (slob %garb p.vax) ~
2014-07-29 02:46:03 +04:00
=+ gav=((soft (list ,@tas)) q:(slap vax [%cnzy %garb]))
?~(gav ~ u.gav)
?. (slob %grow p.vax) ~
2014-07-29 02:46:03 +04:00
=+ gow=(slap vax [%cnzy %grow])
(sloe p.gow)
2014-05-07 21:42:31 +04:00
::
++ lima :: load at depth
|= [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]]]
|= [cof=cafe for=mark bem=beam arg=heel]
2014-05-07 21:42:31 +04:00
^- (bolt (unit vase))
2014-05-16 00:17:54 +04:00
%+ cope (lend cof bem)
|= [cof=cafe arc=arch]
2014-05-09 04:34:57 +04:00
^- (bolt (unit vase))
2014-05-07 21:42:31 +04:00
?: (~(has by r.arc) for)
(lace cof for bem(s [for s.bem]) arg)
2014-07-09 02:46:34 +04:00
=+ haz=(turn (~(tap by r.arc) ~) |=([a=@tas b=~] a))
2015-02-13 00:03:54 +03:00
?~ haz (flue cof)
2015-03-12 03:37:37 +03:00
%+ cope (lion cof for haz)
2015-02-13 02:06:45 +03:00
|= [cof=cafe wuy=(list ,@tas)]
2015-02-13 00:03:54 +03:00
?~ wuy (flue cof)
%+ cope (make cof %bake i.wuy bem arg)
2015-02-27 09:35:41 +03:00
|= [cof=cafe hoc=gage]
%+ cope (lope cof i.wuy t.wuy q.hoc)
2014-05-16 00:17:54 +04:00
|= [cof=cafe vax=vase]
2015-02-13 00:03:54 +03:00
((fest bem) cof vax)
2014-05-07 21:42:31 +04:00
::
2014-06-07 22:36:31 +04:00
++ lime :: load beam
|= [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))
2014-05-16 00:17:54 +04:00
|= [cof=cafe vux=(unit vase)]
?^ vux (fine cof u.vux)
2014-07-09 02:46:34 +04:00
?~ s.mob
%+ flag
(norm mob)
2015-02-27 09:35:41 +03:00
(flaw cof leaf/"beam unavailable" (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-03-12 03:37:37 +03:00
|= [cof=cafe too=mark for=mark vax=vase]
2014-05-07 21:42:31 +04:00
^- (bolt vase)
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)
2014-07-29 02:46:03 +04:00
|= [cof=cafe pro=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]
(maim cof pox [%tsgr [%cnzy %grow] [%cnzy too]])
2015-03-12 03:37:37 +03:00
%+ cope (fang cof too)
2014-07-29 02:46:03 +04:00
|= [cof=cafe pro=vase]
=+ ^= 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]>}"]~)
(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-03-12 03:37:37 +03:00
|= [cof=cafe too=@tas fro=(list ,@tas)]
2015-02-13 02:06:45 +03:00
^- (bolt (list ,@tas))
2014-05-07 21:42:31 +04:00
=| war=(set ,@tas)
2014-05-16 00:17:54 +04:00
=< -:(apex (fine cof fro))
2014-07-12 22:24:52 +04:00
|%
2014-05-07 21:42:31 +04:00
++ apex
|= rof=(bolt (list ,@tas))
2015-02-13 02:06:45 +03:00
^- [(bolt (list ,@tas)) _+>]
2014-05-14 04:04:23 +04:00
?. ?=(%0 -.q.rof) [rof +>.$]
?~ q.q.rof
[[p.rof [%0 p.q.rof ~]] +>.$]
2014-12-10 08:06:30 +03:00
=^ orf +>.$ (apse p.rof i.q.q.rof)
2014-05-14 04:04:23 +04:00
?. ?=(%0 -.q.orf)
2014-05-16 00:17:54 +04:00
[orf +>.$]
2014-05-14 04:04:23 +04:00
?~ q.q.orf
2014-12-10 08:06:30 +03:00
$(p.rof p.orf, q.q.rof t.q.q.rof)
2014-05-16 00:17:54 +04:00
[[p.orf [%0 (grom p.q.rof p.q.orf) q.q.orf]] +>.$]
2014-04-30 21:04:07 +04:00
::
2014-05-07 21:42:31 +04:00
++ apse
2014-05-16 00:17:54 +04:00
|= [cof=cafe for=@tas]
2015-02-13 02:06:45 +03:00
^- [(bolt (list ,@tas)) _+>]
?: =(for too)
2015-02-13 02:06:45 +03:00
[(fine cof [too ~]) +>.$]
2015-02-13 00:03:54 +03:00
?: (~(has in war) for) [(flue cof) +>]
2014-05-07 21:42:31 +04:00
=. war (~(put in war) for)
2015-03-12 03:37:37 +03:00
=^ hoc +>.$ (apex (lily cof for))
2014-05-07 21:42:31 +04:00
:_ +>.$
2014-05-16 00:17:54 +04:00
%+ cope hoc
2015-02-13 02:06:45 +03:00
|= [cof=cafe ked=(list ,@tas)]
(fine cof ?~(ked ~ [for ked]))
2014-05-07 21:42:31 +04:00
--
::
2014-05-16 00:17:54 +04:00
++ lope :: translation pipe
2015-03-12 03:37:37 +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)
2014-05-16 00:17:54 +04: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
|= [cof=cafe sut=type gen=twig]
^- (bolt (pair type nock))
%+ (clef %slim) (fine cof sut gen)
|= [cof=cafe sut=type gen=twig]
=+ puz=(mule |.((~(mint ut sut) [%noun gen])))
2014-07-19 04:51:22 +04:00
?- -.puz
2014-11-06 01:40:18 +03:00
| (flaw cof p.puz)
2015-01-13 04:49:31 +03:00
& (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
|= [cof=cafe vax=vase gen=twig]
^- (bolt vase)
%+ cope (mail cof p.vax gen)
|= [cof=cafe typ=type fol=nock]
2015-04-14 00:29:39 +03:00
%+ (coup cof) (mock [q.vax fol] (mole (slod save)))
2015-01-13 04:49:31 +03:00
|=(val=* `vase`[typ val])
::
2014-05-07 21:42:31 +04:00
++ make :: reduce silk
2014-05-16 00:17:54 +04:00
|= [cof=cafe kas=silk]
2015-02-27 09:35:41 +03:00
^- (bolt gage)
:: ~& [%make (,@tas -.kas)]
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
2014-05-16 00:17:54 +04:00
|=([cof=cafe p=silk q=silk] ^$(cof cof, kas p.kas))
|=([cof=cafe p=silk q=silk] ^$(cof cof, kas q.kas))
2014-05-07 21:42:31 +04:00
==
::
2015-02-27 09:35:41 +03:00
|= [cof=cafe bor=gage heg=gage] ^- (bolt gage)
2014-06-19 22:53:16 +04:00
[p=cof q=[%0 ~ [%$ (slop q.bor q.heg)]]]
2014-05-07 21:42:31 +04:00
==
2014-04-30 21:04:07 +04:00
::
%bake
:: ~& > (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)
2014-05-16 00:17:54 +04:00
|= [cof=cafe vux=(unit vase)]
2014-05-09 04:34:57 +04:00
?~ vux
2015-02-27 09:35:41 +03:00
(flaw cof leaf/"bake failed" (smyt (tope q.kas)) ~)
2014-05-16 00:17:54 +04:00
(fine cof [p.kas u.vux])
::
%boil
2014-07-09 07:00:30 +04: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)
|= [cof=cafe bem=beam]
%+ cope (lime cof p.kas bem r.kas)
2014-05-16 00:17:54 +04:00
|= [cof=cafe vax=vase]
2015-02-27 09:35:41 +03:00
(fine cof `gage`[p.kas vax])
2015-03-11 00:11:48 +03:00
::
%bunt
%+ cool |.(leaf/"ford: bunt {<p.kas>}")
2015-03-11 02:56:08 +03:00
?: ?=(?(%hoon %hook) p.kas)
(fine cof p.kas [%atom %t] '')
2015-03-12 03:37:37 +03:00
%+ cope (fang cof p.kas)
2015-03-11 00:11:48 +03:00
|= [cof=cafe tux=vase]
2015-03-11 02:56:08 +03:00
(fine cof [p.kas (slot 6 tux)])
2014-04-30 21:04:07 +04: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
2014-05-16 00:17:54 +04:00
|=([cof=cafe p=silk q=silk] ^$(cof cof, kas p))
|=([cof=cafe p=silk q=silk] ^$(cof cof, kas q))
2014-05-07 21:42:31 +04:00
==
::
2015-02-27 09:35:41 +03:00
|= [cof=cafe gat=gage sam=gage]
2014-05-16 00:17:54 +04:00
(maul cof q.gat q.sam)
2014-05-07 21:42:31 +04:00
::
2014-05-16 00:17:54 +04:00
|= [cof=cafe vax=vase]
(fine cof %noun vax)
2014-05-07 21:42:31 +04:00
==
2014-04-30 21:04:07 +04:00
::
2014-05-10 11:10:46 +04:00
%cast
2014-07-27 14:26:17 +04:00
%+ cool |.(leaf/"ford: cast {<p.kas>}")
%+ cope $(kas q.kas)
2015-02-27 09:35:41 +03:00
|= [cof=cafe cay=gage]
^- (bolt gage)
%+ cool |.(leaf/"ford: casting {<p.cay>} to {<p.kas>}")
?. ?=(@ p.cay)
(flaw cof leaf/"bad cast marc" ~)
2015-03-12 03:37:37 +03:00
%+ cope (link cof p.kas p.cay q.cay)
2014-05-16 00:17:54 +04:00
|= [cof=cafe vax=vase]
(fine cof [p.kas vax])
2015-02-27 09:35:41 +03:00
::
%diff
%+ 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
::
2014-05-31 16:52:06 +04:00
%done [cof %0 p.kas q.kas]
%dude (cool |.(p.kas) $(kas q.kas))
2014-06-17 05:33:31 +04:00
%dune
2015-02-12 00:10:07 +03:00
?~ q.kas [cof [%2 p.kas [%leaf "no data"]~]]
2014-06-17 05:33:31 +04:00
$(kas [%done p.kas u.q.kas])
::
%file
2015-04-09 03:51:34 +03:00
%+ cool |.(leaf/"ford: file {<p.kas>}")
(lear cof p.kas)
2015-02-27 09:35:41 +03:00
::
%join
%+ 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
::
%mash
%+ 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
::
2014-05-31 16:52:06 +04:00
%mute (kale cof p.kas q.kas)
2015-02-27 09:35:41 +03:00
%pact
%+ cool |.(leaf/"ford: pact {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}")
(pact cof p.kas q.kas)
::
2014-10-02 23:46:00 +04:00
%plan
2014-07-19 04:51:22 +04:00
%+ cope (abut:(meow p.kas q.kas) cof r.kas)
|= [cof=cafe vax=vase]
(fine cof %noun vax)
::
2014-07-10 04:16:17 +04:00
%reef (fine cof %noun pit)
%ride
%+ cool |.(leaf/"ford: ride {<`@p`(mug kas)>}")
2014-07-29 02:46:03 +04:00
%+ cope $(kas q.kas)
2015-02-27 09:35:41 +03:00
|= [cof=cafe cay=gage]
2014-07-29 02:46:03 +04:00
%+ cope (maim cof q.cay p.kas)
2014-05-31 16:52:06 +04:00
|= [cof=cafe vax=vase]
(fine cof %noun vax)
2015-02-27 09:35:41 +03:00
::
%tabl
%+ cope
|- ^- (bolt (pair (list (pair marc marc)) vase))
?~ p.kas (fine cof ~ *vase)
%+ cope (make cof p.i.p.kas)
|= [cof=cafe key=gage]
%+ cope (make cof q.i.p.kas)
|= [cof=cafe val=gage]
%+ cope ^^$(p.kas t.p.kas)
|= [cof=cafe rex=(list (pair marc marc)) rey=vase]
(fine cof [[p.key p.val] rex] (slop (slop q.key q.val) rey))
|= [cof=cafe rex=(list (pair marc marc)) rey=vase]
(fine cof [%tabl rex] rey)
2014-05-31 16:52:06 +04:00
::
2014-10-02 23:46:00 +04:00
%vale
%+ cool |.(leaf/"ford: vale {<p.kas>} {<q.kas>} {<`@p`(mug r.kas)>}")
2014-06-26 16:18:30 +04:00
%+ cope (lave cof p.kas q.kas r.kas)
2014-07-27 14:26:17 +04:00
|= [cof=cafe vax=vase]
(fine cof `cage`[p.kas vax])
2015-03-11 02:56:08 +03:00
::
%volt
%+ cool |.(leaf/"ford: volt {<p.q.kas>}")
%+ cope $(kas [%bunt p.q.kas])
|= [cof=cafe cay=gage]
^- (bolt gage)
[cof %0 p.kas p.q.kas p.q.cay q.q.kas]
2014-04-30 21:04:07 +04:00
==
::
2015-01-13 04:49:31 +03:00
++ malt :: cached slit
|= [cof=cafe gat=type sam=type]
^- (bolt type)
%+ (clef %slit) (fine cof gat sam)
|= [cof=cafe gat=type sam=type]
=+ top=(mule |.((slit gat sam)))
?- -.top
2014-05-16 00:17:54 +04:00
| (flaw cof p.top)
2015-01-13 04:49:31 +03:00
& (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
|= [cof=cafe gat=vase sam=vase]
^- (bolt vase)
%+ cope (malt cof p.gat p.sam)
|= [cof=cafe typ=type]
2015-04-14 00:29:39 +03:00
%+ (coup cof) (mong [q.gat q.sam] (mole (slod save)))
2015-01-13 04:49:31 +03:00
|=(val=* `vase`[typ val])
::
2014-07-19 04:51:22 +04:00
++ meow :: assemble
2014-10-02 23:46:00 +04:00
|= [how=beam arg=heel]
2014-08-02 03:39:15 +04:00
=| $: rop=(map term (pair hoof twig)) :: structure/complex
2014-07-19 04:51:22 +04:00
bil=(map term (pair hoof twig)) :: libraries known
lot=(list term) :: library stack
zeg=(set term) :: library guard
boy=(list twig) :: body stack
==
~% %meow ..meow
==
%able able
%ably ably
%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
?:(=(~ rop) [%$ 1] [%brcn (~(run by rop) |=([* a=twig] [%ash a]))])
2015-02-14 06:43:17 +03:00
[%tssg (turn (flop lot) |=(a=term q:(~(got by bil) a)))]
2014-07-27 14:26:17 +04:00
::
2014-07-29 02:46:03 +04:00
++ ably :: naked structure
2014-09-25 04:37:29 +04:00
|= [cof=cafe for=mark hyd=hood] :: XX unused
2014-07-27 14:26:17 +04:00
^- (bolt twig)
%+ cope (apex cof hyd)
|= [cof=cafe sel=_..ably]
=. ..ably sel
%+ fine cof
^- twig
:+ %tsgl [%cnzy for]
:- %brcn
^- (map term foot)
%+ ~(put by `(map term foot)`(~(run by rop) |=([* a=twig] [%ash a])))
2014-10-02 23:46:00 +04:00
for
2014-07-27 14:26:17 +04:00
[%ash [%tssg (flop boy)]]
::
2014-07-19 04:51:22 +04:00
++ abut :: generate
|= [cof=cafe hyd=hood]
^- (bolt vase)
2014-07-19 04:51:22 +04:00
%+ cope (apex cof hyd)
|= [cof=cafe sel=_..abut]
2014-07-26 04:29:01 +04:00
=. ..abut sel
%+ cope (maim cof pit able)
|= [cof=cafe bax=vase]
%+ cope (chap cof bax [%fan fan.hyd])
|= [cof=cafe gox=vase]
2014-07-26 04:29:01 +04:00
%+ cope (maim cof (slop gox bax) [%tssg (flop boy)])
|= [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
|= [cof=cafe hyd=hood]
^- (bolt ,_..apex)
%+ cope (body cof src.hyd)
|= [cof=cafe sel=_..apex]
=. ..apex sel
%+ cope (neck cof lib.hyd)
|= [cof=cafe sel=_..apex]
2014-07-26 04:29:01 +04:00
=. ..apex sel(boy boy)
%+ cope (head cof sur.hyd)
2014-07-19 04:51:22 +04:00
|= [cof=cafe sel=_..apex]
(fine cof sel)
::
++ body :: produce functions
|= [cof=cafe src=(list hoop)]
2014-10-31 06:13:40 +03:00
^- (bolt ,_..body)
2014-07-19 04:51:22 +04:00
?~ src (fine cof ..body)
%+ cope (wilt cof i.src)
|= [cof=cafe sel=_..body]
^$(cof cof, src t.src, ..body sel)
::
++ chad :: atomic list
|= [cof=cafe bax=vase doe=term hon=horn]
2014-07-24 03:23:53 +04:00
^- (bolt vase)
%+ cope ((lash (slat doe)) cof how)
|= [cof=cafe yep=(map ,@ span)]
=+ ^= poy ^- (list (pair ,@ span))
%+ sort (~(tap by yep) ~)
|=([a=[@ *] b=[@ *]] (lth -.a -.b))
%+ cope
|- ^- (bolt (list (pair ,@ vase)))
2015-02-13 00:03:54 +03:00
?~ poy (flue cof)
%+ cope $(poy t.poy)
|= [cof=cafe nex=(list (pair ,@ vase))]
%+ cope (chap(s.how [q.i.poy s.how]) cof bax hon)
|= [cof=cafe elt=vase]
(fine cof [[p.i.poy elt] nex])
|= [cof=cafe yal=(list (pair ,@ vase))]
%+ fine cof
|- ^- vase
?~ yal [[%cube 0 [%atom %n]] 0]
(slop (slop [[%atom doe] p.i.yal] q.i.yal) $(yal t.yal))
::
++ chai :: atomic map
|= [cof=cafe bax=vase hon=horn]
^- (bolt vase)
%+ cope (lend cof how)
|= [cof=cafe arc=arch]
2014-07-24 03:23:53 +04:00
%+ cope
|- ^- (bolt (map ,@ vase))
2015-02-13 00:03:54 +03:00
?~ r.arc (flue cof)
%+ cope $(r.arc l.r.arc)
2014-07-24 03:23:53 +04:00
|= [cof=cafe lef=(map ,@ vase)]
%+ cope `(bolt (map ,@ vase))`^$(cof cof, r.arc r.r.arc)
2014-07-24 03:23:53 +04:00
|= [cof=cafe rig=(map ,@ vase)]
%+ cope (chap(s.how [p.n.r.arc s.how]) cof bax hon)
2014-07-24 03:23:53 +04:00
|= [cof=cafe nod=vase]
(fine cof [[p.n.r.arc nod] lef rig])
2014-07-24 03:23:53 +04:00
|= [cof=cafe doy=(map ,@ vase)]
%+ fine cof
|- ^- vase
?~ 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
|= [cof=cafe bax=vase hon=horn]
2014-07-24 03:23:53 +04:00
^- (bolt vase)
?- -.hon
2014-08-06 00:24:26 +04:00
%ape (maim cof bax p.hon)
2014-10-02 23:46:00 +04:00
%arg
%+ cope (maim cof bax p.hon)
|= [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
::
%day (chad cof bax %dr p.hon)
2014-10-02 23:46:00 +04:00
%dub
%+ cope $(hon q.hon)
2014-07-24 03:23:53 +04:00
|= [cof=cafe vax=vase]
(fine cof [[%face p.hon p.vax] q.vax])
::
%fan
%+ cope
|- ^- (bolt (list vase))
2015-02-13 00:03:54 +03:00
?~ p.hon (flue cof)
%+ cope ^$(hon i.p.hon)
|= [cof=cafe vax=vase]
%+ cope ^$(cof cof, p.hon t.p.hon)
|= [cof=cafe tev=(list vase)]
(fine cof [vax tev])
2014-07-24 03:23:53 +04:00
|= [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
::
%for $(hon q.hon, s.how (weld (flop p.hon) s.how))
2015-02-03 21:41:17 +03:00
%hel
%= $
hon q.hon
arg (scag p.hon arg)
s.how (weld (slag p.hon arg) s.how)
==
%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)
|= [cof=cafe lef=vase]
%+ cope ^$(cof cof, p.hon r.p.hon)
|= [cof=cafe rig=vase]
%+ cope ^^^$(cof cof, hon q.n.p.hon)
|= [cof=cafe vax=vase]
%+ fine cof
%+ slop
(slop [[%atom %tas] p.n.p.hon] vax)
(slop lef rig)
::
%now (chad cof bax %da p.hon)
%nap (chai cof bax p.hon)
2014-07-24 03:23:53 +04:00
%see $(hon q.hon, how p.hon)
2014-10-02 23:46:00 +04:00
%saw
2014-07-24 03:23:53 +04:00
%+ cope $(hon q.hon)
|= [cof=cafe sam=vase]
%+ cope (maim cof bax p.hon)
|= [cof=cafe gat=vase]
(maul cof gat sam)
::
%sic
2014-07-24 03:23:53 +04:00
%+ cope $(hon q.hon)
|= [cof=cafe vax=vase]
%+ cope (maim cof bax [%bctr p.hon])
|= [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-01-13 01:40:50 +03:00
%toy (cope (make cof %boil p.hon how ~) feel)
2014-07-24 03:23:53 +04:00
==
::
2014-07-29 02:46:03 +04:00
++ head :: consume structures
2014-08-05 07:23:29 +04:00
|= [cof=cafe bir=(list hoot)]
2014-07-19 04:51:22 +04:00
|- ^- (bolt ,_..head)
2014-10-02 23:46:00 +04:00
?~ bir
2014-07-26 04:29:01 +04:00
(fine cof ..head)
2014-08-02 03:39:15 +04:00
=+ byf=(~(get by rop) p.q.i.bir)
2014-07-19 04:51:22 +04:00
?^ byf
2014-08-02 03:39:15 +04:00
?. =(`hoof`q.i.bir `hoof`p.u.byf)
(flaw cof [%leaf "structure mismatch: {<~[p.u.byf q.i.bir]>}"]~)
2014-07-19 04:51:22 +04:00
$(bir t.bir)
2014-08-02 03:39:15 +04:00
=+ bem=(hone ?:(p.i.bir %gate %core) %sur q.i.bir)
2014-08-04 21:18:26 +04:00
%+ cope (fade cof %hook bem)
2014-07-19 04:51:22 +04:00
|= [cof=cafe hyd=hood]
2014-10-02 23:46:00 +04:00
%+ cope (apex(boy ~) cof hyd)
|= [cof=cafe sel=_..head]
2014-07-19 04:51:22 +04:00
=. ..head
%= sel
2014-10-02 23:46:00 +04:00
boy ?: p.i.bir
2014-08-02 03:39:15 +04:00
boy
(welp boy [[[%cnzy p.q.i.bir] [%$ 1]] ~])
2014-10-02 23:46:00 +04:00
zeg zeg
rop %+ ~(put by (~(uni by rop) rop.sel))
2014-10-02 23:46:00 +04:00
p.q.i.bir
2014-08-02 03:39:15 +04:00
[q.i.bir [%tssg (flop boy.sel)]]
2014-07-19 04:51:22 +04:00
==
^^$(cof cof, bir t.bir)
::
++ hone :: plant hoof
2014-07-21 07:15:02 +04:00
|= [for=@tas 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 ~[for p.huf way])
[[q.u.q.huf %main p.u.q.huf] ~[for p.huf way]]
2014-07-19 04:51:22 +04:00
::
++ neck :: consume libraries
|= [cof=cafe bir=(list hoof)]
^- (bolt ,_..neck)
?~ bir (fine cof ..neck)
2014-07-22 05:55:40 +04:00
?: (~(has in zeg) p.i.bir)
2014-10-02 23:46:00 +04:00
(flaw cof [%leaf "circular dependency: {<i.bir>}"]~)
=+ goz=(~(put in zeg) p.i.bir)
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)
2014-07-21 07:15:02 +04:00
=+ bem=(hone %core %lib i.bir)
2014-08-04 21:18:26 +04:00
%+ cope (fade cof %hook bem)
2014-07-19 04:51:22 +04:00
|= [cof=cafe hyd=hood]
2014-10-02 23:46:00 +04:00
%+ cope (apex(zeg goz, boy ~) cof hyd)
2014-07-19 04:51:22 +04:00
|= [cof=cafe sel=_..neck]
2014-10-02 23:46:00 +04:00
=. ..neck
2014-07-19 04:51:22 +04:00
%= sel
zeg zeg
2014-07-22 05:55:40 +04:00
lot [p.i.bir lot]
bil (~(put by bil) p.i.bir [i.bir [%tssg (flop boy.sel)]])
2014-07-19 04:51:22 +04:00
==
^^$(cof cof, bir t.bir)
::
++ wilt :: process body entry
|= [cof=cafe hop=hoop]
2014-10-31 06:13:40 +03:00
^- (bolt ,_..wilt)
2014-07-24 03:23:53 +04:00
?- -.hop
%& (fine cof ..wilt(boy [p.hop boy]))
2014-10-02 23:46:00 +04:00
%|
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)
|= [cof=cafe arc=arch]
?: (~(has by r.arc) %hoon)
2014-08-04 21:18:26 +04:00
%+ cope (fade cof %hoon p.hop)
2014-07-24 03:23:53 +04:00
|= [cof=cafe hyd=hood]
%+ cope (apex(boy ~) cof hyd)
|= [cof=cafe sel=_..wilt]
2014-07-24 03:23:53 +04:00
(fine cof sel(boy [[%tssg boy.sel] boy]))
=+ [all=(lark (slat %tas) arc) sel=..wilt]
2014-07-24 03:23:53 +04:00
%+ cope
2014-10-31 06:13:40 +03:00
|- ^- (bolt (pair (map term foot) ,_..wilt))
?~ all (fine cof ~ ..wilt)
2014-07-24 03:23:53 +04:00
%+ cope $(all l.all)
|= [cof=cafe lef=(map term foot) sel=_..wilt]
%+ cope ^$(all r.all, cof cof, sel sel)
|= [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]
==
2014-07-24 03:23:53 +04:00
|= [cof=cafe sel=_..wilt]
%+ fine cof
[`(map term foot)`[[p.n.all [%ash [%tssg boy.sel]]] lef rig] sel]
2014-07-24 03:23:53 +04:00
|= [cof=cafe mav=(map term foot) sel=_..wilt]
?~ 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-14 06:43:17 +03:00
++ norm :: normalize beam rev
|= bem=beam
%_ bem
r ?: ?=(%ud -.r.bem) r.bem
=+ num=(ska ~ %cw bem(s ~))
?. ?=([~ ~ * * @u] num) r.bem :: XX
[%ud q.q.u.u.num]
==
::
2015-02-27 09:35:41 +03:00
++ pact :: patch
|= [cof=cafe kas=silk kos=silk]
^- (bolt gage)
%. [cof kas kos]
;~ cope
;~ coax
|=([cof=cafe p=silk q=silk] (make cof p))
|=([cof=cafe p=silk q=silk] (make cof q))
==
|= [cof=cafe cay=gage coy=gage]
?. &(?=(@ p.cay) ?=(@ p.coy))
(flaw cof leaf/"bad pact marc" ~)
?: ?=(?(%hoon %hook) p.cay)
?. ?=(%txt-diff p.coy)
(flaw cof leaf/"{<p.cay>} mark with bad diff type: {<p.coy>}" ~)
=+ 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" -)
[>type=p.q.coy< >shouldbe=-:!>(*(urge cord))< ~]
=+ pac=(role (lurk (lore (cat 3 u.txt '\0a')) u.dif))
(fine cof p.cay [%atom %t] (end 3 (dec (met 3 pac)) pac))
2015-03-12 03:37:37 +03:00
%+ cope (fang cof p.cay)
2015-02-27 09:35:41 +03:00
|= [cof=cafe pro=vase]
?. (slab %grad p.pro)
(flaw cof leaf/"no ++grad" ~)
=+ gar=(slap pro [%cnzy %grad])
?. (slab %form p.gar)
?. (slab %sted p.gar)
(flaw cof leaf/"no ++form:grad nor ++sted:grad" ~)
=+ for=((soft ,@tas) q:(slap gar [%cnzy %sted]))
?~ for
(flaw cof leaf/"bad ++sted:grad" ~)
(make cof %cast p.cay %pact [%cast u.for [%done ~ cay]] [%done ~ coy])
=+ for=((soft ,@tas) q:(slap gar [%cnzy %form]))
?~ 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]~)
|= [cof=cafe pox=vase]
%+ cope
%^ maul cof
(slap (slap pox [%cnzy %grad]) [%cnzy %pact])
q.coy
|= [cof=cafe pat=vase]
(fine cof p.cay pat)
==
::
2014-04-30 21:04:07 +04:00
++ resp
|= [tik=@ud rot=riot]
^+ ..zo
?> (~(has by q.kig) tik)
2015-03-31 01:12:18 +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
|= [(unit (set monk)) tem=term bem=beam]
^- (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 -
2014-05-31 23:40:02 +04: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
2014-06-04 21:56:30 +04:00
|= [hen=duct hic=(hypo (hobo kiss))]
2014-06-04 14:40:09 +04:00
^- [p=(list move) q=_..^$]
2014-07-09 07:00:30 +04:00
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
2014-05-22 21:39:51 +04:00
=+ ^= our ^- @p
2014-06-03 09:07:32 +04:00
?- -.q.hic
%exec p.q.hic
2015-02-19 00:35:22 +03:00
%wasp p.q.hic
2014-05-22 21:39:51 +04:00
==
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-02-19 00:35:22 +03:00
?: ?=(%wasp -.q.hic)
abet:(~(awap za [[our *beak hen] [now eny ski] ~] bay) q.q.hic)
=* bek q.q.hic
2015-03-12 03:37:37 +03:00
abet:(~(apex za [[our bek hen] [now eny ski] ~] bay) r.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
|= [now=@da hen=duct]
^- (unit ,@da)
~
::
2014-07-09 07:00:30 +04:00
++ load :: highly forgiving
|= 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)]
2014-07-09 07:00:30 +04:00
=+ lox=((soft axle) old)
2014-05-31 03:51:35 +04:00
^+ ..^$
2014-07-09 07:00:30 +04:00
?~ lox
~& %ford-reset
..^$
..^$(+>- u.lox)
2014-04-23 21:02:36 +04:00
::
++ scry
2014-05-27 00:43:40 +04: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-02-19 00:35:22 +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
2014-06-22 09:49:10 +04:00
|= [tea=wire hen=duct hin=(hypo sign)]
2014-06-03 09:07:32 +04:00
^- [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
=+ bek=-:(need (tome t.t.tea))
abet:(~(axun za [[our bek hen] [now eny ski] ~] bay) [tea u.dep 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)
bek=-:(need (tome t.t.t.tea))
2015-02-19 00:35:22 +03:00
==
2015-03-12 03:37:37 +03:00
abet:(~(axon za [[our bek 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
--