Final template tweaks.

This commit is contained in:
C. Guy Yarvin 2014-04-05 14:25:16 -07:00
parent 08c3078647
commit 0879da2286
3 changed files with 96 additions and 86 deletions

View File

@ -6584,70 +6584,16 @@
== ==
== ==
:: ::
++ sabe !: :: beet to tuna ++ sail !: :: template language
|= reb=(list beet) |= tol=?
^- (list tuna)
=| [sim=(list ,@) tuz=(list tuna)]
|- ^- (list tuna)
?~ reb
?~(sim tuz [[%a %smdq (flop sim)] tuz])
?@ i.reb
$(reb t.reb, sim [i.reb sim])
=+ zut=$(reb t.reb, sim ~)
?~ sim [i.reb zut]
[[%a %smdq (flop sim)] i.reb zut]
::
++ saga :: tuna to twig
|= [lut=(list tuna)] !:
^- twig
:- %cltr
|- ^- (list twig)
?~ lut [[%dtzz %n ~] ~]
?- -.i.lut
%a [[%clfs p.i.lut] $(lut t.lut)]
%b [p.i.lut $(lut t.lut)]
%c ^- (list twig)
:_ ~
:+ %cndt `twig`[p.i.lut [%cltr $(lut t.lut)]]
^- twig
:+ %tsbr `tile`[[%axil %noun] [%axil %noun]]
^- twig
:- %brcn
^- (map term foot)
:_ [~ ~]
:+ %$ %elm
^- twig
:^ %wtsg `wing`[[%& 12] ~]
:+ %cnts
`wing`[[%& 12] ~]
^- tram
:~ [[[%& 1] ~] [~ 13]]
==
:+ %cnts
`wing`[[%& 12] ~]
^- tram
:~ :- [[%& 3] ~]
^- twig
:+ %cnts [%$ ~]
^- tram
:~ [[[%& 12] ~] [~ 25]]
==
==
%d [[%cnhp p.i.lut [%cltr $(lut t.lut)] ~] ~]
%e [[p.i.lut [%cltr $(lut q.i.lut)]] $(lut t.lut)]
%f $(lut (weld p.i.lut t.lut))
==
::
++ said :: template language
|= tol=? !:
|% |%
++ ape :: product twig ++ ape :: product twig
%- cook %- cook
:_ amp :_ amp
|= tum=tuna ^- twig |= tum=tuna ^- twig
?: ?=([%e *] tum) ?: ?=([%e *] tum)
[p.tum (saga q.tum)] [p.tum (sag q.tum)]
(saga tum ~) (sag tum ~)
:: ::
++ amp :: entry point ++ amp :: entry point
;~(pfix sem ?:(tol bam bat)) ;~(pfix sem ?:(tol bam bat))
@ -6655,15 +6601,16 @@
++ bam :: tall top ++ bam :: tall top
%+ knee *tuna |. ~+ %+ knee *tuna |. ~+
;~ pose ;~ pose
(stag %f ;~(pfix (plus ace) pav)) (stag %f ;~(pfix (plus ace) (cook rab puv)))
(stag %e ;~(plug hag nal)) (stag %e ;~(plug hag nal))
(stag %e ;~(plug hog nol)) (stag %e hul)
(stag %f nup) (stag %f nup)
;~(pfix tis (stag %f nol)) ;~(pfix tis (stag %f nol))
;~(pfix hep (stag %a ;~(pfix gap tall))) ;~(pfix hep (stag %a ;~(pfix gap tall)))
;~(pfix lus (stag %b ;~(pfix gap tall))) ;~(pfix lus (stag %b ;~(pfix gap tall)))
;~(pfix tar (stag %c ;~(pfix gap tall))) ;~(pfix tar (stag %c ;~(pfix gap tall)))
;~(pfix cen (stag %d ;~(pfix gap tall))) ;~(pfix cen (stag %d ;~(pfix gap tall)))
(easy [%f [%a [%smdq " "]] ~])
== ==
:: ::
++ bat :: wide outer top ++ bat :: wide outer top
@ -6671,7 +6618,7 @@
;~ pose ;~ pose
(stag %f nup) (stag %f nup)
(stag %f ped) (stag %f ped)
(stag %e ;~(plug hog lif)) (stag %e ;~(plug hig lif))
== ==
:: ::
++ bet :: wide inner top ++ bet :: wide inner top
@ -6699,7 +6646,10 @@
(stag %clsg jaw) (stag %clsg jaw)
== ==
:: ::
++ hog ++ hig :: simple head
(cook |=([a=twig b=(list twig)] [a %clsg b]) hog)
::
++ hog :: tag head
%+ cook %+ cook
|= $: a=twig |= $: a=twig
b=(unit ,@tas) b=(unit ,@tas)
@ -6707,11 +6657,11 @@
d=(unit twig) d=(unit twig)
e=(list twig) e=(list twig)
== ==
^- twig ^- [twig (list twig)]
=. e ?~(b e [[[%dtzz %tas %class] [%smdq (trip u.b)]] e]) =. e ?~(b e [[[%dtzz %tas %class] [%smdq (trip u.b)]] e])
=. e ?~(c e [[[%dtzz %tas %id] [%smdq (trip u.c)]] e]) =. e ?~(c e [[[%dtzz %tas %id] [%smdq (trip u.c)]] e])
=. e ?~(d e [[[%dtzz %tas %href] u.d] e]) =. e ?~(d e [[[%dtzz %tas %href] u.d] e])
[a %clsg e] [a e]
;~ plug ;~ plug
fry fry
;~(pose (stag ~ ;~(pfix fas sym)) (easy ~)) ;~(pose (stag ~ ;~(pfix fas sym)) (easy ~))
@ -6725,6 +6675,22 @@
(easy ~) (easy ~)
== ==
== ==
++ hul :: tall preface
%+ cook
|= [a=[p=twig q=(list twig)] b=(list twig) c=(list tuna)]
^- [twig (list tuna)]
[[p.a %clsg (weld q.a b)] c]
;~ plug
hog
%+ more gap
;~ pfix tis
;~ plug
(stag %dtzz (stag %tas sym))
;~(pfix gap tall)
==
==
nol
==
:: ::
++ jaw :: wide attributes ++ jaw :: wide attributes
;~ pose ;~ pose
@ -6755,15 +6721,16 @@
;~ pose ;~ pose
(cold ~ sem) (cold ~ sem)
;~(pfix col pep(tol |)) ;~(pfix col pep(tol |))
;~(pfix ;~(plug col ace) (cook |=(a=(list tuna) [[%f a] ~]) pav)) ;~(pfix ;~(plug col ace) (cook rab(tol |) puv))
(ifix [gap ;~(plug gap duz)] (most gap amp)) (ifix [gap ;~(plug gap duz)] (most gap amp))
== ==
:: ::
++ nup :: wide quote ++ nup :: wide quote
%+ cook |=(a=(list tuna) a) %+ cook |=(a=(list tuna) a)
(ifix [doq doq] pav) (ifix [doq doq] (cook rab puv))
:: ::
++ ped ++ pab (ifix [kel ker] ;~(plug hig luf)) :: bracketed element
++ ped :: wide flow
%+ cook |=(a=(list tuna) a) %+ cook |=(a=(list tuna) a)
(ifix [pel per] (more ace bet)) (ifix [pel per] (more ace bet))
:: ::
@ -6778,30 +6745,65 @@
== ==
== ==
:: ::
++ pav :: wide/tall flow ++ puv :: wide/tall flow
%+ cook |=(a=(list beet) (sabe a)) %+ cook |=(a=(list beet) a)
%- star %- star
;~ pose ;~ pose
;~(pfix bas ;~(pose bas hep doq lus tar cen sem kel bix:ab)) ;~(pfix bas ;~(pose bas hep doq lus tar cen sem kel bix:ab))
;~(pfix hep (stag %a wop)) ;~(pfix hep (stag %a sump))
;~(pfix lus (stag %b wop)) ;~(pfix lus (stag %b sump))
;~(pfix tar (stag %c wop)) ;~(pfix tar (stag %c sump))
;~(pfix cen (stag %d wop)) ;~(pfix cen (stag %d sump))
;~(pfix sem (stag %e wot(tol |))) ;~(pfix sem (stag %e pab(tol |)))
;~ pose ;~ pose
?:(tol (shim 32 91) ;~(pose (shim 32 33) (shim 35 91))) ?:(tol (shim 32 91) ;~(pose (shim 32 33) (shim 35 91)))
(shim 93 122) (shim 93 122)
(shim 124 126) (shim 124 126)
(shim 128 255) (shim 128 255)
== ==
(stag %a wop) (stag %a sump)
== ==
:: ::
++ wop :: wide in brace ++ rab :: beet to tuna
(ifix [kel ker] (stag %cltr (most ace wide))) |= reb=(list beet)
^- (list tuna)
=| [sim=(list ,@) tuz=(list tuna)]
|- ^- (list tuna)
?~ reb
=. sim
?. tol sim
[32 |-(?~(sim sim ?:(=(32 i.sim) $(sim t.sim) sim)))]
?~(sim tuz [[%a %smdq (flop sim)] tuz])
?@ i.reb
$(reb t.reb, sim [i.reb sim])
=+ zut=$(reb t.reb, sim ~)
?~ sim [i.reb zut]
[[%a %smdq (flop sim)] i.reb zut]
:: ::
++ wot ++ sag :: tuna to twig
(ifix [kel ker] ;~(plug hog luf)) |= [lut=(list tuna)]
^- twig
:- %cltr
|- ^- (list twig)
?~ lut [[%dtzz %n ~] ~]
?- -.i.lut
%a [[%clfs p.i.lut] $(lut t.lut)]
%b [p.i.lut $(lut t.lut)]
%c :_ ~
:+ %cndt `twig`[p.i.lut [%cltr $(lut t.lut)]]
:+ %tsbr `tile`[[%axil %noun] [%axil %noun]]
:- %brcn
^- (map term foot)
:_ [~ ~]
=+ sug=[[%& 12] ~]
:+ %$ %elm
:^ %wtsg sug
[%cnts sug [[[[%& 1] ~] [~ 13]] ~]]
[%cnts sug [[[[%& 3] ~] [%cnts [%$ ~] [[sug [~ 25]] ~]]] ~]]
%d [[%cnhp p.i.lut [%cltr $(lut t.lut)] ~] ~]
%e [[p.i.lut ^$(lut [[%f q.i.lut] ~])] $(lut t.lut)]
%f $(lut (weld p.i.lut t.lut))
==
-- --
:: ::
++ scat ++ scat
@ -6982,8 +6984,9 @@
(shim 124 126) (shim 124 126)
(shim 128 255) (shim 128 255)
== ==
(stag ~ (ifix [kel ker] (stag %cltr (most ace wide)))) (stag ~ sump)
== ==
++ sump (ifix [kel ker] (stag %cltr (most ace wide)))
++ noil ++ noil
|= tol=? |= tol=?
=< ;~ pfix buc =< ;~ pfix buc
@ -7430,8 +7433,8 @@
== ==
:: ::
++ tall %+ knee *twig ++ tall %+ knee *twig
|.(~+((wart ;~(pose (norm &) long lute ape:(said &))))) |.(~+((wart ;~(pose (norm &) long lute ape:(sail &)))))
++ wide (knee *twig |.(~+((wart ;~(pose (norm |) long ape:(said |)))))) ++ wide (knee *twig |.(~+((wart ;~(pose (norm |) long ape:(sail |))))))
++ hill (knee *tile |.(~+(;~(pose (noil |) toil)))) ++ hill (knee *tile |.(~+(;~(pose (noil |) toil))))
++ howl (knee *tile |.(~+(;~(pose (noil &) toil)))) ++ howl (knee *tile |.(~+(;~(pose (noil &) toil))))
++ toil ++ toil

View File

@ -582,7 +582,6 @@
++ xmle :: escape for xml ++ xmle :: escape for xml
|= [unq=? tex=tape rez=tape] |= [unq=? tex=tape rez=tape]
?: unq ?: unq
~& [%unquoted-escape tex]
(weld tex rez) (weld tex rez)
=+ xet=`tape`(flop tex) =+ xet=`tape`(flop tex)
|- ^- tape |- ^- tape

View File

@ -26,6 +26,14 @@
;p: Or even a *{;i:"list" ;i:" of" ;i:" tags" ~}, ;p: Or even a *{;i:"list" ;i:" of" ;i:" tags" ~},
;p: Sometimes %{|*(a=* [;i:"functionally " ;i:"applied" a])}. ;p: Sometimes %{|*(a=* [;i:"functionally " ;i:"applied" a])}.
;p: It's nice to just be able to use "quotes." ;p: It's nice to just be able to use "quotes."
; Now, some flow at the same level
; as the paragraph tag above;
; it is fun to flow along,
;a."http://www.urbit.org": with fun links
;
; ;{a."http://www.urbit.org" "and more fun links,"}
; or without,
; but not accepting any kind of trailing whitespace
;p ;p
; We are also very good at lists: ; We are also very good at lists:
;ul ;ul
@ -34,8 +42,8 @@
;li: last item ;li: last item
== ==
== ==
;script :: ;script
; alert("I am not an alert box!"); :: ; alert("I am not an alert box!");
== :: ==
== ==
== ==