mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 19:46:50 +03:00
Merge branch 'master' of github.com:urbit/urbit
Conflicts: urb/zod/main/pro/down/core.hoon
This commit is contained in:
commit
6febd493c3
@ -73,6 +73,7 @@
|
|||||||
[%mess p=hasp q=ship r=cage] ::
|
[%mess p=hasp q=ship r=cage] ::
|
||||||
[%nuke p=hasp q=ship] ::
|
[%nuke p=hasp q=ship] ::
|
||||||
[%show p=hasp q=ship r=path] ::
|
[%show p=hasp q=ship r=path] ::
|
||||||
|
[%wipe p=hasp] ::
|
||||||
== == == ::
|
== == == ::
|
||||||
++ rave :: see %clay
|
++ rave :: see %clay
|
||||||
$% [& p=mood] :: single request
|
$% [& p=mood] :: single request
|
||||||
|
@ -413,6 +413,8 @@
|
|||||||
?< ?=(~ t.mab)
|
?< ?=(~ t.mab)
|
||||||
=+ nap=(slav %ud i.t.mab)
|
=+ nap=(slav %ud i.t.mab)
|
||||||
=+ sem=(need (~(get by can.sub.siq:beat:u.ouy) nap))
|
=+ sem=(need (~(get by can.sub.siq:beat:u.ouy) nap))
|
||||||
|
?: &(=(0 nap) =(~ s.sem))
|
||||||
|
(hear:woy ~ %& %json !>((joba %reload %b %&)))
|
||||||
=+ ^= cay ^- cage
|
=+ ^= cay ^- cage
|
||||||
?. ?=(%json p.+.sih)
|
?. ?=(%json p.+.sih)
|
||||||
[p.+.sih (slot 3 (spec (slot 3 [typ +.sih])))]
|
[p.+.sih (slot 3 (spec (slot 3 [typ +.sih])))]
|
||||||
@ -1135,6 +1137,38 @@
|
|||||||
heart.beat()
|
heart.beat()
|
||||||
'''
|
'''
|
||||||
::
|
::
|
||||||
|
++ duty
|
||||||
|
;script:'''
|
||||||
|
if (auto)
|
||||||
|
{
|
||||||
|
var tries = 0;
|
||||||
|
var cnt = 0;
|
||||||
|
var next = "/gie/"+user+"/"+port+"/"+cnt;
|
||||||
|
call = function() {
|
||||||
|
xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('GET', next, true);
|
||||||
|
xhr.addEventListener('load', function() {
|
||||||
|
if ( this.status >= 500 ) {
|
||||||
|
return delay();
|
||||||
|
}
|
||||||
|
cnt++;
|
||||||
|
if ( this.status >= 400 ) {
|
||||||
|
document.alert("neighbor, please.");
|
||||||
|
}
|
||||||
|
document.location.reload();
|
||||||
|
});
|
||||||
|
xhr.addEventListener('error', delay);
|
||||||
|
xhr.addEventListener('abort', delay);
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
|
delay = function() {
|
||||||
|
setTimeout(call,1000*tries);
|
||||||
|
tries++;
|
||||||
|
}
|
||||||
|
call();
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
::
|
||||||
++ fape :: dispatch %ape
|
++ fape :: dispatch %ape
|
||||||
|= [fur=(unit term) you=@p paw=path]
|
|= [fur=(unit term) you=@p paw=path]
|
||||||
^- (unit seam)
|
^- (unit seam)
|
||||||
@ -1768,7 +1802,7 @@
|
|||||||
|= [num=@ud app=term you=ship pax=path]
|
|= [num=@ud app=term you=ship pax=path]
|
||||||
^+ +>
|
^+ +>
|
||||||
?< (~(has by sok) num)
|
?< (~(has by sok) num)
|
||||||
abet:(~(self yo num you [-(tim.bet +)]:[*sink now]) app pax)
|
abet:(~(self yo num you *sink) app pax)
|
||||||
::
|
::
|
||||||
++ yokh :: heartbeat
|
++ yokh :: heartbeat
|
||||||
|= [num=@ud you=ship nap=@ud cnt=@ud jon=json]
|
|= [num=@ud you=ship nap=@ud cnt=@ud jon=json]
|
||||||
@ -1888,6 +1922,7 @@
|
|||||||
++ self :: request main
|
++ self :: request main
|
||||||
|= [app=term pax=path]
|
|= [app=term pax=path]
|
||||||
^+ +>
|
^+ +>
|
||||||
|
=. tim.bet.siq now
|
||||||
=. can.sub.siq (~(put by can.sub.siq) 0 [[our app] pax hen `nap])
|
=. can.sub.siq (~(put by can.sub.siq) 0 [[our app] pax hen `nap])
|
||||||
=. num.sub.siq +(num.sub.siq)
|
=. num.sub.siq +(num.sub.siq)
|
||||||
(pass `0 [%g %show [our app] you pax])
|
(pass `0 [%g %show [our app] you pax])
|
||||||
@ -1930,7 +1965,7 @@
|
|||||||
=+ pip=u.pup
|
=+ pip=u.pup
|
||||||
=+ ^= sip
|
=+ ^= sip
|
||||||
?. =(%apg -.som.pip) sip.pip
|
?. =(%apg -.som.pip) sip.pip
|
||||||
[duti sip.pip]
|
[duti duty sip.pip]
|
||||||
?~ huq +>.$(..yo (bust 404 num))
|
?~ huq +>.$(..yo (bust 404 num))
|
||||||
%= +>.$
|
%= +>.$
|
||||||
q.rey
|
q.rey
|
||||||
|
@ -629,13 +629,13 @@
|
|||||||
%+ cope (maul cof (slap gab [%cnzy %noun]) [%noun q.sam])
|
%+ cope (maul cof (slap gab [%cnzy %noun]) [%noun q.sam])
|
||||||
|= [cof=cafe pro=vase]
|
|= [cof=cafe pro=vase]
|
||||||
?: =(+<.q.pro q.sam)
|
?: =(+<.q.pro q.sam)
|
||||||
(flaw cof [%leaf "ford: invalid content: {<[for bek]>}"]~)
|
(fine cof (slot 6 pro))
|
||||||
(fine cof (slot 6 pro))
|
(flaw cof [%leaf "ford: invalid content: {<[for bek]>}"]~)
|
||||||
::
|
::
|
||||||
++ lave :: validate
|
++ lave :: validate
|
||||||
|= [cof=cafe for=mark his=ship som=*]
|
|= [cof=cafe for=mark his=ship som=*]
|
||||||
^- (bolt vase)
|
^- (bolt vase)
|
||||||
((lake for [his %main [%da now]]) cof [%noun som])
|
((lake for [our %main [%da now]]) cof [%noun som])
|
||||||
::
|
::
|
||||||
++ lane :: type infer
|
++ lane :: type infer
|
||||||
|= [cof=cafe typ=type gen=twig]
|
|= [cof=cafe typ=type gen=twig]
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
[%nuke p=hasp q=ship] :: clear duct
|
[%nuke p=hasp q=ship] :: clear duct
|
||||||
[%rote p=sack q=term r=*] :: remote request
|
[%rote p=sack q=term r=*] :: remote request
|
||||||
[%roth p=sack q=term r=*] :: remote response
|
[%roth p=sack q=term r=*] :: remote response
|
||||||
|
[%wipe p=hasp] :: forget app
|
||||||
== ::
|
== ::
|
||||||
++ knob :: pending action
|
++ knob :: pending action
|
||||||
$% [%boot ~] :: begin boot
|
$% [%boot ~] :: begin boot
|
||||||
@ -204,6 +205,11 @@
|
|||||||
(gawk hen p.q.hic q.q.hic ((hard ,[@ud rook]) r.q.hic))
|
(gawk hen p.q.hic q.q.hic ((hard ,[@ud rook]) r.q.hic))
|
||||||
?: ?=(%roth -.q.hic)
|
?: ?=(%roth -.q.hic)
|
||||||
(gawd hen p.q.hic q.q.hic ((hard ,[@ud roon]) r.q.hic))
|
(gawd hen p.q.hic q.q.hic ((hard ,[@ud roon]) r.q.hic))
|
||||||
|
?: ?=(%wipe -.q.hic)
|
||||||
|
=+ mat=(~(got by pol.all) p.p.q.hic)
|
||||||
|
=. bum.mat (~(del by bum.mat) q.p.q.hic)
|
||||||
|
=. pol.all (~(put by pol.all) p.p.q.hic mat)
|
||||||
|
[p=~ q=..^$]
|
||||||
|- ^- [p=(list move) q=_..^^$]
|
|- ^- [p=(list move) q=_..^^$]
|
||||||
=+ =| law=(unit cuff)
|
=+ =| law=(unit cuff)
|
||||||
|- ^- $: law=(unit cuff)
|
|- ^- $: law=(unit cuff)
|
||||||
@ -784,6 +790,7 @@
|
|||||||
%= +>.$
|
%= +>.$
|
||||||
sup.sat (~(del by sup.sat) ost)
|
sup.sat (~(del by sup.sat) ost)
|
||||||
pus.sat (~(del ju pus.sat) pax ost)
|
pus.sat (~(del ju pus.sat) pax ost)
|
||||||
|
peq.sat (~(del by peq.sat) ost)
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -941,6 +948,7 @@
|
|||||||
qic.sat ~
|
qic.sat ~
|
||||||
sup.sat (~(del by sup.sat) ost)
|
sup.sat (~(del by sup.sat) ost)
|
||||||
pus.sat (~(del ju pus.sat) pax ost)
|
pus.sat (~(del ju pus.sat) pax ost)
|
||||||
|
peq.sat (~(del by peq.sat) ost)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%mess
|
%mess
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
!:
|
!:
|
||||||
::::::::: Foobug: a simple application.
|
::::::::: Appbug: a simple application.
|
||||||
::
|
::
|
||||||
|_ [hid=hide vat=[%0 p=@ud]]
|
|_ [hid=hide vat=[%0 p=@ud]]
|
||||||
++ poke
|
++ poke
|
||||||
@ -14,7 +14,8 @@
|
|||||||
^- manx
|
^- manx
|
||||||
;html
|
;html
|
||||||
;head
|
;head
|
||||||
;title: Foobug!
|
;title: Appbug!
|
||||||
|
;script: appl = '{(trip app.hid)}'
|
||||||
==
|
==
|
||||||
;body
|
;body
|
||||||
;p: Dude, a better answer is {<p.vat>}.
|
;p: Dude, a better answer is {<p.vat>}.
|
||||||
@ -25,9 +26,9 @@
|
|||||||
; function bump() {
|
; function bump() {
|
||||||
; xhr = new XMLHttpRequest();
|
; xhr = new XMLHttpRequest();
|
||||||
; xhr.onload = function() { mess++; }
|
; xhr.onload = function() { mess++; }
|
||||||
; xhr.open("PUT", "/tim/"+user+"/"+appl+"/"+port+"/"+mess);
|
; xhr.open("PUT", "/tim/" + [user, port, mess].join("/"));
|
||||||
; xhr.setRequestHeader("content-type", "text/json");
|
; xhr.setRequestHeader("content-type", "text/json");
|
||||||
; xhr.send(JSON.stringify({oryx: oryx, xyro: {}}));
|
; xhr.send(JSON.stringify({oryx: oryx, xyro: {ship: ship, appl: appl, data: {}}}));
|
||||||
; }
|
; }
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
=> %= .
|
=> %= .
|
||||||
+
|
+
|
||||||
=> +
|
=> +
|
||||||
|
=* sed .
|
||||||
=> ^/===/lib/pony
|
=> ^/===/lib/pony
|
||||||
=+ ^= flag
|
=+ ^= flag
|
||||||
$? %leet
|
$? %leet
|
||||||
@ -78,7 +79,7 @@
|
|||||||
^- (unit ,[p=@t q=tank])
|
^- (unit ,[p=@t q=tank])
|
||||||
=+ hun=(rush a wide:vast)
|
=+ hun=(rush a wide:vast)
|
||||||
?~ hun ~
|
?~ hun ~
|
||||||
?~(a ~ [~ a (sell (slap seed u.hun))])
|
?~(a ~ [~ a (sell (slap !>(sed) u.hun))])
|
||||||
::
|
::
|
||||||
++ mess
|
++ mess
|
||||||
%+ cook |=(a=^mess a)
|
%+ cook |=(a=^mess a)
|
||||||
|
11
main/bin/wipe.hoon
Normal file
11
main/bin/wipe.hoon
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
!:
|
||||||
|
:: /=main=/bin/wipe/hoon
|
||||||
|
::
|
||||||
|
=* our -<
|
||||||
|
|= *
|
||||||
|
|= gon=[term (pole term)]
|
||||||
|
:_ ~
|
||||||
|
%+ turn `(list term)`gon
|
||||||
|
|= app=term
|
||||||
|
^- gift
|
||||||
|
[%xy /g %wipe [our app]]
|
@ -158,8 +158,11 @@ window.urb = {
|
|||||||
|
|
||||||
$this = this
|
$this = this
|
||||||
this.req(method,url,params,false,function(err,data) {
|
this.req(method,url,params,false,function(err,data) {
|
||||||
|
console.log(data)
|
||||||
if(cb) {
|
if(cb) {
|
||||||
cb.call(this,err,{status: data.status, data: data.data.data})
|
cb.call(this,err,{status: data.status, data: data.data.data})
|
||||||
|
} else if (data.data.reload) {
|
||||||
|
document.location.reload()
|
||||||
} else {
|
} else {
|
||||||
fn = data.data.appl+","+data.data.path.replace(/[^\x00-\x7F]/g, "")
|
fn = data.data.appl+","+data.data.path.replace(/[^\x00-\x7F]/g, "")
|
||||||
+","+data.data.ship
|
+","+data.data.ship
|
||||||
@ -180,3 +183,5 @@ window.urb = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto = false
|
||||||
|
@ -2,7 +2,14 @@
|
|||||||
:::: /hoon/core/down/pro
|
:::: /hoon/core/down/pro
|
||||||
::
|
::
|
||||||
/? 314
|
/? 314
|
||||||
/- down
|
/- maud
|
||||||
|
!:
|
||||||
|
:::: describe
|
||||||
|
::
|
||||||
|
=+ maud
|
||||||
|
::
|
||||||
|
:::: compute
|
||||||
|
::
|
||||||
|_ don=down
|
|_ don=down
|
||||||
++ grab :: convert from
|
++ grab :: convert from
|
||||||
|%
|
|%
|
||||||
@ -10,325 +17,268 @@
|
|||||||
|= src=@t
|
|= src=@t
|
||||||
=< (mark (trip src))
|
=< (mark (trip src))
|
||||||
|%
|
|%
|
||||||
++ cott
|
|
||||||
;~ pose
|
|
||||||
(shim 0 8)
|
|
||||||
(shim 11 37)
|
|
||||||
(shim 39 59)
|
|
||||||
(just `@`61)
|
|
||||||
(shim 63 95)
|
|
||||||
(shim 97 255)
|
|
||||||
==
|
|
||||||
++ copt
|
|
||||||
;~ pose
|
|
||||||
(shim 0 9)
|
|
||||||
(shim 11 37)
|
|
||||||
(shim 39 39)
|
|
||||||
(shim 43 59)
|
|
||||||
(just `@`61)
|
|
||||||
(shim 63 90)
|
|
||||||
(shim 94 94)
|
|
||||||
(shim 97 255)
|
|
||||||
==
|
|
||||||
++ urlc ;~(pose (shim 0 9) (shim 11 31) (shim 33 39) (shim 42 255))
|
|
||||||
++ uctt ;~(pose (shim 0 9) (shim 11 91) (shim 94 255))
|
|
||||||
++ uctc ;~(pose (shim 0 9) (shim 11 33) (shim 35 39) (shim 42 255))
|
|
||||||
++ htmc ;~(pose (shim 0 9) (shim 11 255))
|
|
||||||
++ escp (mask "\\`*_\{}[]()#+-.!")
|
|
||||||
++ escd ;~(pfix bas escp)
|
|
||||||
++ whit (mask (tape 9 32 ~))
|
|
||||||
++ dent ;~(pose (jest ' ') (just `@`9))
|
|
||||||
++ blan (cold ~ ;~(plug (star whit) (just `@`10)))
|
|
||||||
++ mcat (bend |=([a=tape b=tape] (some (weld a b))))
|
|
||||||
++ wcat |*(a=_rule (cook |=([a=tape b=tape] (weld a b)) a))
|
|
||||||
++ codt
|
|
||||||
%+ knee *tape |. ~+
|
|
||||||
;~ pose
|
|
||||||
(wcat ;~(plug (plus cott) codt))
|
|
||||||
(cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose codt (easy ~))))
|
|
||||||
(cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose codt (easy ~))))
|
|
||||||
(cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose codt (easy ~))))
|
|
||||||
(plus cott)
|
|
||||||
==
|
|
||||||
++ inlt
|
|
||||||
%+ knee *tape |. ~+
|
|
||||||
;~ pose
|
|
||||||
;~(mcat (plus copt) inlt)
|
|
||||||
;~(mcat (plus escd) inlt)
|
|
||||||
;~ mcat
|
|
||||||
%- wcat
|
|
||||||
;~ plug
|
|
||||||
;~(plug gal (cook trip inle))
|
|
||||||
;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar)
|
|
||||||
==
|
|
||||||
inlt
|
|
||||||
==
|
|
||||||
;~ mcat
|
|
||||||
%- wcat
|
|
||||||
;~ plug
|
|
||||||
;~(plug gal fas (cook trip inle))
|
|
||||||
;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar)
|
|
||||||
==
|
|
||||||
inlt
|
|
||||||
==
|
|
||||||
;~ mcat
|
|
||||||
(wcat ;~(plug ;~(plug pam hax ;~(sfix (plus nud) sem)) (easy ";")))
|
|
||||||
inlt
|
|
||||||
==
|
|
||||||
;~ mcat
|
|
||||||
(wcat ;~(plug ;~(plug pam ;~(sfix (plus alf) sem)) (easy ";")))
|
|
||||||
inlt
|
|
||||||
==
|
|
||||||
(cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose inlt (easy ~))))
|
|
||||||
(cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose inlt (easy ~))))
|
|
||||||
(cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose inlt (easy ~))))
|
|
||||||
==
|
|
||||||
++ kite
|
|
||||||
|= bud=(list ,@t)
|
|
||||||
|= tub=nail
|
|
||||||
|- ^- (like ,@t)
|
|
||||||
?@ bud
|
|
||||||
(fail tub)
|
|
||||||
=+ foo=((jest i.bud) tub)
|
|
||||||
?~ q.foo
|
|
||||||
$(bud t.bud)
|
|
||||||
foo
|
|
||||||
++ bloc
|
|
||||||
%+ knee *@t |. ~+
|
|
||||||
%- kite
|
|
||||||
:~ '<address>' '<article>' '<aside>' '<audio>' '<blockquote>'
|
|
||||||
'<canvas>' '<dd>' '<div>' '<dl>' '<fieldset>' '<figcaption>'
|
|
||||||
'<figure>' '<footer>' '<form>' '<h1>' '<h2>' '<h3>' '<h4>'
|
|
||||||
'<h5>' '<h6>' '<header>' '<hgroup>' '<hr>' '<noscript>'
|
|
||||||
'<ol>' '<output>' '<p>' '<pre>' '<section>' '<table>'
|
|
||||||
'<tfoot>' '<ul>' '<video>' '<style>'
|
|
||||||
==
|
|
||||||
++ inle
|
|
||||||
%+ knee *@t |. ~+
|
|
||||||
%- kite
|
|
||||||
:~ 'b' 'big' 'i' 'small' 'tt' 'abbr' 'acronym'
|
|
||||||
'cite' 'code' 'dfn' 'em' 'kbd' 'strong' 'samp'
|
|
||||||
'var' 'a' 'bdo' 'br' 'img' 'map' 'object' 'q'
|
|
||||||
'script' 'span' 'sub' 'sup' 'button' 'input'
|
|
||||||
'label' 'select' 'textarea' 'link'
|
|
||||||
==
|
|
||||||
++ htmb
|
|
||||||
%+ knee *tape |. ~+
|
|
||||||
%+ cook |=(a=(list tape) (reel a |=([p=tape q=tape] (weld p q))))
|
|
||||||
(plus (cook |=(a=tape (weld a "\0a")) ;~(sfix (plus htmc) (just '\0a'))))
|
|
||||||
++ blok
|
|
||||||
%+ knee *tape |. ~+
|
|
||||||
%+ cook |=(a=[tape tape] (weld a))
|
|
||||||
;~(plug (cook trip bloc) ;~(plug (just '\0a') htmb))
|
|
||||||
++ intt
|
|
||||||
%+ knee *down |. ~+
|
|
||||||
;~ pose
|
|
||||||
(ifix [(jest '**') (jest '**')] (stag %rong intt))
|
|
||||||
(ifix [(jest '__') (jest '__')] (stag %rong intt))
|
|
||||||
(ifix [tar tar] (stag %emph intt))
|
|
||||||
(ifix [cab cab] (stag %emph intt))
|
|
||||||
(ifix [tec tec] (stag %inco codt))
|
|
||||||
(stag %$ inlt)
|
|
||||||
link
|
|
||||||
(stag %$ ;~(plug tar (easy ~)))
|
|
||||||
(stag %$ ;~(plug cab (easy ~)))
|
|
||||||
(stag %$ ;~(plug pel (easy ~)))
|
|
||||||
(stag %$ ;~(plug per (easy ~)))
|
|
||||||
(stag %$ ;~(plug sel (easy ~)))
|
|
||||||
(stag %$ ;~(plug ser (easy ~)))
|
|
||||||
==
|
|
||||||
++ inli
|
|
||||||
|= tub=nail
|
|
||||||
^- (like down)
|
|
||||||
?~ q.tub
|
|
||||||
(fail tub)
|
|
||||||
?: |(=(i.q.tub 10) =(i.q.tub '>'))
|
|
||||||
(fail tub)
|
|
||||||
=+ ^= foo
|
|
||||||
;~ pose
|
|
||||||
dent
|
|
||||||
;~(plug (mask "+*-") (plus whit))
|
|
||||||
;~(plug dim:ag dot (plus whit))
|
|
||||||
==
|
|
||||||
=+ bar=(foo tub)
|
|
||||||
?~ q.bar
|
|
||||||
%-
|
|
||||||
%+ cook |=(a=(list down) (reel a |=([p=down q=down] [p q])))
|
|
||||||
;~(sfix (plus intt) (just `@`10))
|
|
||||||
tub
|
|
||||||
(fail tub)
|
|
||||||
++ parg
|
|
||||||
|= [a=@ b=@]
|
|
||||||
%+ knee *down |. ~+
|
|
||||||
;~ plug
|
|
||||||
inli
|
|
||||||
%+ cook |=(a=(list down) (reel a |=([p=down q=down] [p q])))
|
|
||||||
(plus ;~(plug (easy [%$ "\0a"]) (colk a b inli)))
|
|
||||||
==
|
|
||||||
++ link
|
|
||||||
%+ knee *down |. ~+
|
|
||||||
%+ stag %link
|
|
||||||
;~ plug
|
|
||||||
(ifix [sel ser] (plus ;~(pose uctt escd)))
|
|
||||||
;~(pfix pel (star ;~(pose urlc escd)))
|
|
||||||
;~ pose
|
|
||||||
%+ cook |=(a=tape (some a))
|
|
||||||
(ifix [ace per] (ifix [doq doq] (plus ;~(pose uctc escd))))
|
|
||||||
(cold ~ per)
|
|
||||||
==
|
|
||||||
==
|
|
||||||
++ barg
|
|
||||||
|= a=@
|
|
||||||
%+ knee _@ud |. ~+
|
|
||||||
;~ pfix (stun [a a] (jest '> '))
|
|
||||||
;~ pose
|
|
||||||
(cold 1 ;~(plug (plus tis) (star whit) (just `@`10)))
|
|
||||||
(cold 2 ;~(plug (plus hep) (star whit) (just `@`10)))
|
|
||||||
==
|
|
||||||
==
|
|
||||||
++ neck
|
|
||||||
%+ knee [_@ud *down] |. ~+
|
|
||||||
;~ pose
|
|
||||||
;~(pfix (jest '######') (stag 6 ;~(pfix (star whit) inli)))
|
|
||||||
;~(pfix (jest '#####') (stag 5 ;~(pfix (star whit) inli)))
|
|
||||||
;~(pfix (jest '####') (stag 4 ;~(pfix (star whit) inli)))
|
|
||||||
;~(pfix (jest '###') (stag 3 ;~(pfix (star whit) inli)))
|
|
||||||
;~(pfix (jest '##') (stag 2 ;~(pfix (star whit) inli)))
|
|
||||||
;~(pfix (jest '#') (stag 1 ;~(pfix (star whit) inli)))
|
|
||||||
==
|
|
||||||
++ mark
|
++ mark
|
||||||
|= p=tape
|
|= p=tape
|
||||||
(scan p park)
|
(scan p apex)
|
||||||
++ hrul
|
++ apex :: markdown parser
|
||||||
%+ knee *down |. ~+
|
|
||||||
%+ sear
|
|
||||||
|=(a=(list tape) ?:((gte (lent (zing a)) 3) (some [%hrul ~]) ~))
|
|
||||||
;~ sfix
|
|
||||||
(more (star whit) ;~(pose (plus cab) (plus tar) (plus hep)))
|
|
||||||
(just `@`10)
|
|
||||||
==
|
|
||||||
++ colk
|
|
||||||
|* [a=@ b=@ fel=_rule]
|
|
||||||
;~(pfix (stun [a a] (jest '> ')) (stun [b b] dent) fel)
|
|
||||||
++ code
|
|
||||||
|= [a=@ b=@]
|
|
||||||
%+ knee *tape |. ~+
|
|
||||||
%+ cook welp
|
|
||||||
;~ plug
|
|
||||||
(ifix [dent (just '\0a')] codt)
|
|
||||||
%+ cook |=(a=(list tape) (reel a |=([p=tape q=tape] (weld p q))))
|
|
||||||
%- star
|
|
||||||
;~(plug (easy '\0a') (colk a b (ifix [dent (just '\0a')] codt)))
|
|
||||||
==
|
|
||||||
++ lelm
|
|
||||||
|= [a=@ b=@]
|
|
||||||
%+ knee *down |. ~+
|
|
||||||
;~ pose
|
|
||||||
inli
|
|
||||||
hrul
|
|
||||||
;~(pfix (just `@`10) (lmel a b))
|
|
||||||
==
|
|
||||||
++ lmel
|
|
||||||
|= [a=@ b=@]
|
|
||||||
%+ knee *down |. ~+
|
|
||||||
;~ pose
|
|
||||||
;~((bend) (stag %lund (plus (lulm a b))) (lmel a b))
|
|
||||||
;~((bend) (stag %lord (plus (lolm a b))) (lmel a b))
|
|
||||||
;~((bend) (stag %code (colk a b (code a b))) (lmel a b))
|
|
||||||
;~((bend) (stag %head (colk a b neck)) (lmel a b))
|
|
||||||
;~((bend) (stag %parg (colk a b (parg a b))) (lmel a b))
|
|
||||||
(colk a b inli)
|
|
||||||
(colk a b hrul)
|
|
||||||
;~(pfix (plus (colk a b blan)) (lmel a b))
|
|
||||||
==
|
|
||||||
++ lulm
|
|
||||||
|= [a=@ b=@]
|
|
||||||
%+ knee *down |. ~+
|
|
||||||
(colk a b ;~(pfix (mask "+*-") (plus whit) (lelm a +(b))))
|
|
||||||
++ lolm
|
|
||||||
|= [a=@ b=@]
|
|
||||||
%+ knee *down |. ~+
|
|
||||||
(colk a b ;~(pfix dim:ag dot (plus whit) (lelm a +(b))))
|
|
||||||
++ bark
|
|
||||||
|= a=@
|
|
||||||
%+ knee *down |. ~+
|
|
||||||
;~ pose
|
|
||||||
(stag %html blok)
|
|
||||||
(stag %lund (plus (lulm a 0)))
|
|
||||||
(stag %lord (plus (lolm a 0)))
|
|
||||||
(stag %code (colk a 0 (code a 0)))
|
|
||||||
(stag %head (colk a 0 neck))
|
|
||||||
%+ cook |=([a=down b=@ud] [%head b a])
|
|
||||||
(colk a 0 ;~(plug inli (barg a)))
|
|
||||||
(colk a 0 hrul)
|
|
||||||
(stag %parg (colk a 0 (parg a 0)))
|
|
||||||
(colk a 0 inli)
|
|
||||||
(cold [%$ ""] (colk a 0 (plus blan)))
|
|
||||||
==
|
|
||||||
++ dark
|
|
||||||
|= a=@
|
|
||||||
%+ knee *down |. ~+
|
|
||||||
|= tub=nail
|
|= tub=nail
|
||||||
^- (like down)
|
^- (like down)
|
||||||
=+ vex=((cook lent (star (jest '> '))) tub)
|
=+ sep=(sepa tub)
|
||||||
?~ q.vex
|
?~ q.sep [p.sep ~]
|
||||||
vex
|
:- p.sep
|
||||||
?: (lth p.u.q.vex a)
|
%- some :_ [p.sep ~]
|
||||||
(fail tub)
|
(turn p.u.q.sep |=(a=tape (scan a blos)))
|
||||||
?: (gth p.u.q.vex a)
|
::
|
||||||
(;~((bend) (stag %quot (dark +(a))) (dark a)) tub)
|
++ base %+ stag %para
|
||||||
(;~((bend) (bark a) (dark a)) tub)
|
;~ plug
|
||||||
++ park
|
(stag %text (plus ;~(pose prn eol)))
|
||||||
%+ knee *down |. ~+
|
(easy ~)
|
||||||
%+ cook |=(a=(list down) (reel a |=([p=down q=down] [p q])))
|
|
||||||
;~(sfix (plus (dark 0)) (star blan))
|
|
||||||
++ appd
|
|
||||||
|= [p=@ q=@]
|
|
||||||
^- @
|
|
||||||
(cat 3 p q)
|
|
||||||
++ wtag
|
|
||||||
|= [a=@ b=@]
|
|
||||||
^- @
|
|
||||||
:(appd '<' a '>' b '</' a '>')
|
|
||||||
++ sett
|
|
||||||
|= [a=@ b=tape]
|
|
||||||
^- @
|
|
||||||
:(appd a '="' (rap 3 b) '"')
|
|
||||||
++ hark
|
|
||||||
|= a=down
|
|
||||||
^- @
|
|
||||||
?- a
|
|
||||||
[%$ *] (rap 3 p.a)
|
|
||||||
[%code *] (wtag 'pre' (wtag 'code' (rap 3 p.a)))
|
|
||||||
[%inco *] (wtag 'code' (rap 3 p.a))
|
|
||||||
[%head *] (wtag (cat 3 'h' (add '0' p.a)) (hark q.a))
|
|
||||||
[%link *]
|
|
||||||
?~ r.a
|
|
||||||
:(appd '<a ' (sett 'href' q.a) '>' (rap 3 p.a) '</a>')
|
|
||||||
;: appd
|
|
||||||
'<a '
|
|
||||||
(sett 'href' q.a)
|
|
||||||
' '
|
|
||||||
(sett 'title' u.r.a)
|
|
||||||
'>'
|
|
||||||
(rap 3 p.a)
|
|
||||||
'</a>'
|
|
||||||
==
|
|
||||||
::
|
|
||||||
[%lord *]
|
|
||||||
(wtag 'ol' (reel (turn p.a |=(a=down (wtag 'li' (hark a)))) appd))
|
|
||||||
::
|
|
||||||
[%lund *]
|
|
||||||
(wtag 'ul' (reel (turn p.a |=(a=down (wtag 'li' (hark a)))) appd))
|
|
||||||
::
|
|
||||||
[%parg *] (wtag 'p' (hark p.a))
|
|
||||||
[%quot *] (wtag 'blockquote' (hark p.a))
|
|
||||||
[%rong *] (wtag 'strong' (hark p.a))
|
|
||||||
[%emph *] (wtag 'em' (hark p.a))
|
|
||||||
[%hrul *] '<hr>'
|
|
||||||
[%html *] (rap 3 p.a)
|
|
||||||
^ (cat 3 (hark p.a) (hark q.a))
|
|
||||||
==
|
==
|
||||||
|
::
|
||||||
|
++ blos :: block element
|
||||||
|
%+ knee *bloc |. ~+
|
||||||
|
;~ pose
|
||||||
|
head quot lasd horz
|
||||||
|
code codf html para base
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ brek (stag %brek (cold ~ ;~(plug fas fas))) :: line break
|
||||||
|
++ chrd ;~(pose escp prn (cold ' ' eol)) :: span character data
|
||||||
|
++ code :: code block
|
||||||
|
%+ stag %code
|
||||||
|
%- full
|
||||||
|
%- plus
|
||||||
|
;~ pfix (stun [4 4] ace)
|
||||||
|
;~ pose
|
||||||
|
%+ cook welp
|
||||||
|
;~(plug (plus prn) (cold "\0a" eol))
|
||||||
|
(full (plus prn))
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ codf :: fenced code block
|
||||||
|
%+ stag %code
|
||||||
|
%- full
|
||||||
|
%+ ifix
|
||||||
|
[;~(plug tec tec tec eol) ;~(plug tec tec tec)]
|
||||||
|
%- plus
|
||||||
|
;~ pose
|
||||||
|
%+ cook welp
|
||||||
|
;~(plug (plus prn) (cold "\0a" eol))
|
||||||
|
(full (plus ;~(less ;~(plug tec tec tec) prn)))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ cods :: code span
|
||||||
|
%+ stag %cods
|
||||||
|
=+ chx=;~(pose (cold ' ' eol) prn)
|
||||||
|
;~ pose
|
||||||
|
%+ ifix [(jest '```') (jest '```')]
|
||||||
|
(plus ;~(less (jest '```') chx))
|
||||||
|
%+ ifix [(jest '``') (jest '``')]
|
||||||
|
(plus ;~(less (jest '``') chx))
|
||||||
|
(ifix [tec tec] (plus ;~(less tec chx)))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ dont :: control chars
|
||||||
|
;~ pose tar tec cab sel
|
||||||
|
;~(plug sig sig)
|
||||||
|
;~(plug fas fas)
|
||||||
|
==
|
||||||
|
++ spas :: all span elements
|
||||||
|
|* res=_rule
|
||||||
|
%- plus
|
||||||
|
;~ pose emph stri link
|
||||||
|
brek cods (text res)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ eol (just `@`10) :: newline
|
||||||
|
++ emph :: emphasis
|
||||||
|
%+ knee *span |. ~+
|
||||||
|
%+ stag %emph
|
||||||
|
=+ inn=(plus ;~(pose cods stri link (text fail)))
|
||||||
|
;~ pose
|
||||||
|
(ifix [(jest '***') (jest '***')] (stag %both inn))
|
||||||
|
(ifix [(jest '**_') (jest '_**')] (stag %both inn))
|
||||||
|
(ifix [(jest '*__') (jest '__*')] (stag %both inn))
|
||||||
|
(ifix [(jest '_**') (jest '**_')] (stag %both inn))
|
||||||
|
(ifix [(jest '__*') (jest '*__')] (stag %both inn))
|
||||||
|
(ifix [(jest '___') (jest '___')] (stag %both inn))
|
||||||
|
(ifix [(jest '**') (jest '**')] (stag %bold inn))
|
||||||
|
(ifix [(jest '__') (jest '__')] (stag %bold inn))
|
||||||
|
(ifix [tar tar] (stag %ital inn))
|
||||||
|
(ifix [cab cab] (stag %ital inn))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ escp :: escapable chars
|
||||||
|
;~ pose
|
||||||
|
(cold '`' (jest '\\`'))
|
||||||
|
(cold '*' (jest '\\*'))
|
||||||
|
(cold '#' (jest '\\#'))
|
||||||
|
(cold '-' (jest '\\-'))
|
||||||
|
(cold '.' (jest '\\.'))
|
||||||
|
(cold '{' (jest '\\{'))
|
||||||
|
(cold '}' (jest '\\}'))
|
||||||
|
(cold '[' (jest '\\['))
|
||||||
|
(cold ']' (jest '\\]'))
|
||||||
|
(cold '\\' (jest '\\\\'))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ head :: header
|
||||||
|
%+ stag %head
|
||||||
|
=+ ^= hed
|
||||||
|
;~ pose
|
||||||
|
;~ plug
|
||||||
|
;~(pfix wits (spas hax))
|
||||||
|
(cook some (ifix [;~(plug (star hax) sel hax) ser] (plus alp)))
|
||||||
|
==
|
||||||
|
(ifix [wits (star hax)] ;~(plug (spas hax) (easy ~)))
|
||||||
|
==
|
||||||
|
=+ ^= sed
|
||||||
|
;~ pose
|
||||||
|
;~ plug
|
||||||
|
(spas ;~(pose eol sel))
|
||||||
|
(cook some (ifix [;~(plug sel hax) ser] (plus alp)))
|
||||||
|
==
|
||||||
|
;~(plug (spas eol) (easy ~))
|
||||||
|
==
|
||||||
|
%- full
|
||||||
|
;~ pose
|
||||||
|
;~ pfix (jest '######') (stag 6 hed) ==
|
||||||
|
;~ pfix (jest '#####') (stag 5 hed) ==
|
||||||
|
;~ pfix (jest '####') (stag 4 hed) ==
|
||||||
|
;~ pfix (jest '###') (stag 3 hed) ==
|
||||||
|
;~ pfix (jest '##') (stag 2 hed) ==
|
||||||
|
;~ pfix (jest '#') (stag 1 hed) ==
|
||||||
|
(stag 1 (ifix [wits ;~(plug eol (plus tis))] sed))
|
||||||
|
(stag 2 (ifix [wits ;~(plug eol (plus hep))] sed))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ horz :: horizontal rule
|
||||||
|
%+ stag %horz
|
||||||
|
%+ cold ~
|
||||||
|
%- full
|
||||||
|
;~ pose
|
||||||
|
;~(plug (stun [0 3] ace) hep wits hep wits hep (star ;~(pose hep wite)))
|
||||||
|
;~(plug (stun [0 3] ace) tar wits tar wits tar (star ;~(pose tar wite)))
|
||||||
|
;~(plug (stun [0 3] ace) cab wits cab wits cab (star ;~(pose cab wite)))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ html (stag %html apex:xmlp) :: html bloc
|
||||||
|
++ lasd :: top level list
|
||||||
|
%+ stag %list
|
||||||
|
%- full
|
||||||
|
;~ pose
|
||||||
|
(stag & (lisd ;~(plug (star nud) dot)))
|
||||||
|
(stag | (lisd hep))
|
||||||
|
(stag | (lisd tar))
|
||||||
|
(stag | (lisd lus))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ lisd :: list funk
|
||||||
|
|* bus=_rule
|
||||||
|
|= tub=nail
|
||||||
|
^- (like down)
|
||||||
|
=+ chx=;~(plug (plus prn) (cold "\0a" eol))
|
||||||
|
=- ?~ q.pre pre
|
||||||
|
:- p.pre %- some
|
||||||
|
[(turn `wall`p.u.q.pre |=(a=tape [%lise (scan a apex)])) [p.pre ~]]
|
||||||
|
^= pre %. tub
|
||||||
|
%+ most ;~(pose ;~(plug wits eol) (easy ~))
|
||||||
|
%+ cook |=(a=wall `tape`(zing a)) :: XX core dump w/o cast
|
||||||
|
;~ plug
|
||||||
|
%+ cook zing
|
||||||
|
;~ pose
|
||||||
|
(full ;~(pfix bus ace ;~(plug (plus prn) (easy ~))))
|
||||||
|
;~(pfix bus ace ;~(plug (plus prn) (cold "\0a" eol) (easy ~)))
|
||||||
|
==
|
||||||
|
%- star
|
||||||
|
;~ pose
|
||||||
|
;~(plug ;~(sfix eol ace ace) (cook welp chx))
|
||||||
|
;~(pfix ace ace (cook welp chx))
|
||||||
|
(full ;~(pfix ace ace (plus prn)))
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ link :: link element
|
||||||
|
%+ knee *span |. ~+
|
||||||
|
%+ stag %link
|
||||||
|
;~ plug
|
||||||
|
(ifix [sel ser] (plus ;~(pose emph stri cods (text ser))))
|
||||||
|
;~ pose
|
||||||
|
%+ ifix [pel per]
|
||||||
|
;~ plug
|
||||||
|
;~(sfix (cook zing (most eol (plus ;~(less ace prn)))) ace)
|
||||||
|
(cook some (ifix [doq doq] (plus ;~(less doq ;~(pose prn eol)))))
|
||||||
|
==
|
||||||
|
%+ ifix [pel per]
|
||||||
|
;~(plug (cook zing (most eol (plus ;~(less per prn)))) (easy ~))
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ para (stag %para (full (spas fail))) :: paragraph
|
||||||
|
++ quot :: blockquotes
|
||||||
|
%+ stag %quot
|
||||||
|
%- full
|
||||||
|
|= tub=nail
|
||||||
|
^- (like down)
|
||||||
|
=- ?~ q.pre
|
||||||
|
[p.pre ~]
|
||||||
|
(apex [[1 1] (welp p.u.q.pre q.q.u.q.pre)])
|
||||||
|
^= pre %. tub
|
||||||
|
%+ cook |=(a=wall `tape`(zing a))
|
||||||
|
%- plus
|
||||||
|
;~ pfix ;~(pose ;~(plug gar ace) gar)
|
||||||
|
;~ pose
|
||||||
|
(cook welp ;~(plug (star prn) (cold "\0a" eol)))
|
||||||
|
(full (star prn))
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ sepa :: separate blocs
|
||||||
|
%+ knee *wall |. ~+
|
||||||
|
=+ lin=;~(plug eol wits eol)
|
||||||
|
%+ ifix [(star whit) (star whit)]
|
||||||
|
%+ more ;~(plug eol wits (more wits eol))
|
||||||
|
;~ pose
|
||||||
|
(sepl (cold "-" hep))
|
||||||
|
(sepl (cold "*" tar))
|
||||||
|
(sepl (cold "+" lus))
|
||||||
|
(sepl (cook welp ;~(plug (star nud) (cold "." dot))))
|
||||||
|
(plus ;~(less lin ;~(pose prn ;~(simu ;~(plug eol prn) eol))))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ sepl :: separate list
|
||||||
|
|* bus=_rule
|
||||||
|
%+ cook zing
|
||||||
|
%+ most ;~(pose ;~(plug wits eol) (easy ~))
|
||||||
|
%+ cook |=(a=wall `tape`(zing a))
|
||||||
|
;~ plug
|
||||||
|
%+ cook |=(a=wall `tape`(zing a))
|
||||||
|
;~ pose
|
||||||
|
;~(plug bus (cold " " ace) (plus prn) (cold "\0a" eol) (easy ~))
|
||||||
|
(full ;~(plug bus (cold " " ace) (plus prn) (easy ~)))
|
||||||
|
==
|
||||||
|
%- star
|
||||||
|
;~ pose
|
||||||
|
;~ pfix wits
|
||||||
|
;~ plug eol ace ace
|
||||||
|
(cook welp ;~(plug (plus prn) (cold "\0a" eol)))
|
||||||
|
==
|
||||||
|
==
|
||||||
|
;~(plug ace ace (cook welp ;~(plug (plus prn) (cold "\0a" eol))))
|
||||||
|
(full ;~(plug ace ace (plus prn)))
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ stri :: strikethrough text
|
||||||
|
%+ stag %stri
|
||||||
|
%+ ifix [(jest '~~') (jest '~~')]
|
||||||
|
(plus ;~(pose emph cods link (text fail)))
|
||||||
|
::
|
||||||
|
++ text |*(res=_rule (stag %text (plus ;~(less ;~(pose res dont) chrd))))
|
||||||
|
++ whit (mask ~[`@`0x20 `@`0x9 `@`0xa]) :: whitespace w/nl
|
||||||
|
++ wite (mask ~[`@`0x20 `@`0x9]) :: whitespace
|
||||||
|
++ wits (star wite)
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ noun :: convert from %noun
|
++ noun :: convert from %noun
|
||||||
@ -340,58 +290,49 @@
|
|||||||
++ grow :: convert into
|
++ grow :: convert into
|
||||||
|%
|
|%
|
||||||
++ html :: convert into %html
|
++ html :: convert into %html
|
||||||
=< :(appd '<html><body>' (hark don) '</body></html>')
|
=< :(appd '<html><body>' (abet don) '</body></html>')
|
||||||
|%
|
|%
|
||||||
|
++ abet
|
||||||
|
|=(don=down (crip (xmll | (apex don) ~)))
|
||||||
++ appd
|
++ appd
|
||||||
|= [p=@ q=@]
|
|= [p=@ q=@]
|
||||||
^- @
|
^- @
|
||||||
(cat 3 p q)
|
(cat 3 p q)
|
||||||
::
|
::
|
||||||
++ hark
|
++ apex |=(don=down (turn don |=(bol=bloc (blok bol))))
|
||||||
|= a=down
|
++ blok
|
||||||
^- @
|
|= bol=bloc
|
||||||
?- a
|
^- manx
|
||||||
[%$ *] (rap 3 p.a)
|
?- bol
|
||||||
[%code *] (wtag 'pre' (wtag 'code' (rap 3 p.a)))
|
[%head *]
|
||||||
[%inco *] (wtag 'code' (rap 3 p.a))
|
:_ (turn q.bol sank)
|
||||||
[%head *] (wtag (cat 3 'h' (add '0' p.a)) (hark q.a))
|
[(cat 3 'h' (scot %ud p.bol)) ?~(r.bol ~ [[%id u.r.bol] ~])]
|
||||||
[%link *]
|
[%para *] [[%p ~] (turn p.bol sank)]
|
||||||
?~ r.a
|
[%horz *] [[%hr ~] ~]
|
||||||
:(appd '<a ' (sett 'href' q.a) '>' (rap 3 p.a) '</a>')
|
[%code *] [[%pre ~] ~[[[%$ [[%$ (zing p.bol)] ~]] ~]]]
|
||||||
;: appd
|
[%quot *] [[%blockquote ~] (apex p.bol)]
|
||||||
'<a '
|
[%lise *] [[%li ~] (apex p.bol)]
|
||||||
(sett 'href' q.a)
|
[%list *] ?: =(& p.bol) [[%ol ~] (apex q.bol)]
|
||||||
' '
|
[[%ul ~] (apex q.bol)]
|
||||||
(sett 'title' u.r.a)
|
[%html *] p.bol
|
||||||
'>'
|
|
||||||
(rap 3 p.a)
|
|
||||||
'</a>'
|
|
||||||
==
|
|
||||||
::
|
|
||||||
[%lord *]
|
|
||||||
(wtag 'ol' (reel (turn p.a |=(a=down (wtag 'li' (hark a)))) appd))
|
|
||||||
::
|
|
||||||
[%lund *]
|
|
||||||
(wtag 'ul' (reel (turn p.a |=(a=down (wtag 'li' (hark a)))) appd))
|
|
||||||
::
|
|
||||||
[%parg *] (wtag 'p' (hark p.a))
|
|
||||||
[%quot *] (wtag 'blockquote' (hark p.a))
|
|
||||||
[%rong *] (wtag 'strong' (hark p.a))
|
|
||||||
[%emph *] (wtag 'em' (hark p.a))
|
|
||||||
[%hrul *] '<hr>'
|
|
||||||
[%html *] (rap 3 p.a)
|
|
||||||
^ (cat 3 (hark p.a) (hark q.a))
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ wtag
|
++ sank
|
||||||
|= [a=@ b=@]
|
|= san=span
|
||||||
^- @
|
^- manx
|
||||||
:(appd '<' a '>' b '</' a '>')
|
?- san
|
||||||
::
|
[%text *] [[%$ [[%$ p.san] ~]] ~]
|
||||||
++ sett
|
[%brek *] [[%br ~] ~]
|
||||||
|= [a=@ b=tape]
|
[%stri *] [[%del ~] (turn p.san ..$)]
|
||||||
^- @
|
[%cods *] [[%code ~] ~[[[%$ [[%$ p.san] ~]] ~]]]
|
||||||
:(appd a '="' (rap 3 b) '"')
|
[%emph *]
|
||||||
|
?: =(%ital p.san) [[%em ~] (turn q.san ..$)]
|
||||||
|
?: =(%bold p.san) [[%strong ~] (turn q.san ..$)]
|
||||||
|
[[%em ~] ~[[[%strong ~] (turn q.san ..$)]]]
|
||||||
|
[%link *]
|
||||||
|
?~ r.san [[%a ~[[%href q.san]]] (turn p.san ..$)]
|
||||||
|
[[%a ~[[%href q.san] [%title u.r.san]]] (turn p.san ..$)]
|
||||||
|
==
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
17
main/pro/hymn/core.hoon
Normal file
17
main/pro/hymn/core.hoon
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/core/hymn/pro
|
||||||
|
::
|
||||||
|
/? 314
|
||||||
|
::
|
||||||
|
:::: compute
|
||||||
|
::
|
||||||
|
|_ man=manx
|
||||||
|
::
|
||||||
|
++ grow :: convert to
|
||||||
|
|%
|
||||||
|
++ mime :: convert to %mime
|
||||||
|
=+ htm=(crip (xmlt | man ~))
|
||||||
|
[/text/html (taco htm)]
|
||||||
|
--
|
||||||
|
--
|
||||||
|
|
17
main/pro/json/core.hoon
Normal file
17
main/pro/json/core.hoon
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/core/hymn/pro
|
||||||
|
::
|
||||||
|
/? 314
|
||||||
|
::
|
||||||
|
:::: compute
|
||||||
|
::
|
||||||
|
|_ jon=json
|
||||||
|
::
|
||||||
|
++ grow :: convert to
|
||||||
|
|%
|
||||||
|
++ mime :: convert to %mime
|
||||||
|
=+ htm=(crip (pojo jon))
|
||||||
|
[/text/html (taco htm)]
|
||||||
|
--
|
||||||
|
--
|
||||||
|
|
15
main/pro/user/core.hoon
Normal file
15
main/pro/user/core.hoon
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/core/user/pro
|
||||||
|
::
|
||||||
|
/? 314
|
||||||
|
/- user
|
||||||
|
|_ use=user
|
||||||
|
::
|
||||||
|
++ grab :: convert from
|
||||||
|
|%
|
||||||
|
++ noun :: convert from %noun
|
||||||
|
|= src=*
|
||||||
|
^+ +>+
|
||||||
|
+>+(use (user src))
|
||||||
|
--
|
||||||
|
--
|
15
main/pro/users/core.hoon
Normal file
15
main/pro/users/core.hoon
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/core/users/pro
|
||||||
|
::
|
||||||
|
/? 314
|
||||||
|
/- users
|
||||||
|
|_ use=users
|
||||||
|
::
|
||||||
|
++ grab :: convert from
|
||||||
|
|%
|
||||||
|
++ noun :: convert from %noun
|
||||||
|
|= src=*
|
||||||
|
^+ +>+
|
||||||
|
+>+(use (users src))
|
||||||
|
--
|
||||||
|
--
|
15
main/pro/zing/core.hoon
Normal file
15
main/pro/zing/core.hoon
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/core/zing/pro
|
||||||
|
::
|
||||||
|
/? 314
|
||||||
|
/- zing
|
||||||
|
|_ zig=zing
|
||||||
|
::
|
||||||
|
++ grab :: convert from
|
||||||
|
|%
|
||||||
|
++ noun :: convert from %noun
|
||||||
|
|= src=*
|
||||||
|
^+ +>+
|
||||||
|
+>+(zig (zing src))
|
||||||
|
--
|
||||||
|
--
|
15
main/pro/zongs/core.hoon
Normal file
15
main/pro/zongs/core.hoon
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/core/zing/pro
|
||||||
|
::
|
||||||
|
/? 314
|
||||||
|
/- zong
|
||||||
|
|_ zog=(list zong)
|
||||||
|
::
|
||||||
|
++ grab :: convert from
|
||||||
|
|%
|
||||||
|
++ noun :: convert from %noun
|
||||||
|
|= src=*
|
||||||
|
^+ +>+
|
||||||
|
+>+(zog ((list zong) src))
|
||||||
|
--
|
||||||
|
--
|
22
main/str/maud/gate.hoon
Normal file
22
main/str/maud/gate.hoon
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|%
|
||||||
|
++ down (list bloc) :: markdown model
|
||||||
|
++ bloc :: block elements
|
||||||
|
$% [%head p=@ud q=(list span) r=(unit tape)]
|
||||||
|
[%para p=(list span)]
|
||||||
|
[%lise p=down]
|
||||||
|
[%list p=? q=down]
|
||||||
|
[%quot p=down]
|
||||||
|
[%horz ~]
|
||||||
|
[%code p=wall]
|
||||||
|
[%html p=manx]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ span :: span elements
|
||||||
|
$% [%text p=tape]
|
||||||
|
[%emph p=term q=(list span)]
|
||||||
|
[%stri p=(list span)]
|
||||||
|
[%brek ~]
|
||||||
|
[%link p=(list span) q=tape r=(unit tape)]
|
||||||
|
[%cods p=tape]
|
||||||
|
==
|
||||||
|
--
|
3
main/str/user/gate.hoon
Normal file
3
main/str/user/gate.hoon
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
$% [%in p=[p=@p q=@t]]
|
||||||
|
[%out q=[p=@p q=@t]]
|
||||||
|
==
|
1
main/str/users/gate.hoon
Normal file
1
main/str/users/gate.hoon
Normal file
@ -0,0 +1 @@
|
|||||||
|
(list ,[p=@p q=@t])
|
8
main/str/zing/gate.hoon
Normal file
8
main/str/zing/gate.hoon
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
$% [%backlog p=path q=?(%da %dr %ud) r=@]
|
||||||
|
[%hola p=path]
|
||||||
|
$: %mess p=path
|
||||||
|
$= q
|
||||||
|
$% [%do p=@t]
|
||||||
|
[%exp p=@t q=tank]
|
||||||
|
[%say p=@t]
|
||||||
|
== == ==
|
@ -1,11 +1,6 @@
|
|||||||
=< zong
|
$% $: %mess p=@da q=ship
|
||||||
|%
|
$= r
|
||||||
++ mess :: message
|
$% [%do p=@t]
|
||||||
$% [%do p=@t] :: act
|
[%exp p=@t q=tank]
|
||||||
[%exp p=@t q=tank] :: code
|
[%say p=@t]
|
||||||
[%say p=@t] :: speak
|
== == ==
|
||||||
==
|
|
||||||
++ zong
|
|
||||||
$% [%mess p=@da q=ship r=mess]
|
|
||||||
==
|
|
||||||
--
|
|
||||||
|
Loading…
Reference in New Issue
Block a user