Various fixes and improvements.

This commit is contained in:
C. Guy Yarvin 2014-08-01 16:39:15 -07:00
parent 03c714afe5
commit e97b3c08a5
14 changed files with 45 additions and 38 deletions

View File

@ -19,19 +19,20 @@
== ::
++ hood :: assembly plan
$: zus=@ud :: zuse kelvin
sur=(list hoof) :: structures
sur=(list hook) :: simple structures
lib=(list hoof) :: libraries
fan=(list horn) :: resources
src=(list hoop) :: program
== ::
++ hoof (pair term (unit (pair case ship))) :: resource reference
++ hook (pair bean hoof) :: structure reference
++ hoop :: source in hood
$% [%& p=twig] :: direct twig
[%| p=beam] :: resource location
== ::
++ horn :: resource tree
$% [%and p=twig] :: // twig by hand
[%but p=twig] :: /$ argument
$% [%and p=twig] :: /& twig by hand
[%arg p=twig] :: /$ argument
[%day p=horn] :: /| @dr map by @dr
[%dub p=term q=horn] :: /= apply face
[%fan p=(list horn)] :: /: list
@ -40,7 +41,7 @@
[%man p=(map term horn)] :: /* map by hand
[%nap p=horn] :: /% map by @tas
[%now p=horn] :: /& map by @da
[%saw p=twig q=horn] :: /_ operate on /;
[%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
@ -394,9 +395,9 @@
%+ cool |.(leaf/"ford: fade {<[(tope bem)]>}")
%+ cope (make cof [%bake %hoon bem ~])
|= [cof=cafe cay=cage]
%+ (clef %hood) (fine cof bem cay)
%+ (clef %hood) (fine cof bem(r [%ud 0]) cay)
^- (burg (pair beam cage) hood)
|= [cof=cafe bem=beam cay=cage]
|= [cof=cafe bum=beam cay=cage]
=+ rul=(fair bem)
?. ?=(@ q.q.cay)
(flaw cof ~)
@ -408,7 +409,7 @@
++ fang :: protocol door
|= [cof=cafe for=mark bek=beak]
^- (bolt vase)
=+ pax=/core/[for]/pro
=+ pax=/door/[for]/pro
=+ ^= bem ^- beam
:_ pax
?: =(p.bek our) bek
@ -419,7 +420,7 @@
::
++ fair :: hood parsing rule
|= bem=beam
=+ vez=(vang | (tope bem))
=+ vez=(vang | (tope bem(r [%ud 0])))
=< hood
|%
++ case
@ -440,7 +441,7 @@
==
::
;~ pose
(ifix [;~(plug fas hep gap) gap] (most ;~(plug com gaw) hoof))
(ifix [;~(plug fas hep gap) gap] (most ;~(plug com gaw) hook))
(easy ~)
==
::
@ -449,8 +450,8 @@
(easy ~)
==
::
(star horn)
(star hoop)
(star ;~(sfix horn gap))
(most gap hoop)
==
::
++ hoof
@ -464,6 +465,12 @@
==
==
::
++ hook
;~ pose
(stag %| ;~(pfix tar hoof))
(stag %& hoof)
==
::
++ hoop
;~ pose
(stag %| ;~(pfix fas have))
@ -480,7 +487,7 @@
;~ pose
(stag %toy ;~(sfix sym fas))
(stag %and ;~(pfix and:sign and:read))
(stag %but ;~(pfix but:sign and:read))
(stag %arg ;~(pfix arg:sign and:read))
(stag %day ;~(pfix day:sign day:read))
(stag %dub ;~(pfix dub:sign dub:read))
(stag %fan ;~(pfix fan:sign fan:read))
@ -547,8 +554,8 @@
--
::
++ sign
|% ++ and ;~(pose fas (jest %and))
++ but ;~(pose buc (jest %but))
|% ++ and ;~(pose pam (jest %and))
++ arg ;~(pose buc (jest %arg))
++ day ;~(pose bar (jest %day))
++ dub ;~(pose tis (jest %dub))
++ fan ;~(pose col (jest %fan))
@ -556,8 +563,8 @@
++ hub ;~(pose pat (jest %hub))
++ man ;~(pose tar (jest %man))
++ nap ;~(pose cen (jest %nap))
++ now ;~(pose pam (jest %now))
++ saw ;~(pose cab (jest %saw))
++ now ;~(pose fas (jest %now))
++ saw ;~(pose sem (jest %saw))
++ see ;~(pose dot (jest %see))
++ sic ;~(pose ket (jest %sic))
--
@ -617,7 +624,7 @@
|= [cof=cafe sam=vase]
^- (bolt vase)
%+ cool |.(leaf/"ford: check {<[for bek `@p`(mug q.sam)]>}")
?: ?=(?(%gate %core %hoon %hook %hood) for)
?: ?=(?(%gate %core %door %hoon %hook %hood) for)
:: ~& [%lake-easy for bek]
(fine cof sam)
%+ cope (fang cof for bek)
@ -890,7 +897,7 @@
::
++ meow :: assemble
|= [how=beam arg=heel]
=| $: rop=(map term (pair hoof twig)) :: structures known
=| $: rop=(map term (pair hoof twig)) :: structure/complex
bil=(map term (pair hoof twig)) :: libraries known
lot=(list term) :: library stack
zeg=(set term) :: library guard
@ -982,10 +989,10 @@
^- (bolt vase)
?- -.hon
%and (maim cof bax p.hon)
%but
%arg
%+ cope (maim cof bax p.hon)
|= [cof=cafe gat=vase]
(maul cof gat !>(arg))
(maul cof gat !>([how arg]))
::
%day (chai cof bax %dr p.hon)
%dub
@ -1048,27 +1055,29 @@
==
::
++ head :: consume structures
|= [cof=cafe bir=(list hoof)]
|= [cof=cafe bir=(list hook)]
|- ^- (bolt ,_..head)
?~ bir
(fine cof ..head)
=+ byf=(~(get by rop) p.i.bir)
=+ byf=(~(get by rop) p.q.i.bir)
?^ byf
?. =(`hoof`i.bir `hoof`p.u.byf)
(flaw cof [%leaf "structure mismatch: {<~[p.u.byf i.bir]>}"]~)
?. =(`hoof`q.i.bir `hoof`p.u.byf)
(flaw cof [%leaf "structure mismatch: {<~[p.u.byf q.i.bir]>}"]~)
$(bir t.bir)
=+ bem=(hone %gate %sur i.bir)
=+ bem=(hone ?:(p.i.bir %gate %core) %sur q.i.bir)
%+ cope (fade cof bem)
|= [cof=cafe hyd=hood]
%+ cope (apex(boy ~) cof hyd)
|= [cof=cafe sel=_..head]
=. ..head
%= sel
boy boy
boy ?: p.i.bir
boy
(welp boy [[[%cnzy p.q.i.bir] [%$ 1]] ~])
zeg zeg
rop %+ ~(put by (~(uni by rop) rop.sel))
p.i.bir
[i.bir [%tssg (flop boy.sel)]]
p.q.i.bir
[q.i.bir [%tssg (flop boy.sel)]]
==
^^$(cof cof, bir t.bir)
::

View File

@ -9868,7 +9868,7 @@
%pass
~? &(!lac !=(%$ p.gum))
:^ %pass [p.gum p.q.r.gum]
p.r.gum
[(,@tas -.q.gum) p.r.gum]
q.gum
[p.q.r.gum ~ [[p.gum p.r.gum] q.gum] q.q.r.gum]
::

View File

@ -1738,7 +1738,7 @@
[[i.gut i.t.gut] $(gut t.t.gut)]
:* (~(gas by *(map cord cord)) quy)
ced
-.bem
bem
t.t.but
nyp
==
@ -2522,7 +2522,7 @@
++ epic :: FCGI parameters
$: qix=(map ,@t ,@t) :: query
ced=cred :: client credentials
bek=beak :: path prefix
bem=beam :: original path
but=path :: ending
nyp=path :: request model
== ::

View File

@ -2,9 +2,8 @@
:::: /hoon/core/down/pro
::
/? 314
/- markdown
=+ markdown
!:
/- *markdown
::
::::
::
|_ don=down

View File

@ -5,13 +5,12 @@
::
:::: compute
::
|_ man=manx
|_ own=manx
::
++ grow :: convert to
|%
++ mime :: convert to %mime
=+ htm=(crip (xmlt | man ~))
[/text/html (taco htm)]
++ html (crip (xmlt | own ~)) :: convert to %html
++ mime [/text/html (taco html)] :: convert to %mime
--
--