shrub/arvo/zuse.hoon

2569 lines
105 KiB
Plaintext
Raw Normal View History

2014-04-10 04:06:33 +04:00
::
2013-09-29 00:21:18 +04:00
:: zuse (3), standard library (tang)
::
|%
:::::::::::::::::::::::::::::::::::::::::::::::::::::: ::
:::: chapter 3b, Arvo libraries ::::
:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 3bA, lite number theory ::
::
++ fu :: modulo (mul p q)
|= a=[p=@ q=@]
=+ b=?:(=([0 0] a) 0 (~(inv fo p.a) (~(sit fo p.a) q.a)))
|%
++ dif
|= [c=[@ @] d=[@ @]]
[(~(dif fo p.a) -.c -.d) (~(dif fo q.a) +.c +.d)]
::
++ exp
|= [c=@ d=[@ @]]
:- (~(exp fo p.a) (mod c (dec p.a)) -.d)
2013-09-29 00:21:18 +04:00
(~(exp fo q.a) (mod c (dec q.a)) +.d)
::
++ out :: garner's formula
|= c=[@ @]
%+ add
+.c
(mul q.a (~(pro fo p.a) b (~(dif fo p.a) -.c (~(sit fo p.a) +.c))))
::
++ pro
|= [c=[@ @] d=[@ @]]
[(~(pro fo p.a) -.c -.d) (~(pro fo q.a) +.c +.d)]
::
++ sum
|= [c=[@ @] d=[@ @]]
[(~(sum fo p.a) -.c -.d) (~(sum fo q.a) +.c +.d)]
::
++ sit
|= c=@
[(mod c p.a) (mod c q.a)]
--
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 3bB, cryptosuites ::
::
2014-05-09 04:13:25 +04:00
++ crua :: cryptosuite A (RSA)
2014-04-10 04:28:22 +04:00
^- acru
=| [mos=@ pon=(unit ,[p=@ q=@ r=[p=@ q=@] s=_*fu])]
=> |%
++ mx (dec (met 0 mos)) :: bit length
++ dap :: OEAP decode
|= [wid=@ xar=@ dog=@] ^- [p=@ q=@]
=+ pav=(sub wid xar)
=+ qoy=(cut 0 [xar pav] dog)
=+ dez=(mix (end 0 xar dog) (shaw %pad-b xar qoy))
[dez (mix qoy (shaw %pad-a pav dez))]
::
++ pad :: OEAP encode
|= [wid=@ rax=[p=@ q=@] meg=@] ^- @
=+ pav=(sub wid p.rax)
?> (gte pav (met 0 meg))
^- @
=+ qoy=(mix meg (shaw %pad-a pav q.rax))
=+ dez=(mix q.rax (shaw %pad-b p.rax qoy))
(can 0 [p.rax dez] [pav qoy] ~)
::
++ pull |=(a=@ (~(exp fo mos) 3 a))
++ push |=(a=@ (~(exp fo mos) 5 a))
++ pump
|= a=@ ^- @
?~ pon !!
(out.s.u.pon (exp.s.u.pon p.r.u.pon (sit.s.u.pon a)))
::
++ punt
|= a=@ ^- @
?~ pon !!
(out.s.u.pon (exp.s.u.pon q.r.u.pon (sit.s.u.pon a)))
--
|%
++ as
=> |%
2014-04-10 04:28:22 +04:00
++ haul :: revealing haul
|= a=pass
=+ [mag=(end 3 1 a) bod=(rsh 3 1 a)]
?> =('a' mag)
..as(mos bod, pon ~)
--
^?
|% ++ seal
|= [a=pass b=@ c=@]
^- @
=> .(c (sign b c))
=+ her=(haul a)
=+ det=(lte (add 256 (met 0 c)) mx.her)
=+ lip=?:(det c 0)
=- (add ?:(p.mav 0 1) (lsh 0 1 q.mav))
^= mav ^- [p=? q=@]
:- det
=+ dog=(pad mx.her [256 b] lip)
=+ hog=(push.her dog)
=+ ben=(en b c)
?:(det hog (jam hog ben))
++ sign
|= [a=@ b=@] ^- @
=- (add ?:(p.mav 0 1) (lsh 0 1 q.mav))
^= mav ^- [p=? q=@]
=+ det=(lte (add 128 (met 0 b)) mx)
:- det
=+ hec=(shaf (mix %agis a) b)
=+ dog=(pad mx [128 hec] ?:(det b 0))
=+ hog=(pump dog)
?:(det hog (jam hog b))
++ sure
|= [a=@ b=@]
^- (unit ,@)
=+ [det==(0 (end 0 1 b)) bod=(rsh 0 1 b)]
=+ gox=?:(det [p=bod q=0] ((hard ,[p=@ q=@]) (cue bod)))
=+ dog=(pull p.gox)
=+ pig=(dap mx 128 dog)
=+ log=?:(det q.pig q.gox)
?.(=(p.pig (shaf (mix %agis a) log)) ~ [~ log])
++ tear
|= [a=pass b=@]
^- (unit ,[p=@ q=@])
=+ her=(haul a)
=+ [det==(0 (end 0 1 b)) bod=(rsh 0 1 b)]
=+ gox=?:(det [p=bod q=0] ((hard ,[p=@ q=@]) (cue bod)))
=+ dog=(punt p.gox)
=+ pig=(dap mx 256 dog)
=+ ^= cow
^- (unit ,@)
?: det
2014-04-10 00:03:02 +04:00
[~ q.pig]
(de p.pig q.gox)
?~ cow ~
=> .(cow (sure:as.her p.pig u.cow))
?~ cow ~
[~ p.pig u.cow]
--
::
++ de
|+ [key=@ cep=@] ^- (unit ,@)
=+ toh=(met 8 cep)
?: (lth toh 2)
~
=+ adj=(dec toh)
=+ [hax=(end 8 1 cep) bod=(rsh 8 1 cep)]
=+ msg=(mix (~(raw og (mix hax key)) (mul 256 adj)) bod)
?. =(hax (shax (mix key (shax (mix adj msg)))))
~
[~ msg]
::
++ dy |+([a=@ b=@] (need (de a b)))
++ en
|+ [key=@ msg=@] ^- @ux
=+ len=(met 8 msg)
=+ adj=?:(=(0 len) 1 len)
=+ hax=(shax (mix key (shax (mix adj msg))))
(rap 8 hax (mix msg (~(raw og (mix hax key)) (mul 256 adj))) ~)
::
++ ex ^?
|% ++ fig ^- @uvH (shaf %afig mos)
++ pac ^- @uvG (end 6 1 (shaf %acod sec))
++ pub ^- pass (cat 3 'a' mos)
++ sec ^- ring ?~(pon !! (cat 3 'A' (jam p.u.pon q.u.pon)))
--
::
++ nu
=> |%
++ elcm
|= [a=@ b=@]
(div (mul a b) d:(egcd a b))
::
++ eldm
|= [a=@ b=@ c=@]
(~(inv fo (elcm (dec b) (dec c))) a)
::
++ ersa
|= [a=@ b=@]
[a b [(eldm 3 a b) (eldm 5 a b)] (fu a b)]
--
^?
|% ++ com
|= a=@
^+ ^?(..nu)
..nu(mos a, pon ~)
::
++ pit
|= [a=@ b=@]
=+ c=(rsh 0 1 a)
=+ [d=(ramp c [3 5 ~] b) e=(ramp c [3 5 ~] +(b))]
^+ ^?(..nu)
..nu(mos (mul d e), pon [~ (ersa d e)])
::
++ nol
|= a=@
^+ ^?(..nu)
=+ b=((hard ,[p=@ q=@]) (cue a))
..nu(mos (mul p.b q.b), pon [~ (ersa p.b q.b)])
--
--
2014-04-10 04:28:22 +04:00
++ bruw :: create keypair
|= [a=@ b=@] :: width seed
^- acru
(pit:nu:crua a b)
::
++ haul :: activate public key
|= a=pass
^- acru
=+ [mag=(end 3 1 a) bod=(rsh 3 1 a)]
?> =('a' mag)
(com:nu:crua bod)
::
++ weur :: activate secret key
|= a=ring
^- acru
=+ [mag=(end 3 1 a) bod=(rsh 3 1 a)]
?> =('A' mag)
(nol:nu:crua bod)
::
++ trua :: test rsa
|= msg=@tas
^- @
2014-04-10 04:28:22 +04:00
=+ ali=(bruw 1.024 (shax 'ali'))
=+ bob=(bruw 1.024 (shax 'bob'))
=+ tef=(sign:as.ali [0 msg])
=+ lov=(sure:as.ali [0 tef])
?. &(?=(^ lov) =(msg u.lov))
~|(%test-fail-sign !!)
=+ key=(shax (shax (shax msg)))
=+ sax=(seal:as.ali pub:ex.bob key msg)
=+ tin=(tear:as.bob pub:ex.ali sax)
?. &(?=(^ tin) =(key p.u.tin) =(msg q.u.tin))
~|(%test-fail-seal !!)
msg
2014-05-19 21:48:10 +04:00
::
++ crub !: :: cryptosuite B (Ed)
^- acru
=| [puc=pass sed=ring]
=> |%
++ dap :: OEAP decode
|= [wid=@ xar=@ dog=@] ^- [p=@ q=@]
=+ pav=(sub wid xar)
=+ qoy=(cut 0 [xar pav] dog)
=+ dez=(mix (end 0 xar dog) (shaw %pad-b xar qoy))
[dez (mix qoy (shaw %pad-a pav dez))]
::
++ pad :: OEAP encode
|= [wid=@ rax=[p=@ q=@] meg=@] ^- @
=+ pav=(sub wid p.rax)
?> (gte pav (met 0 meg))
^- @
=+ qoy=(mix meg (shaw %pad-a pav q.rax))
=+ dez=(mix q.rax (shaw %pad-b p.rax qoy))
(can 0 [p.rax dez] [pav qoy] ~)
--
|%
++ as
=> |%
++ haul :: revealing haul
|= a=pass
!!
--
^?
|% ++ seal
|= [a=pass b=@ c=@]
^- @
!!
++ sign
|= [a=@ b=@] ^- @
!!
++ sure
|= [a=@ b=@]
^- (unit ,@)
!!
++ tear
|= [a=pass b=@]
^- (unit ,[p=@ q=@])
!!
--
::
++ de
|+ [key=@ cep=@] ^- (unit ,@)
!!
::
++ dy
|+ [a=@ b=@] ^- @
!!
++ en
|+ [key=@ msg=@] ^- @ux
!!
::
++ ex ^?
|% ++ fig ^- @uvH (shaf %bfig puc)
++ pac ^- @uvG (end 6 1 (shaf %acod sec))
++ pub ^- pass (cat 3 'b' puc)
++ sec ^- ring sed
--
::
++ nu
^?
|% ++ com
|= a=@
^+ ^?(..nu)
2014-05-21 02:51:07 +04:00
..nu(sed ~, puc a)
2014-05-19 21:48:10 +04:00
::
++ pit
|= [a=@ b=@]
^+ ^?(..nu)
2014-05-21 02:51:07 +04:00
..nu(sed b, puc (puck:ed b))
2014-05-19 21:48:10 +04:00
::
++ nol
|= a=@
^+ ^?(..nu)
2014-05-21 02:51:07 +04:00
..nu(sed a, puc (puck:ed a))
2014-05-19 21:48:10 +04:00
--
--
++ brew :: create keypair
|= [a=@ b=@] :: width seed
^- acru
(pit:nu:crub a b)
::
++ hail :: activate public key
|= a=pass
^- acru
=+ [mag=(end 3 1 a) bod=(rsh 3 1 a)]
?> =('b' mag)
(com:nu:crub bod)
::
++ wear :: activate secret key
|= a=ring
^- acru
=+ [mag=(end 3 1 a) bod=(rsh 3 1 a)]
?> =('b' mag)
(nol:nu:crub bod)
::
++ trub :: test ed
|= msg=@tas
^- @
=+ ali=(brew 1.024 (shax 'ali'))
=+ bob=(brew 1.024 (shax 'bob'))
=+ tef=(sign:as.ali [0 msg])
=+ lov=(sure:as.ali [0 tef])
?. &(?=(^ lov) =(msg u.lov))
~|(%test-fail-sign !!)
=+ key=(shax (shax (shax msg)))
=+ sax=(seal:as.ali pub:ex.bob key msg)
=+ tin=(tear:as.bob pub:ex.ali sax)
?. &(?=(^ tin) =(key p.u.tin) =(msg q.u.tin))
~|(%test-fail-seal !!)
msg
2013-09-29 00:21:18 +04:00
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2014-04-19 07:27:19 +04:00
:: section 3bC, UTC :: Gregorian only
::
++ dawn :: Jan 1 weekday
|= yer=@ud
=+ yet=(sub yer 1)
%- mod :_ 7
:(add 1 (mul 5 (mod yet 4)) (mul 4 (mod yet 100)) (mul 6 (mod yet 400)))
2014-04-19 07:27:19 +04:00
::
++ daws :: date weekday
|= yed=date
%- mod :_ 7
(add (dawn y.yed) (sub (yawn [y.yed m.yed d.t.yed]) (yawn y.yed 1 1)))
::
2014-04-19 07:27:19 +04:00
++ deal :: to leap sec time
|= yer=@da
=+ n=0
=+ yud=(yore yer)
|- ^- date
?: (gte yer (add (snag n lef:yu) ~s1))
(yore (year yud(s.t (add n s.t.yud))))
?: &((gte yer (snag n lef:yu)) (lth yer (add (snag n lef:yu) ~s1)))
yud(s.t (add +(n) s.t.yud))
?: =(+(n) (lent lef:yu))
(yore (year yud(s.t (add +(n) s.t.yud))))
$(n +(n))
::
++ lead :: from leap sec time
|= ley=date
=+ ler=(year ley)
=+ n=0
|- ^- @da
=+ led=(sub ler (mul n ~s1))
?: (gte ler (add (snag n les:yu) ~s1))
led
?: &((gte ler (snag n les:yu)) (lth ler (add (snag n les:yu) ~s1)))
?: =(s.t.ley 60)
(sub led ~s1)
led
?: =(+(n) (lent les:yu))
(sub led ~s1)
$(n +(n))
::
++ dust :: print UTC format
|= yed=date
^- tape
=+ wey=(daws yed)
;: weld
`tape`(snag wey (turn wik:yu |=(a=tape (scag 3 a))))
", " ~(rud at d.t.yed) " "
2014-04-19 07:27:19 +04:00
`tape`(snag (dec m.yed) (turn mon:yu |=(a=tape (scag 3 a))))
" " (scag 1 ~(rud at y.yed)) (slag 2 ~(rud at y.yed)) " "
~(rud at h.t.yed) ":" ~(rud at m.t.yed) ":" ~(rud at s.t.yed)
2014-04-19 07:27:19 +04:00
" " "+0000"
==
::
++ stud :: parse UTC format
|= cut=tape
^- date
=+ ^= tuc
%+ scan cut
;~ plug
2014-04-19 07:27:19 +04:00
;~(pfix (stun [5 5] next) dim:ag)
%+ cook
|= a=tape
2014-04-19 07:27:19 +04:00
=+ b=0
|- ^- @
?: =(a (snag b (turn mon:yu |=(a=tape (scag 3 a)))))
2014-04-21 22:11:13 +04:00
+(b)
2014-04-19 07:27:19 +04:00
$(b +(b))
(ifix [ace ace] (star alf))
;~(sfix dim:ag ace) ;~(sfix dim:ag col)
2014-04-19 07:27:19 +04:00
;~(sfix dim:ag col) dim:ag (cold ~ (star next))
==
[[%.y &3.tuc] &2.tuc &1.tuc &4.tuc &5.tuc &6.tuc ~]
::
++ yu :: UTC format constants
|%
2014-04-19 07:27:19 +04:00
++ mon ^- (list tape)
:~ "January" "February" "March" "April" "May" "June" "July"
"August" "September" "October" "November" "December"
==
::
++ wik ^- (list tape)
:~ "Sunday" "Monday" "Tuesday" "Wednesday" "Thursday"
"Friday" "Saturday"
2014-04-19 07:27:19 +04:00
==
::
++ les ^- (list ,@da)
:~ ~2012.7.1 ~2009.1.1 ~2006.1.1 ~1999.1.1 ~1997.7.1 ~1996.1.1
~1994.7.1 ~1993.7.1 ~1992.7.1 ~1991.1.1 ~1990.1.1 ~1988.1.1
~1985.7.1 ~1983.7.1 ~1982.7.1 ~1981.7.1 ~1980.1.1 ~1979.1.1
~1978.1.1 ~1977.1.1 ~1976.1.1 ~1975.1.1 ~1974.1.1 ~1973.1.1
~1972.7.1
2014-04-19 07:27:19 +04:00
==
++ lef ^- (list ,@da)
:~ ~2012.6.30..23.59.59 ~2008.12.31..23.59.58
2014-04-19 07:27:19 +04:00
~2005.12.31..23.59.57 ~1998.12.31..23.59.56
~1997.6.30..23.59.55 ~1995.12.31..23.59.54
~1994.6.30..23.59.53 ~1993.6.30..23.59.52
~1992.6.30..23.59.51 ~1990.12.31..23.59.50
~1989.12.31..23.59.49 ~1987.12.31..23.59.48
~1985.6.30..23.59.47 ~1983.6.30..23.59.46
~1982.6.30..23.59.45 ~1981.6.30..23.59.44
~1979.12.31..23.59.43 ~1978.12.31..23.59.42
~1977.12.31..23.59.41 ~1976.12.31..23.59.40
~1975.12.31..23.59.39 ~1974.12.31..23.59.38
~1973.12.31..23.59.37 ~1972.12.31..23.59.36
2014-04-19 07:27:19 +04:00
~1972.6.30..23.59.35
==
--
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 3bD, JSON and XML ::
2013-09-29 00:21:18 +04:00
::
++ moon :: mime type to text
2014-03-13 05:04:58 +04:00
|= myn=mite
2013-09-29 00:21:18 +04:00
%+ rap
3
|- ^- tape
?~ myn ~
2013-12-24 00:49:15 +04:00
?: =(~ t.myn) (trip i.myn)
(weld (trip i.myn) `tape`['/' $(myn t.myn)])
2014-04-15 21:32:48 +04:00
::
++ poja :: parse JSON
2014-01-22 03:14:05 +04:00
|%
2014-04-16 23:47:41 +04:00
++ apex :: JSON object
;~(pose abox obox)
++ valu :: JSON value
2014-02-12 14:53:12 +04:00
%+ knee *jval |. ~+
;~ pfix spac
2014-01-22 03:14:05 +04:00
;~ pose
2014-02-12 14:53:12 +04:00
(cold ~ (jest 'null'))
(jify %b bool)
(jify %s stri)
(cook |=(s=tape [%n p=(rap 3 s)]) numb)
abox
obox
2014-01-22 03:14:05 +04:00
==
2014-02-12 14:53:12 +04:00
==
:: JSON arrays
++ arra (ifix [sel (ws ser)] (more (ws com) valu))
++ abox (cook |=(elts=(list jval) [%a p=elts]) arra)
:: JSON objects
++ pair ;~((comp |=([k=@ta v=jval] [k v])) ;~(sfix (ws stri) (ws col)) valu)
++ obje (ifix [(ws kel) (ws ker)] (more (ws com) pair))
++ obox (cook |=(s=(list ,[@ta jval]) [%o p=(mo s)]) obje)
:: JSON booleans
++ bool ;~(pose (cold & (jest 'true')) (cold | (jest 'false')))
:: JSON strings
++ stri
(cook |=(s=(list ,@) (rap 3 s)) (ifix [doq doq] (star jcha)))
++ jcha :: character in string
;~ pose
esca
;~ pose
:: Non-escape string characters
(shim 32 33)
(shim 35 91)
(shim 93 126)
(shim 128 255)
2014-01-22 03:14:05 +04:00
==
2014-02-12 14:53:12 +04:00
==
++ esca :: Escaped character
;~ pfix bas
;~ pose
doq
fas
soq
bas
(cold 8 (just 'b'))
(cold 9 (just 't'))
(cold 10 (just 'n'))
(cold 12 (just 'f'))
(cold 13 (just 'r'))
;~(pfix (just 'u') (cook tuft qix:ab)) :: Convert 4-digit hex to UTF-8
2014-01-22 03:14:05 +04:00
==
2014-02-12 14:53:12 +04:00
==
:: JSON numbers
++ numb
;~ (comp twel)
(mayb (piec hep))
;~ pose
(piec (just '0'))
;~((comp twel) (piec (shim '1' '9')) digs)
2014-01-22 03:14:05 +04:00
==
2014-02-12 14:53:12 +04:00
(mayb frac)
(mayb expo)
==
++ digs (star (shim '0' '9'))
++ expo :: Exponent part
;~ (comp twel)
(piec (mask "eE"))
(mayb (piec (mask "+-")))
digs
==
++ frac :: Fractional part
;~ (comp twel)
(piec dot)
digs
==
:: whitespace
++ spac (star (mask [`@`9 `@`10 `@`13 ' ' ~]))
++ ws |*(sef=_rule ;~(pfix spac sef))
:: plumbing
++ jify |*([t=@ta r=_rule] (cook |*([v=*] [t p=v]) r))
++ mayb |*(bus=_rule ;~(pose bus (easy "")))
++ twel |=([a=tape b=tape] (weld a b))
++ piec
2014-04-15 21:32:48 +04:00
|* bus=_rule
(cook |=(a=@ [a ~]) bus)
--
2013-09-29 00:21:18 +04:00
::
++ pojo :: print json
|= val=jval
^- tape
?~ val "null"
?- -.val
%a
;: weld
"["
=| rez=tape
|- ^+ rez
?~ p.val rez
$(p.val t.p.val, rez :(weld rez ^$(val i.p.val) ?~(t.p.val ~ ",")))
"]"
==
::
%b ?:(p.val "true" "false")
%n (trip p.val)
2014-02-12 14:53:12 +04:00
%s
;: weld
"\""
%+ reel
(turn (trip p.val) jesc)
=| [p=tape q=tape]
|.((weld p q))
"\""
==
2013-09-29 00:21:18 +04:00
%o
;: weld
"\{"
=+ viz=(~(tap by p.val) ~)
=| rez=tape
|- ^+ rez
?~ viz rez
%= $
viz t.viz
rez
:(weld rez "\"" (trip p.i.viz) "\":" ^$(val q.i.viz) ?~(t.viz ~ ","))
==
"}"
==
==
2014-04-15 21:32:48 +04:00
::
++ joba
|= [p=@t q=jval]
^- json
[%o [[p q] ~ ~]]
::
++ jobe
|= a=(list ,[p=@t q=jval])
^- json
[%o (~(gas by *(map ,@t jval)) a)]
::
2014-04-16 04:49:11 +04:00
++ jape
|= a=tape
^- jval
[%s (crip a)]
::
++ jone
2014-02-12 14:53:12 +04:00
|= a=@
2014-04-16 04:49:11 +04:00
^- jval
:- %n
?: =(0 a) '0'
(crip (flop |-(^-(tape ?:(=(0 a) ~ [(add '0' (mod a 10)) $(a (div a 10))])))))
::
++ jesc
|= a=@ ^- tape
?.(=(10 a) [a ~] "\\n")
2014-03-23 01:42:25 +04:00
::
++ taco :: atom to octstream
|= tam=@ ^- octs
[(met 3 tam) tam]
2013-09-29 00:21:18 +04:00
::
++ tact :: tape to octstream
|= tep=tape ^- octs
2014-03-23 01:42:25 +04:00
(taco (rap 3 tep))
2013-09-29 00:21:18 +04:00
::
2014-03-12 23:50:39 +04:00
++ tell :: wall to octstream
|= wol=wall ^- octs
=+ buf=(rap 3 (turn wol |=(a=tape (crip (weld a `tape`[`@`10 ~])))))
[(met 3 buf) buf]
::
2013-09-29 00:21:18 +04:00
++ txml :: string to xml
|= tep=tape ^- manx
[[%$ [%$ tep] ~] ~]
::
++ xmla :: attributes to tape
|= [tat=mart rez=tape]
^- tape
?~ tat rez
=+ ryq=$(tat t.tat)
2014-04-03 05:06:45 +04:00
:(weld (xmln n.i.tat) "=\"" (xmle | v.i.tat '"' ?~(t.tat ryq [' ' ryq])))
2013-09-29 00:21:18 +04:00
::
++ xmle :: escape for xml
2014-04-03 05:06:45 +04:00
|= [unq=? tex=tape rez=tape]
?: unq
2014-04-05 23:04:05 +04:00
(weld tex rez)
2013-09-29 00:21:18 +04:00
=+ xet=`tape`(flop tex)
|- ^- tape
?~ xet rez
%= $
xet t.xet
rez ?- i.xet
34 ['&' 'q' 'u' 'o' 't' ';' rez]
38 ['&' 'a' 'm' 'p' ';' rez]
2014-04-03 05:06:45 +04:00
39 ['&' '#' '3' '9' ';' rez]
2013-09-29 00:21:18 +04:00
60 ['&' 'l' 't' ';' rez]
62 ['&' 'g' 't' ';' rez]
* [i.xet rez]
==
==
::
++ xmln :: name to tape
|= man=mane ^- tape
?@ man (trip man)
2013-12-24 00:49:15 +04:00
(weld (trip -.man) `tape`[':' (trip +.man)])
2013-09-29 00:21:18 +04:00
::
2014-04-03 05:06:45 +04:00
++ xmll :: nodelist to tape
|= [unq=? lix=(list manx) rez=tape]
2013-09-29 00:21:18 +04:00
|- ^- tape
2014-04-03 05:06:45 +04:00
?~ lix rez
(xmlt unq i.lix $(lix t.lix))
2013-09-29 00:21:18 +04:00
::
++ xmlt :: node to tape
2014-04-03 05:06:45 +04:00
|= [unq=? mex=manx rez=tape]
2013-09-29 00:21:18 +04:00
^- tape
2014-03-20 05:05:42 +04:00
=> .(mex `mano`?^(mex mex [mex ~]))
2014-04-03 05:06:45 +04:00
?: ?=([%$ [[%$ *] ~]] g.mex)
(xmle unq v.i.a.g.mex rez)
=+ man=`mane`?@(g.mex g.mex -.g.mex)
2014-04-05 23:04:05 +04:00
=. unq |(unq =(%script man) =(%style man))
2013-09-29 00:21:18 +04:00
=+ tam=(xmln man)
=+ end=:(weld "</" tam ">" rez)
2014-04-03 05:06:45 +04:00
=+ bod=['>' (xmll unq c.mex :(weld "</" tam ">" rez))]
=+ att=`mart`?@(g.mex ~ a.g.mex)
2013-09-29 00:21:18 +04:00
:- '<'
%+ weld tam
2013-12-24 00:49:15 +04:00
`_tam`?~(att bod [' ' (xmla att bod)])
2013-09-29 00:21:18 +04:00
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2014-04-19 07:27:19 +04:00
:: section 3bE, tree sync ::
2013-09-29 00:21:18 +04:00
::
++ cure :: invert miso
|= mis=miso
?- -.mis
%del [%ins p.mis]
%ins [%del p.mis]
%mut [%mut (limp p.mis)]
==
::
++ curl :: invert soba
|= doz=soba
:- [q.p.doz p.p.doz]
2013-09-29 00:21:18 +04:00
(turn (flop q.doz) |=([a=path b=miso] [a (cure b)]))
::
++ cosh :: locally rehash
|= ank=ankh
ank(p dash:(zu ank))
::
++ cost :: new external patch
|= [bus=ankh ank=ankh]
^- soba
[[p.ank p.bus] (flop myz:(dist:(zu ank) %c bus))]
::
++ ze !:
|_ [lim=@da dome]
2013-09-29 00:21:18 +04:00
++ aeon :: aeon:ze
|= lok=case :: act count through
2013-09-29 00:21:18 +04:00
^- (unit ,@ud)
?- -.lok
%da
?: (gth p.lok lim) ~
2013-09-29 00:21:18 +04:00
|- ^- (unit ,@ud)
?~ hit [~ let]
?: (gte p.lok p.i.hit) [~ let]
$(hit t.hit, let (dec let))
::
2013-09-29 00:21:18 +04:00
%tas (~(get by lab) p.lok)
%ud ?:((gth p.lok let) ~ [~ p.lok])
==
::
++ ache :: ache:ze
^- arch :: arch report
:+ p.ank
?~(q.ank ~ [~ p.u.q.ank])
|- ^- (map ,@ta ,~)
?~ r.ank ~
[[p.n.r.ank ~] $(r.ank l.r.ank) $(r.ank r.r.ank)]
::
++ acai :: acai:ze
|= mus=masu :: inverse trout
[p.mus q.mus [q.r.mus p.r.mus] [q.s.mus p.s.mus]]
::
2013-09-29 00:21:18 +04:00
++ acid :: acid:ze
|= oan=@ud :: invert to
^- (list tako)
2013-09-29 00:21:18 +04:00
=+ mar=(scag (sub let oan) hit)
(alar (adze (turn mar |=([a=@da b=nori] b))))
2013-09-29 00:21:18 +04:00
::
++ adze :: adze:ze
|= may=(list nori) :: reverse nori
2013-09-29 00:21:18 +04:00
%- flop
|- ^- (list nori)
2013-09-29 00:21:18 +04:00
?~ may ~
=+ yam=$(may t.may)
?- -.i.may
& [[%& (bind p.i.may acai) (curl q.i.may)] yam]
| yam
2013-09-29 00:21:18 +04:00
==
::
++ alar :: alar:ze
|= may=(list nori) :: nori to tako
^- (list tako)
2013-09-29 00:21:18 +04:00
?~ may ~
?- -.i.may
& (weld q.q.i.may $(may t.may))
| $(may t.may)
2013-09-29 00:21:18 +04:00
==
::
++ alba :: alba:ze
|= hoe=(list tako) :: deconstruct
|- ^- (map path (list udon))
?~ hoe ~
=+ hom=$(hoe t.hoe)
%+ ~(put by hom) p.i.hoe
=+ vue=(~(get by hom) p.i.hoe)
[?>(?=(%mut -.q.i.hoe) p.q.i.hoe) ?~(vue ~ u.vue)]
::
++ aloe :: aloe:ze
|= yop=(map path (list udon)) :: reconstruct
^- (list tako)
=+ puy=(~(tap by yop) ~)
|- ^- (list tako)
?~ puy ~
(weld (turn q.i.puy |=(a=udon [p.i.puy %mut a])) $(puy t.puy))
::
++ alto :: alto:ze
|= $: yop=(map path (list udon)) :: yop before peq
peq=(map path (list udon))
==
=+ puy=(~(tap by yop) ~)
|- ^+ peq
?~ puy peq
%= $
puy t.puy
peq
=+ peb=(~(get by peq) p.i.puy)
?~ peb peq
(~(put by peq) p.i.puy (lyre q.i.puy u.peb))
==
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
++ lisp :: transform urge
2013-12-21 06:35:33 +04:00
|* wig=(urge)
|= dog=woof
2013-12-14 00:52:06 +04:00
^+ [p=dog q=wig]
?~ wig [~ ~]
?: =([%& 0] i.wig) $(wig t.wig)
?~ dog
?- -.i.wig
& $(dog [p.i.wig ~])
| $(dog [(lent p.i.wig) ~])
==
?@ i.dog
?: =(0 i.dog) $(dog t.dog)
?- -.i.wig
&
?: (lth i.dog p.i.wig)
=+ mol=$(dog t.dog, p.i.wig (sub p.i.wig i.dog))
[[i.dog p.mol] [[%& i.dog] q.mol]]
=+ mol=$(i.dog (sub i.dog p.i.wig), wig t.wig)
[[p.i.wig p.mol] [[%& p.i.wig] q.mol]]
::
|
=+ leg=(lent p.i.wig)
?> (gte i.dog leg)
=+ mol=$(i.dog (sub i.dog leg), wig t.wig)
:- `woof`[`[@ @]`[leg (lent q.i.wig)] `woof`p.mol]
2013-12-14 00:52:06 +04:00
^+(wig [i.wig q.mol])
==
?> ?=(& -.i.wig)
?> (gte p.i.wig -.i.dog)
=+ mol=$(dog t.dog, p.i.wig (sub p.i.wig -.i.dog))
[[i.dog p.mol] [[%& +.i.dog] q.mol]]
::
++ lith :: initial transform
|= wig=(urge)
^- woof
=+ wug=((lisp wig) *woof)
?>(=(wig q.wug) p.wug)
::
++ lobe :: udonous urge
|= [ump=umph heb=(list (urge))]
^- (list udon)
(turn heb |=(a=(urge) `udon`[ump %c a]))
::
++ lobo :: urgey udon
|= [ump=umph yeb=(list udon)]
^- (list (urge))
(turn yeb |=(a=udon ?>(&(=(ump p.a) ?=(%c -.q.a)) p.q.a)))
::
++ loch :: put wof before weq
|= [wof=woof weq=(list (urge))]
^- (list (urge))
|- ^+ weq
?~ weq ~
=+ wug=((lisp i.weq) wof)
[q.wug $(weq t.weq, wof p.wug)]
::
++ loup :: put heb before weq
|= [heb=(list (urge)) weq=(list (urge))]
^- (list (urge))
?~ heb weq
?~ weq heb
?: =(i.heb i.weq) $(heb t.heb, weq t.weq)
$(heb t.heb, weq (loch (lith i.heb) weq))
::
++ lyre :: put yeb before zeq
|= [yeb=(list udon) zeq=(list udon)]
^- (list udon)
?~ yeb zeq
?~ zeq yeb
?: =(i.yeb i.zeq) $(yeb t.yeb, zeq t.zeq)
=+ ump=p.i.yeb
(lobe ump (loup (lobo ump yeb) (lobo ump zeq)))
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2013-09-29 00:21:18 +04:00
++ amor :: amor:ze
|= ren=?(%v %x %y %z) :: endpoint query
^- (unit ,*)
?- ren
%v [~ `dome`+<+.amor]
2013-09-29 00:21:18 +04:00
%x ?~(q.ank ~ [~ q.u.q.ank])
%y [~ ache]
%z [~ ank]
2013-09-29 00:21:18 +04:00
==
::
++ ante :: ante:ze
|= lem=nori :: rewind by change
2013-09-29 00:21:18 +04:00
^+ +>
?- -.lem
& (avon:(anti q.lem) (bind p.lem acai))
| +>(lab (~(del by lab) p.lem))
2013-09-29 00:21:18 +04:00
==
::
++ anti :: axon:ze
|= nyp=soba :: reverse axon
^+ +>
+>(ank ank:(dusk:(zu ank) nyp))
::
2013-09-29 00:21:18 +04:00
++ argo :: argo:ze
|= oan=@ud :: rewind to aeon
^+ +>
?: =(let oan) +>
=+ lem=?>(?=(^ hit) q.i.hit)
=: let (dec let)
2013-12-24 00:49:15 +04:00
hit ?>(?=(^ hit) t.hit)
==
$(+> (ante lem))
::
++ arum :: arum:ze
|= [tak=(list tako) kat=(list tako)] :: hard merge
(aloe (alto (alba tak) (alba kat)))
2013-09-29 00:21:18 +04:00
::
++ auld :: auld:ze
|= [wen=@da gem=germ sab=saba] :: construct merge
^- (unit (unit nori)) ::::::
2013-09-29 00:21:18 +04:00
=+ ^= viq ^- [p=@ud q=@ud] ::
=+ viq=(~(get by ang) [p.sab q.sab]) ::
?~(viq [0 0] u.viq) ::
=. sab ::
?: =(q.viq p.r.sab) sab :: perfect motion
?> (gth q.viq p.r.sab) :: proper motion
%= sab ::
p.r q.viq ::
s (slag (sub q.viq p.r.sab) s.sab) ::
== ::
?~ s.sab [~ ~]
=+ ^= mus ^- masu
[p.sab q.sab [p.viq +(let)] [q.viq q.r.sab]]
:: ~& [%auld p.mus q.mus [%too r.mus] [%fro s.mus]]
=+ kat=(alar s.sab)
2013-12-24 00:49:15 +04:00
=+ lem=[%& p=[~ mus] q=`soba`[_[@ @] kat]]
?: =(let p.viq)
:: ~& [%nice let]
[~ ~ lem] :: perfect fit
=+ paj=(axel:(argo p.viq) wen lem) :: XX !!
2013-09-29 00:21:18 +04:00
?: =(ank.paj ank) ::
:: ~& [%same [let p.viq]]
[~ ~ lem(q.q ~)]
=+ ^= tak
%- alar %- flop
%+ turn (scag (sub let p.viq) hit)
|=(a=frog q.a)
=+ tig=(mang [arum tak kat] |=(* *(unit)))
?^ tig [~ ~ lem(q.q ((hard (list tako)) u.tig))]
?- gem
%fine ~ :: nothing perfect
%mate ~|(%mate-stub !!) :: not supported
%that [~ ~ lem(q.q (weld (acid p.viq) q.q.lem))]
%this [~ ~ lem(q.q ~)]
==
2013-09-29 00:21:18 +04:00
::
++ auto :: auto:ze
|= mun=mood :: read at point
^- (unit)
?: ?=(%v p.mun)
[~ `dome`+<+.auto]
2013-09-29 00:21:18 +04:00
?: &(?=(%w p.mun) !?=(%ud -.q.mun))
?^(r.mun ~ [~ let])
?: ?=(%w p.mun)
?> ?=(^ hit) ?^(r.mun ~ [~ i.hit])
(amor(ank ank:(deny:(zu ank) r.mun)) p.mun)
::
++ aver :: aver:ze
|= mun=mood :: direct read
^- (unit (unit ,*))
=+ nao=(aeon q.mun)
?~(nao ~ [~ (avid u.nao mun)])
::
++ avid :: avid:ze
2013-09-29 00:21:18 +04:00
|= [oan=@ud mun=mood] :: seek and read
^- (unit)
?: &(?=(%w p.mun) !?=(%ud -.q.mun)) :: NB only for speed
?^(r.mun ~ [~ oan])
(auto:(argo oan) mun)
::
++ avon :: avon:ze
|= mys=(unit masu) :: apply trout
^+ +>
?~ mys +>
=+ [yek=[p.u.mys q.u.mys] det=[q.r.u.mys q.s.u.mys]]
=+ guf=(~(get by ang) yek)
=+ ted=`moar`?~(guf [0 0] u.guf)
?> &(=(p.ted p.r.u.mys) =(q.ted p.s.u.mys))
+>.$(ang ?:(=([0 0] det) (~(del by ang) yek) (~(put by ang) yek det)))
::
2013-09-29 00:21:18 +04:00
++ axel :: axel:ze
|= [wen=@da lem=nori] :: edit
2013-09-29 00:21:18 +04:00
^+ +>
=: let +(let)
hit :_(hit [wen lem])
==
?- -.lem
& (avon:(axon q.lem) p.lem)
| +>(lab ?<((~(has by lab) p.lem) (~(put by lab) p.lem let)))
2013-09-29 00:21:18 +04:00
==
::
++ axon :: axon:ze
|= nyp=soba :: apply changes
^+ +>
+>(ank ank:(durn:(zu ank) nyp))
2013-09-29 00:21:18 +04:00
--
::
++ zu !: :: filesystem
|= ank=ankh :: filesystem state
=| myz=(list ,[p=path q=miso]) :: changes in reverse
=| ram=path :: reverse path into
|%
++ dash :: local rehash
^- cash
%+ mix ?~(q.ank 0 p.u.q.ank)
=+ axe=1
|- ^- cash
2013-12-17 08:48:40 +04:00
?~ r.ank _@
2013-09-29 00:21:18 +04:00
;: mix
(shaf %dash (mix axe (shaf %dush (mix p.n.r.ank p.q.n.r.ank))))
$(r.ank l.r.ank, axe (peg axe 2))
$(r.ank r.r.ank, axe (peg axe 3))
==
::
++ dosh %_(. p.ank dash) :: rehash and save
++ dose :: ascend
|= [lol=@ta kan=ankh]
^+ +>
?> &(?=(^ ram) =(lol i.ram))
%= +>
ram t.ram
ank
2013-09-29 00:21:18 +04:00
?: =([0 ~ ~] ank)
?. (~(has by r.kan) lol) kan
kan(r (~(del by r.kan) lol))
kan(r (~(put by r.kan) lol ank))
==
::
++ deaf :: add change
|= mis=miso
^+ +>
+>(myz [[(flop ram) mis] myz])
::
++ dent :: descend
|= lol=@ta
^+ +>
=+ you=(~(get by r.ank) lol)
+>.$(ram [lol ram], ank ?~(you [*cash ~ ~] u.you))
::
++ deny :: descend recursively
|= way=path
^+ +>
?~(way +> $(way t.way, +> (dent i.way)))
::
++ dest :: write over
|= [pum=umph val=(unit ,[p=cash q=*])]
^+ +>
?~ q.ank
?~ val +>
(deaf %ins q.u.val)
?~ val
(deaf %del q.u.q.ank)
?: =(q.u.val q.u.q.ank) +>
(deaf %mut ((diff pum) q.u.q.ank q.u.val))
::
++ dist :: modify tree
|= [pum=umph bus=ankh]
^+ +>
=. +> (dest pum q.bus)
=+ [yeg=(~(tap by r.ank) ~) gey=(~(tap by r.bus) ~)]
=. +>.$
|- ^+ +>.^$
?~ yeg +>.^$
?: (~(has by r.bus) p.i.yeg) $(yeg t.yeg)
$(yeg t.yeg, myz myz:dirk(ank q.i.yeg, ram [p.i.yeg ram]))
|- ^+ +>.^$
?~ gey +>.^$
$(gey t.gey, myz myz:^$(bus q.i.gey, +> (dent p.i.gey)))
::
++ dirk :: rm -r
|- ^+ +
=. + ?~(q.ank + (deaf %del q.u.q.ank))
=+ dyr=(~(tap by r.ank) ~)
|- ^+ +.^$
?~ dyr +.^$
=. +.^$ dirk:(dent p.i.dyr)
$(dyr t.dyr)
::
++ drum :: apply effect
|= [pax=path mis=miso]
^+ +>
?^ pax
2013-09-29 00:21:18 +04:00
dosh:(dose:$(pax t.pax, +> (dent i.pax)) i.pax ank)
?- -.mis
%del
?> &(?=(^ q.ank) =(q.u.q.ank p.mis))
+>.$(p.ank (mix p.u.q.ank p.ank), q.ank ~)
::
%ins
?> ?=(~ q.ank)
=+ sam=(sham p.mis)
+>.$(p.ank (mix sam p.ank), q.ank [~ sam p.mis])
::
%mut
?> ?=(^ q.ank)
=+ nex=(lump p.mis q.u.q.ank)
=+ sam=(sham nex)
+>.$(p.ank :(mix sam p.u.q.ank p.ank), q.ank [~ sam nex])
==
::
2013-09-29 00:21:18 +04:00
++ dune :: apply
|- ^+ +
?~ myz +
=> .(+ (drum p.i.myz q.i.myz))
2013-12-24 00:49:15 +04:00
$(myz ?>(?=(^ myz) t.myz))
2013-09-29 00:21:18 +04:00
::
++ durn :: apply forward
|= nyp=soba
^+ +>
?: =([0 0] p.nyp)
dune(myz q.nyp)
2013-09-29 00:21:18 +04:00
=> ?: =(p.ank p.p.nyp) .
~& [%durn-in-wrong p.ank p.p.nyp]
2013-09-29 00:21:18 +04:00
.
:: ?> =(p.ank p.p.nyp)
=. +> dune(myz q.nyp)
=> ?: =(p.ank q.p.nyp) .
~& [%durn-out-wrong p.ank q.p.nyp]
2013-09-29 00:21:18 +04:00
.
+>
::
++ dusk :: apply reverse
|= nyp=soba
(durn (curl nyp))
--
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2014-04-19 07:27:19 +04:00
:: section 3bF, names etc ::
2013-09-29 00:21:18 +04:00
::
++ clan :: ship to rank
|= who=ship ^- rank
=+ wid=(met 3 who)
?: (lte wid 1) %czar
?: =(2 wid) %king
?: (lte wid 4) %duke
?: (lte wid 8) %earl
?> (lte wid 16) %pawn
2013-09-29 00:21:18 +04:00
::
++ deft :: import url path
|= rax=(list ,@t)
|- ^- pork
?~ rax
[~ ~]
?~ t.rax
=+ den=(trip i.rax)
=+ ^= vex
%- %- full
;~(plug sym ;~(pose (stag ~ ;~(pfix dot sym)) (easy ~)))
[[1 1] (trip i.rax)]
?~ q.vex
2014-03-04 02:47:59 +04:00
[~ [i.rax ~]]
2013-09-29 00:21:18 +04:00
[+.p.u.q.vex [-.p.u.q.vex ~]]
=+ pok=$(rax t.rax)
:- p.pok
2014-03-04 02:47:59 +04:00
[i.rax q.pok]
2013-09-29 00:21:18 +04:00
::
2014-04-21 21:02:09 +04:00
++ gist :: convenient html
2014-04-09 02:26:01 +04:00
|= yax=$+(epic marl)
%- give
|= piq=epic
^- manx
2014-04-09 02:26:01 +04:00
=+ ^= sip
|= mal=marl
2014-04-09 02:26:01 +04:00
?~(mal ~ ?.(|(=(:/(~) i.mal) =(:/([10 ~]) i.mal)) mal $(mal t.mal)))
=+ zay=`marl`(yax piq)
=. zay (sip zay)
=+ ^= twa
|- ^- [p=marl q=marl]
?~ zay [~ ~]
?: ?=([[[%head *] *] *] zay)
[c.i.zay ?:(?=([[[%body *] *] ~] t.zay) c.i.t.zay t.zay)]
?: ?=([[[%title *] *] *] zay)
[[i.zay ~] t.zay]
[~ zay]
2014-04-10 03:51:19 +04:00
[/html [/head (sip p.twa)] [/body (sip q.twa)] ~]
2014-04-09 02:26:01 +04:00
::
2014-03-26 04:48:22 +04:00
++ give !: :: web synthesizer
|* yax=$+(epic *)
2014-03-20 05:05:42 +04:00
|= [for=@tas pre=path suf=path but=path]
?> ?=([@ *] but)
=+ dyb=(slay i.but)
?> ?& ?=([~ %many *] dyb)
2014-03-26 04:48:22 +04:00
?=([* * *] p.u.dyb)
?=([%$ %tas *] i.p.u.dyb)
?=([%blob *] i.t.p.u.dyb)
2014-03-20 05:05:42 +04:00
==
2014-03-26 04:48:22 +04:00
=+ nep=q.p.i.p.u.dyb
=+ ced=((hard cred) p.i.t.p.u.dyb)
2014-03-20 05:05:42 +04:00
=+ ^= gut ^- (list ,@t)
2014-03-26 04:48:22 +04:00
%+ turn t.t.p.u.dyb
2014-03-20 05:05:42 +04:00
|= a=coin ^- @t
?> ?=([%$ %t @] a)
?>(((sane %t) q.p.a) q.p.a)
=+ ^= quy
2014-03-20 05:05:42 +04:00
|- ^- (list ,[p=@t q=@t])
?~ gut ~
?> ?=(^ t.gut)
[[i.gut i.t.gut] $(gut t.t.gut)]
?> ?=([@ @ @ ~] pre)
%- yax
:* quy
(need (slaw %p i.pre))
2014-03-20 05:05:42 +04:00
ced
pre
suf
2014-03-20 05:05:42 +04:00
t.but
for
2014-03-26 04:48:22 +04:00
nep
2014-03-20 05:05:42 +04:00
==
::
2014-04-21 21:02:09 +04:00
++ urle :: URL encode
|= tep=tape
^- tape
?~ tep ~
=+ nex=$(tep t.tep)
=+ xen=|=(tig=@ ?:((gte tig 10) (add tig 55) (add tig '0')))
2014-04-21 21:02:09 +04:00
?: ?| &((gte i.tep 'a') (lte i.tep 'z'))
&((gte i.tep 'A') (lte i.tep 'Z'))
&((gte i.tep '0') (lte i.tep '9'))
=('.' i.tep)
=('-' i.tep)
=('~' i.tep)
=('_' i.tep)
==
[i.tep nex]
['%' (xen (rsh 0 4 i.tep)) (xen (end 0 4 i.tep)) nex]
2014-04-21 21:02:09 +04:00
::
++ urld :: URL decode
|= tep=tape
^- (unit tape)
?~ tep [~ ~]
?: =('%' i.tep)
?. ?=([@ @ *] t.tep) ~
=+ nag=(mix i.t.tep (lsh 3 1 i.t.t.tep))
=+ val=(rush nag hex:ag)
?~ val ~
=+ nex=$(tep t.t.t.tep)
?~(nex ~ [~ [`@`u.val u.nex]])
=+ nex=$(tep t.tep)
?~(nex ~ [~ i.tep u.nex])
::
++ earl :: local purl to tape
|= [who=@p pul=purl]
^- purl
pul(q.q [(rsh 3 1 (scot %p who)) q.q.pul])
::
++ earn :: purl to tape
|= pul=purl
^- tape
=< apex
|%
++ apex
^- tape
:(weld head "/" body tail)
::
++ body
|- ^- tape
?~ q.q.pul
?~(p.q.pul ~ ['.' (trip u.p.q.pul)])
=+ seg=(trip i.q.q.pul)
?:(=(~ t.q.q.pul) seg (weld seg `tape`['/' $(q.q.pul t.q.q.pul)]))
::
++ head
^- tape
;: weld
2014-04-23 21:02:36 +04:00
?:(&(p.p.pul !=([& /localhost] r.p.pul)) "https://" "http://")
2014-04-21 21:02:09 +04:00
::
?- -.r.p.pul
| (trip (rsh 3 1 (scot %if p.r.p.pul)))
& =+ rit=(flop p.r.p.pul)
|- ^- tape
?~(rit ~ (weld (trip i.rit) ?~(t.rit "" `tape`['.' $(rit t.rit)])))
==
::
?~(q.p.pul ~ `tape`[':' (trip (rsh 3 2 (scot %ui u.q.p.pul)))])
==
::
++ tail
^- tape
?: =(~ r.pul) ~
:- '?'
|- ^- tape
?~ r.pul ~
;: weld
(trip p.i.r.pul)
"="
(trip q.i.r.pul)
?~(t.r.pul ~ `tape`['&' $(r.pul t.r.pul)])
==
--
::
2013-09-29 00:21:18 +04:00
++ epur :: url/header parser
|%
++ apat :: 2396 abs_path
%+ cook deft
(ifix [fas ;~(pose fas (easy ~))] (more fas smeg))
2013-09-29 00:21:18 +04:00
++ auri
2014-04-23 21:02:36 +04:00
%+ cook
|= a=purl
?.(=([& /localhost] r.p.a) a a(p.p &))
2013-09-29 00:21:18 +04:00
;~ plug
;~ plug
%+ sear
|= a=@t
2013-09-29 00:21:18 +04:00
^- (unit ,?)
?+(a ~ %http [~ %|], %https [~ %&])
;~(sfix scem ;~(plug col fas fas))
thor
==
2014-03-03 02:31:03 +04:00
;~(plug ;~(pose apat (easy *pork)) yque)
==
2014-03-04 23:17:34 +04:00
++ cock :: cookie
(most ;~(plug sem ace) ;~(plug toke ;~(pfix tis tosk)))
2013-09-29 00:21:18 +04:00
++ dlab :: 2396 domainlabel
%+ sear
|= a=@ta
?.(=('-' (rsh 3 a (dec (met 3 a)))) [~ u=a] ~)
%+ cook cass
;~(plug aln (star alp))
::
++ fque (cook crip (plus pquo)) :: normal query field
++ fquu (cook crip (star pquo)) :: optional field
2013-09-29 00:21:18 +04:00
++ pcar ;~(pose pure pesc psub col pat) :: 2396 path char
2014-03-04 23:17:34 +04:00
++ pcok ;~ pose :: cookie char
(just `@`0x21)
(shim 0x23 0x2b)
(shim 0x2d 0x3a)
(shim 0x3c 0x5b)
(shim 0x5d 0x7e)
==
2013-09-29 00:21:18 +04:00
++ pesc ;~(pfix cen mes) :: 2396 escaped
++ pold (cold ' ' (just '+')) :: old space code
++ pque ;~(pose pcar fas wut) :: 3986 query char
++ pquo ;~(pose pure pesc pold) :: normal query char
++ pure ;~(pose aln hep dot cab sig) :: 2396 unreserved
++ psub ;~ pose :: 3986 sub-delims
zap buc pam soq pel per
2013-09-29 00:21:18 +04:00
tar lus com sem tis
==
2014-03-04 23:17:34 +04:00
++ ptok ;~ pose :: 2616 token
aln zap hax buc cen pam soq tar lus
2014-03-20 05:05:42 +04:00
hep dot ket cab tec bar sig
2014-03-04 23:17:34 +04:00
==
2013-09-29 00:21:18 +04:00
++ scem :: 2396 scheme
%+ cook cass
;~(plug alf (star ;~(pose aln lus hep dot)))
::
++ smeg (cook crip (plus pcar)) :: 2396 segment
2014-03-04 23:17:34 +04:00
++ tock (cook crip (plus pcok)) :: 6265 cookie-value
++ tosk ;~(pose tock (ifix [doq doq] tock)) :: 6265 cookie-value
++ toke (cook crip (plus ptok)) :: 2616 token
2013-09-29 00:21:18 +04:00
++ thor :: 2396 host/port
2013-12-21 06:35:33 +04:00
%+ cook |*(a=[* *] [+.a -.a])
2013-09-29 00:21:18 +04:00
;~ plug
thos
;~(pose (stag ~ ;~(pfix col dim:ag)) (easy ~))
==
++ thos :: 2396 host, no local
;~ plug
;~ pose
%+ stag %&
%+ sear :: LL parser weak here
|= a=(list ,@t)
=+ b=(flop a)
?> ?=(^ b)
=+ c=(end 3 1 i.b)
?.(&((gte c 'a') (lte c 'z')) ~ [~ u=b])
(most dot dlab)
::
%+ stag %|
=+ tod=(ape:ag ted:ab)
2013-09-29 00:21:18 +04:00
%+ bass 256
;~(plug tod (stun [3 3] ;~(pfix dot tod)))
==
==
++ yque :: query ending
;~ pose
;~(pfix wut yquy)
(easy ~)
==
++ yquy :: query
;~ pose :: proper query
%+ more
;~(pose pam sem)
;~(plug fque ;~(pose ;~(pfix tis fquu) (easy '')))
2013-09-29 00:21:18 +04:00
::
%+ cook :: funky query
|=(a=tape [[%$ (crip a)] ~])
(star pque)
==
++ zest :: 2616 request-uri
;~ pose
(stag %& (cook |=(a=purl a) auri))
(stag %| ;~(plug apat yque))
==
--
::
2014-03-04 01:55:40 +04:00
++ feel :: simple file write
2014-03-06 00:21:52 +04:00
|= [pax=path val=*]
2014-03-04 01:55:40 +04:00
^- miso
=+ dir=((hard arch) .^(%cy pax))
?~ q.dir [%ins val]
:- %mut
^- udon
[%a %a .^(%cx pax) val]
::
++ file :: simple file load
|= pax=path
^- (unit)
=+ dir=((hard arch) .^(%cy pax))
?~(q.dir ~ [~ .^(%cx pax)])
::
2014-03-06 00:21:52 +04:00
++ foal :: high-level write
|= [pax=path val=*]
^- toro
?> ?=([* * * *] pax)
[i.t.pax [%& ~ [*cart [[t.t.t.pax (feel pax val)] ~]]]]
::
2014-03-06 01:42:47 +04:00
++ fray :: high-level delete
|= pax=path
^- toro
?> ?=([* * * *] pax)
[i.t.pax [%& ~ [*cart [[t.t.t.pax [%del .^(%cx pax)]] ~]]]]
::
++ furl :: unify changes
|= [one=toro two=toro] !:
^- toro
~| %furl
?> ?& =(p.one p.two) :: same path
&(?=(& -.q.one) ?=(& -.q.two)) :: both deltas
&(?=(~ p.q.one) ?=(~ p.q.two)) :: not merges
==
2014-03-06 01:43:43 +04:00
[p.one [%& ~ [*cart (weld q.q.q.one q.q.q.two)]]]
2014-03-06 01:42:47 +04:00
::
++ glam
2013-09-29 00:21:18 +04:00
|= zar=@p ^- tape
%+ snag zar
^- (list tape)
:~ "Tianming" "Pepin the Short" "Haile Selassie" "Alfred the Great"
"Tamerlane" "Pericles" "Talleyrand" "Yongle" "Seleucus"
"Uther Pendragon" "Louis XVI" "Ahmad Shāh Durrānī" "Constantine"
"Wilhelm I" "Akbar" "Louis XIV" "Nobunaga" "Alexander VI"
"Philippe II" "Julius II" "David" "Niall Noígíallach" "Kublai Khan"
"Öz Beg Khan" "Ozymandias" "Ögedei Khan" "Jiang Jieshi" "Darius"
"Shivaji" "Qianlong" "Bolesław I Chrobry" "Tigranes" "Han Wudi"
"Charles X" "Naresuan" "Frederick II" "Simeon" "Kangxi"
2014-01-31 23:16:05 +04:00
"Suleiman the Magnificent" "Pedro II" "Genghis Khan" "Laozi"
2014-01-15 22:21:57 +04:00
"Porfirio Díaz" "Pakal" "Wu Zetian" "Garibaldi" "Matthias Corvinus"
"Leopold II" "Leonidas" "Sitting Bull" "Nebuchadnezzar II"
"Rhodes" "Henry VIII" "Attila" "Catherine II" "Chulalongkorn"
"Uthmān" "Augustus" "Faustin" "Chongde" "Justinian"
"Afonso de Albuquerque" "Antoninus Pius" "Cromwell" "Innocent X"
"Fidel" "Frederick the Great" "Canute" "Vytautas" "Amina"
"Hammurabi" "Suharto" "Victoria" "Hiawatha" "Paul V" "Shaka"
"Lê Thánh Tông" "Ivan Asen II" "Tiridates" "Nefertiti" "Gwangmu"
"Ferdinand & Isabella" "Askia" "Xuande" "Boris Godunov" "Gilgamesh"
"Maximillian I" "Mao" "Charlemagne" "Narai" "Hanno" "Charles I & V"
"Alexander II" "Mansa Musa" "Zoe Porphyrogenita" "Metternich"
"Robert the Bruce" "Pachacutec" "Jefferson" "Solomon" "Nicholas I"
"Barbarossa" "FDR" "Pius X" "Gwanggaeto" "Abbas I" "Julius Caesar"
"Lee Kuan Yew" "Ranavalona I" "Go-Daigo" "Zenobia" "Henry V"
"Bảo Đại" "Casimir III" "Cyrus" "Charles the Wise" "Sandrokottos"
"Agamemnon" "Clement VII" "Suppiluliuma" "Deng Xiaoping"
"Victor Emmanuel" "Ajatasatru" "Jan Sobieski" "Huangdi" "Xuantong"
"Narmer" "Cosimo de' Medici" "Möngke Khan" "Stephen Dušan" "Henri IV"
"Mehmed Fatih" "Conn Cétchathach" "Francisco Franco" "Leo X"
"Kammu" "Krishnadevaraya" "Elizabeth I" "Norton I" "Washington"
"Meiji" "Umar" "TR" "Peter the Great" "Agustin I" "Ashoka"
"William the Conqueror" "Kongolo Mwamba" "Song Taizu"
"Ivan the Terrible" "Yao" "Vercingetorix" "Geronimo" "Rurik"
"Urban VIII" "Alexios Komnenos" "Maria I" "Tamar" "Bismarck"
"Arthur" "Jimmu" "Gustavus Adolphus" "Suiko" "Basil I" "Montezuma"
"Santa Anna" "Xerxes" "Beyazıt Yıldırım" "Samudragupta" "James I"
"George III" "Kamehameha" "Francesco Sforza" "Trajan"
"Rajendra Chola" "Hideyoshi" "Cleopatra" "Alexander"
"Ashurbanipal" "Paul III" "Vespasian" "Tecumseh" "Narasimhavarman"
"Suryavarman II" "Bokassa I" "Charles Canning" "Theodosius"
"Francis II" "Zhou Wen" "William Jardine" "Ahmad al-Mansur"
"Lajos Nagy" "Theodora" "Mussolini" "Samuil" "Osman Gazi"
"Kim Il-sung" "Maria Theresa" "Lenin" "Tokugawa" "Marcus Aurelius"
"Nzinga Mbande" "Edward III" "Joseph II" "Pulakesi II" "Priam"
"Qin Shi Huang" "Shah Jahan" "Sejong" "Sui Wendi" "Otto I"
"Napoleon III" "Prester John" "Dido" "Joao I" "Gregory I"
"Gajah Mada" "Abd-ar Rahmān III" "Taizong" "Franz Josef I"
"Nicholas II" "Gandhi" "Chandragupta II" "Peter III"
"Oba Ewuare" "Louis IX" "Napoleon" "Selim Yavuz" "Shun"
"Hayam Wuruk" "Jagiełło" "Nicaule" "Sargon" "Saladin" "Charles II"
"Brian Boru" "Da Yu" "Antiochus III" "Charles I"
"Jan Pieterszoon Coen" "Hongwu" "Mithridates" "Hadrian" "Ptolemy"
"Benito Juarez" "Sun Yat-sen" "Raja Raja Chola" "Bolivar" "Pius VII"
"Shapur II" "Taksin" "Ram Khamhaeng" "Hatshepsut" "Alī" "Matilda"
2013-09-29 00:21:18 +04:00
"Ataturk"
==
::
++ glon
|= lag=lang
^- (unit tape)
?+ lag ~
%aa [~ "Afar"]
%ab [~ "Abkhazian"]
%ae [~ "Avestan"]
%af [~ "Afrikaans"]
%ak [~ "Akan"]
%am [~ "Amharic"]
%an [~ "Aragonese"]
%ar [~ "Arabic"]
%as [~ "Assamese"]
%av [~ "Avaric"]
%ay [~ "Aymara"]
%az [~ "Azerbaijani"]
%ba [~ "Bashkir"]
%be [~ "Belarusian"]
%bg [~ "Bulgarian"]
%bh [~ "Bihari"]
%bi [~ "Bislama"]
%bm [~ "Bambara"]
%bn [~ "Bengali"]
%bo [~ "Tibetan"]
%br [~ "Breton"]
%bs [~ "Bosnian"]
%ca [~ "Catalan"]
%ce [~ "Chechen"]
%ch [~ "Chamorro"]
%co [~ "Corsican"]
%cr [~ "Cree"]
%cs [~ "Czech"]
%cu [~ "Slavonic"]
%cv [~ "Chuvash"]
%cy [~ "Welsh"]
%da [~ "Danish"]
%de [~ "German"]
%dv [~ "Maldivian"]
%dz [~ "Dzongkha"]
%ee [~ "Ewe"]
%el [~ "Greek"]
%en [~ "English"]
%eo [~ "Esperanto"]
%es [~ "Spanish"]
%et [~ "Estonian"]
%eu [~ "Basque"]
%fa [~ "Persian"]
%ff [~ "Fulah"]
%fi [~ "Finnish"]
%fj [~ "Fijian"]
%fo [~ "Faroese"]
%fr [~ "French"]
%fy [~ "Frisian"]
%ga [~ "Irish Gaelic"]
%gd [~ "Scottish Gaelic"]
%gl [~ "Galician"]
%gn [~ "Guarani"]
%gu [~ "Gujarati"]
%gv [~ "Manx"]
%ha [~ "Hausa"]
%he [~ "Hebrew"]
%hi [~ "Hindi"]
%ho [~ "Hiri Motu"]
%hr [~ "Croatian"]
%ht [~ "Haitian Creole"]
%hu [~ "Hungarian"]
%hy [~ "Armenian"]
%hz [~ "Herero"]
%ia [~ "Interlingua"]
%id [~ "Indonesian"]
%ie [~ "Occidental"]
%ig [~ "Igbo"]
%ii [~ "Nuosu"]
%ik [~ "Inupiaq"]
%io [~ "Ido"]
%is [~ "Icelandic"]
%it [~ "Italian"]
%iu [~ "Inuktitut"]
%ja [~ "Japanese"]
%jv [~ "Javanese"]
%ka [~ "Georgian"]
%kg [~ "Kongo"]
%ki [~ "Kikuyu"]
%kj [~ "Kwanyama"]
%kk [~ "Kazakh"]
%kl [~ "Kalaallisut"]
%km [~ "Central Khmer"]
%kn [~ "Kannada"]
%ko [~ "Korean"]
%kr [~ "Kanuri"]
%ks [~ "Kashmiri"]
%ku [~ "Kurdish"]
%kv [~ "Komi"]
%kw [~ "Cornish"]
%ky [~ "Kyrgyz"]
%la [~ "Latin"]
%lb [~ "Luxembourgish"]
%lg [~ "Ganda"]
%li [~ "Limburgish"]
%ln [~ "Lingala"]
%lo [~ "Lao"]
%lt [~ "Lithuanian"]
%lu [~ "Luba-Katanga"]
%lv [~ "Latvian"]
%mg [~ "Malagasy"]
%mh [~ "Marshallese"]
%mi [~ "Maori"]
%mk [~ "Macedonian"]
%ml [~ "Malayalam"]
%mn [~ "Mongolian"]
%mr [~ "Marathi"]
%ms [~ "Malay"]
%mt [~ "Maltese"]
%my [~ "Burmese"]
%na [~ "Nauru"]
%nb [~ "Norwegian Bokmål"]
%nd [~ "North Ndebele"]
%ne [~ "Nepali"]
%ng [~ "Ndonga"]
%nl [~ "Dutch"]
%nn [~ "Norwegian Nynorsk"]
%no [~ "Norwegian"]
%nr [~ "South Ndebele"]
%nv [~ "Navajo"]
%ny [~ "Chichewa"]
%oc [~ "Occitan"]
%oj [~ "Ojibwa"]
%om [~ "Oromo"]
%or [~ "Oriya"]
%os [~ "Ossetian"]
%pa [~ "Punjabi"]
%pi [~ "Pali"]
%pl [~ "Polish"]
%ps [~ "Pashto"]
%pt [~ "Portuguese"]
%qu [~ "Quechua"]
%rm [~ "Romansh"]
%rn [~ "Rundi"]
%ro [~ "Romanian"]
%ru [~ "Russian"]
%rw [~ "Kinyarwanda"]
%sa [~ "Sanskrit"]
%sc [~ "Sardinian"]
%sd [~ "Sindhi"]
%se [~ "Northern Sami"]
%sg [~ "Sango"]
%si [~ "Sinhala"]
%sk [~ "Slovak"]
2014-01-21 06:32:51 +04:00
%sl [~ "Slovenian"]
2013-09-29 00:21:18 +04:00
%sm [~ "Samoan"]
%sn [~ "Shona"]
%so [~ "Somali"]
%sq [~ "Albanian"]
%sr [~ "Serbian"]
%ss [~ "Swati"]
%st [~ "Sotho"]
%su [~ "Sundanese"]
%sv [~ "Swedish"]
%sw [~ "Swahili"]
%ta [~ "Tamil"]
%te [~ "Telugu"]
%tg [~ "Tajik"]
%th [~ "Thai"]
%ti [~ "Tigrinya"]
%tk [~ "Turkmen"]
%tl [~ "Tagalog"]
%tn [~ "Tswana"]
%to [~ "Tonga"]
%tr [~ "Turkish"]
%ts [~ "Tsonga"]
%tt [~ "Tatar"]
%tw [~ "Twi"]
%ty [~ "Tahitian"]
%ug [~ "Uighur"]
%uk [~ "Ukrainian"]
%ur [~ "Urdu"]
%uz [~ "Uzbek"]
%ve [~ "Venda"]
%vi [~ "Vietnamese"]
%vo [~ "Volapük"]
%wa [~ "Walloon"]
%wo [~ "Wolof"]
%xh [~ "Xhosa"]
%yi [~ "Yiddish"]
%yo [~ "Yoruba"]
%za [~ "Zhuang"]
%zh [~ "Chinese"]
%zu [~ "Zulu"]
==
::
++ gnow
|= [who=@p gos=gcos] ^- @t
?- -.gos
%czar (rap 3 '|' (rap 3 (glam who)) '|' ~)
%king (rap 3 '_' p.gos '_' ~)
%earl (rap 3 ':' p.gos ':' ~)
%pawn ?~(p.gos %$ (rap 3 '.' u.p.gos '.' ~))
%duke
?: ?=(%anon -.p.gos) %$
%+ rap 3
^- (list ,@)
?- -.p.gos
2013-11-08 05:36:28 +04:00
%punk ~['"' q.p.gos '"']
2013-09-29 00:21:18 +04:00
?(%lord %lady)
=+ ^= nad
=+ nam=`name`s.p.p.gos
%+ rap 3
:~ p.nam
?~(q.nam 0 (cat 3 ' ' u.q.nam))
?~(r.nam 0 (rap 3 ' (' u.r.nam ')' ~))
' '
s.nam
==
?:(=(%lord -.p.gos) ~['[' nad ']'] ~['(' nad ')'])
==
==
::
++ hunt
|= [one=(unit ,@da) two=(unit ,@da)]
^- (unit ,@da)
?~ one two
?~ two one
?:((lth u.one u.two) one two)
::
++ meat
|= kit=kite
^- path
[(cat 3 'c' p.kit) (scot %p r.kit) s.kit (scot (dime q.kit)) t.kit]
::
2014-03-20 05:05:42 +04:00
++ mojo :: compiling load
|= [pax=path src=*]
^- (each twig (list tank))
?. ?=(@ src)
[%| ~[[leaf/"musk: malformed: {<pax>}"]]]
2014-03-12 23:50:39 +04:00
=+ ^= mud
%- mule |.
2014-03-13 05:04:58 +04:00
((full vest) [1 1] (trip src))
2014-03-12 23:50:39 +04:00
?: ?=(| -.mud) mud
?~ q.p.mud
2014-03-20 05:05:42 +04:00
:~ %|
leaf/"musk: syntax error: {<pax>}"
leaf/"musk: line {<p.p.p.mud>}, column {<q.p.p.mud>}"
==
[%& p.u.q.p.mud]
::
2014-05-07 21:42:31 +04:00
++ mole :: new to old sky
|= ska=$+(* (unit (unit)))
|= a=*
^- (unit)
=+ b=(ska a)
?~ b ~
?~ u.b ~
[~ u.u.b]
::
2014-03-20 05:05:42 +04:00
++ much :: constructing load
|= [pax=path src=*]
^- gank
=+ moj=(mojo pax src)
?: ?=(| -.moj) moj
(mule |.((slap !>(+>.$) `twig`p.moj)))
2014-03-12 23:50:39 +04:00
::
2014-03-20 05:05:42 +04:00
++ musk :: compiling apply
|= [pax=path src=* sam=vase]
2014-03-12 23:50:39 +04:00
^- gank
2014-03-20 05:05:42 +04:00
=+ mud=(much pax src)
2014-03-12 23:50:39 +04:00
?: ?=(| -.mud) mud
(mule |.((slam p.mud sam)))
2014-03-05 23:00:27 +04:00
::
2014-03-12 23:50:39 +04:00
++ numb :: ?? XX
2013-10-16 06:24:02 +04:00
|= [him=@p now=@da] ^- @t
2013-11-05 03:44:45 +04:00
=+ yow=(scot %p him)
2013-11-05 03:55:02 +04:00
=+ woy=((hard ,@t) .^(%a yow %name (scot %da now) ~))
?: =(%$ woy) yow
(cat 3 yow (cat 3 ' ' woy))
2013-10-16 06:24:02 +04:00
::
2013-09-29 00:21:18 +04:00
++ saxo :: autocanon
|= who=ship
^- (list ship)
?: (lth who 256) [who ~]
[who $(who (sein who))]
::
2014-03-12 23:50:39 +04:00
++ sein :: autoboss
2013-09-29 00:21:18 +04:00
|= who=ship ^- ship
=+ mir=(clan who)
?- mir
%czar who
%king (end 3 1 who)
%duke (end 4 1 who)
%earl (end 5 1 who)
%pawn `@p`0
==
::
++ tame
|= hap=path
^- (unit kite)
2013-12-24 00:49:15 +04:00
?. ?=([@ @ @ @ *] hap) ~
=+ :* hyr=(slay i.hap)
2013-09-29 00:21:18 +04:00
fal=(slay i.t.hap)
dyc=(slay i.t.t.hap)
ved=(slay i.t.t.t.hap)
2013-09-29 00:21:18 +04:00
:: ved=(slay i.t.hap)
:: fal=(slay i.t.t.hap)
:: dyc=(slay i.t.t.t.hap)
tyl=t.t.t.t.hap
==
?. ?=([~ %$ %tas @] hyr) ~
?. ?=([~ %$ %p @] fal) ~
?. ?=([~ %$ %tas @] dyc) ~
?. ?=(^ ved) ~
=+ his=`@p`q.p.u.fal
=+ [dis=(end 3 1 q.p.u.hyr) rem=(rsh 3 1 q.p.u.hyr)]
?. ?&(?=(%c dis) ?=(?(%v %w %x %y %z) rem)) ~
2013-09-29 00:21:18 +04:00
[~ rem (case p.u.ved) q.p.u.fal q.p.u.dyc tyl]
2014-05-10 11:10:46 +04:00
::
++ tome :: parse path
|= pax=path
^- (unit beam)
?. ?=([* * * *] pax) ~
%+ biff (slaw %p i.pax)
|= who=ship
%+ biff (slaw %tas i.t.pax)
|= dex=desk
%+ biff (slay i.t.t.pax)
|= cis=coin
?. ?=([%$ case] cis) ~
`(unit beam)`[~ who dex `case`p.cis (flop t.t.t.pax)]
::
++ tope :: beam to path
|= bem=beam
^- path
[(scot %p p.bem) q.bem (scot r.bem) (flop s.bem)]
2013-09-29 00:21:18 +04:00
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2014-04-19 07:27:19 +04:00
:: section 3bG, Arvo models ::
2013-09-29 00:21:18 +04:00
::
++ acru :: asym cryptosuite
$_ ^? |% :: opaque object
++ as ^? :: asym ops
|% ++ seal |=([a=pass b=@ c=@] _@) :: encrypt to a
++ sign |=([a=@ b=@] _@) :: certify as us
++ sure |=([a=@ b=@] *(unit ,@)) :: authenticate from us
++ tear |=([a=pass b=@] *(unit ,[p=@ q=@])) :: accept from a
--
++ de |+([a=@ b=@] *(unit ,@)) :: symmetric de, soft
++ dy |+([a=@ b=@] _@) :: symmetric de, hard
++ en |+([a=@ b=@] _@) :: symmetric en
++ ex ^? :: export
|% ++ fig _@uvH :: fingerprint
++ pac _@uvG :: default passcode
++ pub *pass :: public key
++ sec *ring :: private key
--
++ nu ^? :: reconstructors
|% ++ pit |=([a=@ b=@] ^?(..nu)) :: from [width seed]
++ nol |=(a=@ ^?(..nu)) :: from naked ring
++ com |=(a=@ ^?(..nu)) :: from naked pass
--
--
2014-05-02 03:33:15 +04:00
++ agon (map ,[p=ship q=desk] ,[p=@ud q=@ud]) :: mergepts our/their
2013-10-12 23:38:08 +04:00
++ ankh :: fs node (new)
2013-09-29 00:21:18 +04:00
$: p=cash :: recursive hash
q=(unit ,[p=cash q=*]) :: file
r=(map ,@ta ankh) :: folders
== ::
++ apex ,[p=@uvI q=(map ,@ta ,@uvI) r=(map ,@ta ,~)] :: node report (old)
++ ball ,@uw :: statement payload
++ bait ,[p=skin q=@ud r=dove] :: fmt nrecvd spec
++ bath :: convo per client
$: sop=shed :: not stalled
raz=(map path race) :: statements inbound
ryl=(map path rill) :: statements outbound
2013-09-29 00:21:18 +04:00
== ::
2014-05-27 13:47:19 +04:00
++ bean :: terminal control
2013-09-29 00:21:18 +04:00
$: $: bul=@ud :: buffer length
bus=@ud :: cursor in buffer
but=(list ,@c) :: buffer text
2013-09-29 00:21:18 +04:00
buy=prom :: input style
== ::
$: hiz=@ud :: history depth
hux=path :: history path
hym=(map ,@ud (list ,@c)) :: history overlay
hyt=hist :: history object
hyr=(unit (list ,@c)) :: history search
2013-09-29 00:21:18 +04:00
== ::
$: pol=@ud :: length of prompt
pot=tape :: prompt text
== ::
== ::
2014-05-02 03:33:15 +04:00
++ beau ,[p=(unit ,@ud) q=(map wire goal) r=boor] :: next/want/thread
++ beak ,[p=ship q=desk r=case] :: garnish with beak
++ beam ,[p=ship q=desk r=case s=spur] :: spur is flopped
2013-09-29 00:21:18 +04:00
++ bear ,[p=(map path goal) q=boar] :: thread with slips
++ beef :: raw product
$: p=(list gilt) :: actions
q=(list slip) :: requests
r=boar :: state
== ::
2014-05-09 04:34:57 +04:00
++ beet ,[p=(set beam) q=cage] :: computed result
2013-09-29 00:21:18 +04:00
++ bird :: packet in travel
$: gom=soap :: message identity
mup=@ud :: pktno in msg
nux=@ud :: xmission count
lys=@da :: last sent
pac=rock :: packet data
== ::
++ belt :: raw console input
$% [%aro p=?(%d %l %r %u)] :: arrow key
[%bac ~] :: true backspace
[%ctl p=@ud] :: control-key
[%del ~] :: true delete
[%met p=@ud] :: meta-key
2013-09-29 00:21:18 +04:00
[%ret ~] :: return
[%txt p=(list ,@c)] :: utf32 text
== ::
2013-09-29 00:21:18 +04:00
++ blew ,[p=@ud q=@ud] :: columns rows
++ blit :: raw console output
$% [%bel ~] :: make a noise
[%clr ~] :: clear the screen
[%hop p=@ud] :: set cursor position
[%lin p=(list ,@c)] :: set current line
[%mor ~] :: newline
[%sav p=path q=@] :: save to file
== ::
++ blot :: kill ring
$: p=@ud :: length
q=@ud :: depth
r=(list (list ,@c)) :: kills
== ::
2014-05-27 13:47:19 +04:00
++ blur ,[p=@ud q=(unit bean) r=blot] :: columns, prompt
2013-09-29 00:21:18 +04:00
++ boar :: execution instance
$% [%n p=(unit coal) q=claw r=lath] :: new/ready
[%r p=(unit worm)] :: running/done
[%t p=coal] :: simple filter
== ::
++ boor :: new thread
$: p=(map ,@ud kite) :: dependencies
q=(qeu ,[p=wire q=card]) :: incoming cards
2013-09-29 00:21:18 +04:00
r=(qeu ,[p=wire q=nose]) :: pending notes
s=boar :: execution
== ::
++ boat ,[(list slip) tart] :: user stage
++ boon :: fort output
$% [%beer p=ship q=@uvG] :: gained ownership
[%coke p=sock q=soap r=cape s=duct] :: message result
2013-09-29 00:21:18 +04:00
[%mead p=lane q=rock] :: accept packet
[%milk p=sock q=soap r=*] :: accept message
2013-09-29 00:21:18 +04:00
[%ouzo p=lane q=rock] :: transmit packet
[%wine p=sock q=tape] :: notify user
== ::
++ bowl ,[p=(list gift) q=(unit boat)] :: app product
++ brad :: shell state
$: who=ship :: identity
fog=(list ,@ud) :: virtual consoles
hox=@ta :: identity text
2014-05-02 03:33:15 +04:00
cwd=@tas :: working desk
2013-09-29 00:21:18 +04:00
cws=path :: working spur
way=(map ,@tas vase) :: variables
hit=[p=@ud q=(list ,@t)] :: command history
sur=[p=@ud q=(qeu vase)] :: result history
god=[p=@ud q=(map ,@ud task)] :: tasks
== ::
++ bray ,[p=life q=(unit life) r=ship s=@da] :: our parent us now
++ brow ,[p=@da q=@tas] :: browser version
++ buck ,[p=mace q=will] :: all security data
++ cake ,[p=sock q=skin r=@] :: top level packet
++ cape :: end-to-end result
$? %good :: delivered
%dead :: rejected
== ::
++ card :: event
$% [%bbye ~] :: reset prompt
[%band p=ship q=(list rout)] :: internal http bind
[%bind p=(unit ship) q=host] :: external http open
[%belt p=belt] :: terminal input
[%blew p=blew] :: terminal config
[%blit p=(list blit)] :: terminal output
[%boot p=card] :: christen terminal
[%born ~] :: new unix process
[%cash p=@p q=buck] :: civil license
[%crud p=@tas q=(list tank)] :: error with trace
[%deem p=ship q=card] :: external identity
[%dire p=@tas q=dram] :: apply directory
[%dump p=(list ,@t)] :: raw text lines
[%ergo p=@p q=@tas r=@ud] :: version update
2014-05-22 21:39:51 +04:00
[%exec p=@p q=(unit silk)] :: make / kill
2013-09-29 00:21:18 +04:00
[%file p=@tas q=@] :: apply atomic file
[%fail p=tape] :: report failure
2013-10-21 22:10:38 +04:00
[%grab ~] :: collect grabage
[%hail ~] :: refresh
2013-09-29 00:21:18 +04:00
[%hear p=lane q=@] :: receive packet
[%hemp p=path] :: cancel request
[%helo p=path q=prod] :: trigger prompt
[%hole p=lane q=@] :: packet failed
[%hoop p=(unit)] :: namespace response
[%hope p=path] :: namespace request
[%info p=@p q=@tas r=nori] :: internal edit
[%init p=@p] :: report install
[%into p=@p q=@tas r=nori] :: external edit
[%flog p=card] :: log to terminal
[%junk p=@] :: entropy
[%kick p=@da] :: wake up
[%kill p=~] :: kill a task
[%lane p=lane] :: set public route
2014-05-09 04:34:57 +04:00
[%made p=(each beet (list tank))] :: computed result
2013-09-29 00:21:18 +04:00
[%line p=@t] :: source line
[%limn ~] :: rotate ship
[%ling ~] :: rotate interface
[%load p=@tas q=path] :: request atomic file
[%loin p=@p q=chum] :: name hashed-pass
2014-05-13 02:42:43 +04:00
[%logo p=@] :: logout
2013-09-29 00:21:18 +04:00
[%loot p=@tas q=path] :: request directory
[%make p=(unit ,@t) q=@ud r=@] :: wild license
2014-05-26 00:35:07 +04:00
[%mean p=ship q=term r=chop s=vase] :: application event
2014-05-27 00:43:40 +04:00
[%meta p=vase] :: meta-card
2014-05-20 21:33:59 +04:00
[%meat p=ship q=card] :: concrete app action
2013-09-29 00:21:18 +04:00
[%mine p=@ud q=@t] :: query matched line
[%noop ~] :: no operation
[%note p=@tD q=tank] :: debug message
2013-09-29 00:21:18 +04:00
[%nuke p=~] :: kill all processes
[%pace p=@ud] :: compute background
2014-01-04 11:28:16 +04:00
[%pipe p=(unit ,[p=tutu q=(list)])] :: pipeline data
2013-09-29 00:21:18 +04:00
[%pour p=path q=dram] :: write directory
2014-05-02 03:33:15 +04:00
[%pull p=ship q=desk r=(list desk)] :: pull remote desk
2013-09-29 00:21:18 +04:00
[%pump ~] :: produce packets
[%quid p=ship q=path r=(unit ,*)] :: delivery
[%rein p=? q=path] :: push/replace kernel
[%rend ~] :: pop kernel
[%rest ~] :: reset to factory
[%save p=path q=@] :: write atomic file
[%send p=lane q=@] :: transmit packet
[%sith p=@p q=@uw] :: imperial generator
2014-05-26 23:38:37 +04:00
[%soft p=*] :: untyped card
2013-09-29 00:21:18 +04:00
[%sync ~] :: reset soft state
[%talk p=tank] :: show on console
[%tell p=(list ,@t)] :: dump lines
[%text p=tape] :: talk leaf
[%that p=@ud q=love] :: cooked htresp
2014-03-12 23:50:39 +04:00
:: [%thee p=@ud q=scab r=cred s=moth] :: cooked htreq
2013-09-29 00:21:18 +04:00
[%them p=(unit hiss)] :: internal client req
[%they p=@ud q=httr] :: response to %them
[%this p=? q=clip r=httq] :: secure/src/req
2013-09-29 00:21:18 +04:00
[%thou p=httr] :: raw http response
[%thud ~] :: cancel http request
[%thug p=@p q=@p] :: sign in client
2014-02-27 05:58:40 +04:00
[%thus p=@ud q=(unit hiss)] :: http request/cancel
2013-09-29 00:21:18 +04:00
[%tory p=(list ,@t)] :: history dump
[%veer p=@ta q=path r=@t] :: install vane
2014-01-06 03:38:34 +04:00
[%vega p=path] :: reboot by path
2014-01-05 08:42:15 +04:00
[%volt p=*] :: current kernel
2013-09-29 00:21:18 +04:00
[%wait p=@da q=path] :: timer wait
[%wake ~] :: timer activate
2014-05-17 00:57:49 +04:00
[%waft p=sock q=*] :: response message
2014-05-16 22:49:15 +04:00
[%want p=sock q=path r=*] :: send message
[%warn p=tape] :: syslog
2014-05-20 21:33:59 +04:00
[%warp p=sock q=riff] :: file request
[%wart p=sock q=@tas r=path s=*] :: service request
[%went p=ship q=cape] :: reaction message
2013-09-29 00:21:18 +04:00
[%wipe ~] :: clean to sequence
[%word p=chum] :: set password
[%writ p=riot] :: response
== ::
++ cart ,[p=cash q=cash] :: hash change
++ care ?(%v %w %x %y %z) :: clay submode
2014-05-02 03:33:15 +04:00
++ case :: ship desk case spur
2013-09-29 00:21:18 +04:00
$% [%da p=@da] :: date
[%tas p=@tas] :: label
[%ud p=@ud] :: number
== ::
++ cash ,@uvH :: ankh hash
++ cask :: symmetric record
$: yed=(unit ,[p=hand q=code]) :: outbound
heg=(map hand code) :: proposed
2013-09-29 00:21:18 +04:00
qim=(map hand code) :: inbound
== ::
++ coal ,* :: untyped vase
++ code ,@uvI :: symmetric key
++ cone :: reconfiguration
2013-12-15 11:07:57 +04:00
$% [& p=twig] :: transform
2013-09-29 00:21:18 +04:00
[| p=(list ,@tas)] :: alter
== ::
++ chum ,@uvI :: hashed passcode
++ claw $: :: startup chain
joy=(unit coal) :: local context
ran=(unit coal) :: arguments
pux=(unit path) :: execution path
jiv=(unit coal) :: app configuration
kyq=(unit coal) :: app customization
gam=(unit coal) :: app image
== ::
++ clip (each ,@if ,@is) :: client IP
2014-03-20 05:05:42 +04:00
++ cred :: credential
$: hut=hoot :: client host
2014-04-23 21:02:36 +04:00
aut=(jug ,@tas ,@t) :: client identities
2014-03-20 05:05:42 +04:00
orx=oryx :: CSRF secret
acl=(unit ,@t) :: accept-language
2014-03-20 05:05:42 +04:00
cip=(each ,@if ,@is) :: client IP
cum=(map ,@tas ,*) :: custom dirt
== ::
2013-09-29 00:21:18 +04:00
++ cult (map duct rave) :: subscriptions
++ deed ,[p=@ q=step] :: signature, stage
++ dome :: project state
$: ang=agon :: pedigree
2014-02-14 23:29:03 +04:00
ank=ankh :: state
2013-09-29 00:21:18 +04:00
let=@ :: (lent hit)
hit=(list frog) :: changes in reverse
lab=(map ,@tas ,@ud) :: labels
== ::
2014-05-02 03:33:15 +04:00
++ dojo ,[p=cult q=dome] :: domestic desk state
2013-09-29 00:21:18 +04:00
++ door :: foreign contact
$: wod=road :: connection to
wyl=will :: inferred mirror
caq=cask :: symmetric key state
== ::
++ dove ,[p=@ud q=(map ,@ud ,@)] :: count hash 13-blocks
2014-03-26 04:48:22 +04:00
++ epic :: FCGI parameters
$: quy=quay :: query
own=@p :: server
ced=cred :: client credentials
pos=pred :: path prefix
fus=path :: reverse suffix
but=path :: ending
for=logo :: extension
nep=@tas :: request model
== ::
2013-09-29 00:21:18 +04:00
++ flap ,@uvH :: network packet id
++ flow :: packet connection
$: rtt=@dr :: decaying avg rtt
wid=@ud :: logical wdow msgs
== ::
2014-04-10 04:28:22 +04:00
++ furt :: formal state
$: hop=@da :: network boot date
ton=toun :: security
zac=(map ship corn) :: flows by server
== ::
++ frog ,[p=@da q=nori] :: time and change
2014-03-12 23:50:39 +04:00
++ gank (each vase (list tank)) :: abstract result
2013-09-29 00:21:18 +04:00
++ gift :: one-way effect
$% [%$ p=vase] :: trivial output
[%cc p=(unit case)] :: change case
[%ck p=@tas] :: change desk
[%cs p=path] :: change spur
[%de p=@ud q=tank] :: debug/level
[%ex p=(unit vase) q=lath] :: exec/patch
2014-02-10 21:50:20 +04:00
::[%fd p=vase] :: fundamental down
::[%fo p=vase] :: fundamental forward
::[%fu p=vase] :: fundamental up
2013-09-29 00:21:18 +04:00
[%ha p=tank] :: single error
[%ho p=(list tank)] :: multiple error
[%la p=tank] :: single statement
[%lo p=(list tank)] :: multiple statement
[%mu p=type q=(list)] :: batch emit
[%mx p=(list gift)] :: batch gift
2014-03-06 00:21:52 +04:00
[%ok p=@ta q=nori] :: save changes
2013-09-29 00:21:18 +04:00
[%sc p=(unit skit)] :: stack library
[%sp p=(list lark)] :: spawn task(s)
[%sq p=ship q=@tas r=path s=*] :: send request
[%sr p=ship q=path r=*] :: send response
2013-09-29 00:21:18 +04:00
[%te p=(list ,@t)] :: dump lines
[%th p=@ud q=love] :: http response
2013-10-27 07:55:53 +04:00
[%tq p=path q=hiss] :: http request
2013-09-29 00:21:18 +04:00
[%va p=@tas q=(unit vase)] :: set/clear variable
[%xx p=card] :: return card
[%xy p=path q=card] :: push card
== ::
++ gilt ,[@tas *] :: presumed gift
++ gens ,[p=lang q=gcos] :: general identity
++ germ ?(%fine %that %this %mate) :: merge style
++ gcos :: id description
$% [%czar ~] :: 8-bit ship
[%duke p=what] :: 32-bit ship
[%earl p=@t] :: 64-bit ship
[%king p=@t] :: 16-bit ship
[%pawn p=(unit ,@t)] :: 128-bit ship
2013-09-29 00:21:18 +04:00
== ::
++ goad :: common note
$% [%eg p=riot] :: simple result
2013-10-27 07:55:53 +04:00
[%hp p=httr] :: http response
2014-03-12 23:50:39 +04:00
:: [%ht p=@ud q=scab r=cred s=moth] :: http request
2013-09-29 00:21:18 +04:00
[%it p=~] :: interrupt event
[%lq p=ship q=path r=*] :: client request
2013-09-29 00:21:18 +04:00
[%ly p=newt q=tape] :: lifecycle event
[%ow p=cape] :: one-way reaction
[%rt p=(unit)] :: roundtrip response
2013-09-29 00:21:18 +04:00
[%up p=@t] :: prompt response
[%wa ~] :: alarm
== ::
++ goal :: app request
$% [%$ p=type] :: open for input
[%do p=vase q=vase] :: call gate sample
[%eg p=kite] :: single request
2014-05-02 03:33:15 +04:00
[%es p=ship q=desk r=rave] :: subscription
2013-09-29 00:21:18 +04:00
[%ht p=(list rout)] :: http server
2013-10-27 07:55:53 +04:00
[%hp ~] :: http response
[%lq p=@tas] :: listen for service
[%ow ~] :: one-way reaction
[%rt ~] :: roundtrip response
[%up p=prod] :: user prompt
2013-09-29 00:21:18 +04:00
[%wa p=@da] :: alarm
== ::
++ govt path :: country/postcode
++ gram ,@uw :: physical datagram
++ gyro ,[p=@ud q=wire r=prod] :: live prompt
++ hand ,@uvH :: hash of code
2014-04-03 05:06:45 +04:00
++ hart ,[p=? q=(unit ,@ud) r=host] :: http sec/port/host
2014-03-05 23:00:27 +04:00
++ hate ,[p=purl q=@p r=moth] :: semi-cooked request
2014-03-12 23:50:39 +04:00
++ heir ,[p=@ud q=mess r=(unit love)] :: status/headers/data
2014-02-27 05:58:40 +04:00
++ hiss ,[p=purl q=moth] :: outbound request
2013-09-29 00:21:18 +04:00
++ hist ,[p=@ud q=(list ,@t)] :: depth texts
2014-03-20 05:05:42 +04:00
++ hole ,@t :: session identity
2013-09-29 00:21:18 +04:00
++ hook path :: request origin
++ hoot ,[p=? q=? r=(unit ,@ud) s=host] :: secure/mapped/host
2013-09-29 00:21:18 +04:00
++ hort ,[p=(unit ,@ud) q=host] :: http port/host
2014-03-12 23:50:39 +04:00
++ hose ,[p=(list tank) q=(unit vase) r=seam s=heir] :: http environment
2013-09-29 00:21:18 +04:00
++ host $%([& p=(list ,@t)] [| p=@if]) :: http host
++ httq :: raw http request
2014-03-12 23:50:39 +04:00
$: p=meth :: method
2013-09-29 00:21:18 +04:00
q=@t :: unparsed url
r=(list ,[p=@t q=@t]) :: headers
s=(unit octs) :: body
== ::
++ httr ,[p=@ud q=mess r=(unit octs)] :: raw http response
++ httx :: encapsulated http
$: p=? :: https?
q=clip :: source IP
r=httq ::
== ::
2014-05-02 03:33:15 +04:00
++ kite ,[p=care q=case r=ship s=desk t=spur] :: parsed global name
2013-09-29 00:21:18 +04:00
++ json :: json top level
$% [%a p=(list jval)] :: array
[%o p=(map ,@t jval)] :: object
== ::
++ jval :: json value
$| ~ :: null
$? json ::
$% [%b p=?] :: boolean
[%n p=@ta] :: number
[%s p=@ta] :: string
== ::
== ::
++ lamb :: short path
$% [& p=@tas] :: auto
2013-12-15 11:07:57 +04:00
[| p=twig] :: manual
2013-09-29 00:21:18 +04:00
== ::
++ lane :: packet route
$% [%if p=@ud q=@if] :: IP4/public UDP/addr
[%is p=@ud q=(unit lane) r=@is] :: IPv6 w/alternates
[%ix p=@da q=@ud r=@if] :: IPv4 provisional
== ::
++ lang ,@ta :: IETF lang as code
++ lark ,[p=(unit ,@tas) q=lawn] :: parsed command
++ lass ?(%0 %1 %2) :: power increment
++ lath $% :: pipeline stage
2013-12-15 11:07:57 +04:00
[%0 p=lass q=lamb r=(list cone) s=twig] :: command
[%1 p=twig] :: generator
[%2 p=twig] :: filter
2013-09-29 00:21:18 +04:00
== ::
++ lawn (list lath) ::
++ lice ,[p=ship q=buck] :: full license
++ life ,@ud :: regime number
++ lint (list rock) :: fragment array
++ love $% :: http response
[%ham p=manx] :: html node
2014-03-13 05:04:58 +04:00
[%mid p=mite q=octs] :: mime-typed data
2013-09-29 00:21:18 +04:00
[%raw p=httr] :: raw http response
2014-03-12 23:50:39 +04:00
[%wan p=wain] :: text lines
[%zap p=@ud q=(list tank)] :: status/error
2013-09-29 00:21:18 +04:00
== ::
2014-05-20 21:33:59 +04:00
++ luge ,[p=logo q=*] :: fully typed content
++ maki ,[p=@ta q=@ta r=@ta s=path] ::
2013-09-29 00:21:18 +04:00
++ mace (list ,[p=life q=ring]) :: private secrets
++ marv ?(%da %tas %ud) :: release form
2014-05-02 03:33:15 +04:00
++ masu ,[p=ship q=desk r=moar s=moar] :: sync square
2013-09-29 00:21:18 +04:00
++ math (map ,@t (list ,@t)) :: semiparsed headers
++ meal :: payload
$% [%back p=cape q=flap r=@dr] :: acknowledgment
[%bond p=life q=path r=@ud s=*] :: message
2013-09-29 00:21:18 +04:00
[%carp p=@ q=@ud r=@ud s=flap t=@] :: skin/inx/cnt/hash
[%fore p=ship q=(unit lane) r=@] :: forwarded packet
== ::
++ mess (list ,[p=@t q=@t]) :: raw http headers
++ meta :: path metadata
$% [& q=@uvI] :: hash
[| q=(list ,@ta)] :: dir
== ::
2014-03-12 23:50:39 +04:00
++ meth :: http methods
$? %conn :: CONNECT
%delt :: DELETE
%get :: GET
%head :: HEAD
%opts :: OPTIONS
%post :: POST
%put :: PUT
%trac :: TRACE
2014-05-26 22:59:21 +04:00
== ::
2014-03-13 05:04:58 +04:00
++ mite (list ,@ta) :: mime type
2013-09-29 00:21:18 +04:00
++ miso :: ankh delta
$% [%del p=*] :: delete
[%ins p=*] :: insert
[%mut p=udon] :: mutate
== ::
++ moar ,[p=@ud q=@ud] :: normal change range
++ moat ,[p=case q=case] :: change range
++ mood ,[p=care q=case r=path] :: request in desk
2014-05-26 07:51:39 +04:00
++ move ,[p=duct q=(mold card card)] :: new move
2013-09-29 00:21:18 +04:00
++ moth ,[p=meth q=math r=(unit octs)] :: http operation
++ name ,[p=@t q=(unit ,@t) r=(unit ,@t) s=@t] :: first mid/nick last
++ newt ?(%boot %kick %mess %slay %wake) :: lifecycle events
++ nose :: response, kernel
2014-01-04 11:28:16 +04:00
$? [%$ p=(unit ,[p=tutu q=(list)])] :: standard input
goad ::
2013-09-29 00:21:18 +04:00
== ::
++ note :: response, user
$? [%$ p=(unit ,[p=type q=(list)])] :: standard input
[%do p=vase] :: execution result
goad ::
== ::
++ nori :: repository action
$% [& p=(unit masu) q=soba] :: delta
2013-09-29 00:21:18 +04:00
[| p=@tas] :: label
== ::
++ octs ,[p=@ud q=@] :: octet-stream
2014-03-04 23:17:34 +04:00
++ oryx ,@t :: CSRF secret
2014-01-21 01:50:54 +04:00
++ corn :: flow by server
2013-09-29 00:21:18 +04:00
$: hen=duct :: admin channel
nys=(map flap bait) :: packets incoming
olz=(map flap cape) :: packets completed
wab=(map ship bath) :: relationship
== ::
++ pact path :: routed path
++ pail ?(%none %warm %cold) :: connection status
++ plea ,[p=@ud q=[p=? q=@t]] :: live prompt
2014-03-04 02:47:59 +04:00
++ pork ,[p=(unit ,@ta) q=(list ,@t)] :: fully parsed url
2014-03-20 05:05:42 +04:00
++ pred ,[p=@ta q=@tas r=@ta ~] :: proto-path
2013-09-29 00:21:18 +04:00
++ prod ,[p=prom q=tape r=tape] :: prompt
++ prom ?(%text %pass %none) :: format type
++ purl ,[p=hart q=pork r=quay] :: parsed url
++ putt :: outgoing message
$: ski=snow :: sequence acked/sent
wyv=(list rock) :: packet list XX gear
== ::
++ pyre :: cascade stash
$: p=(map ,[p=path q=path r=coal] coal) :: by path
q=(map ,[p=path q=@uvI r=coal] coal) :: by source hash
2013-12-15 11:07:57 +04:00
r=(map ,[p=* q=coal] coal) :: by (soft) twig
2013-09-29 00:21:18 +04:00
== ::
2014-03-12 23:50:39 +04:00
++ quay (list ,[p=@t q=@t]) :: parsed url query
2013-09-29 00:21:18 +04:00
++ quri :: request-uri
$% [& p=purl] :: absolute
[| p=pork q=quay] :: relative
== ::
++ race :: inbound stream
$: did=@ud :: filled sequence
bum=(map ,@ud ,%dead) ::
2013-09-29 00:21:18 +04:00
mis=(map ,@ud ,[p=cape q=flap r=(unit)]) :: misordered
== ::
2013-09-29 00:21:18 +04:00
++ raft :: filesystem
$: las=@da :: last wakeup
fat=(map ,@p room) :: per host
== ::
++ rank ?(%czar %king %duke %earl %pawn) :: ship width class
++ rant :: namespace binding
$: p=[p=care q=case r=@tas] :: clade release book
q=path :: spur
r=* :: data
== ::
2013-09-29 00:21:18 +04:00
++ rave :: general request
$% [& p=mood] :: single request
[| p=moat] :: change range
== ::
++ rede :: universal project
$: lim=@da :: complete to
qyx=cult :: subscribers
2013-10-08 05:58:06 +04:00
ref=(unit rind) :: outgoing requests
dom=dome :: revision state
2013-09-29 00:21:18 +04:00
== ::
2014-05-02 03:33:15 +04:00
++ riff ,[p=desk q=(unit rave)] :: request/desist
2013-09-29 00:21:18 +04:00
++ rill :: outbound stream
$: sed=@ud :: sent
san=(map ,@ud duct) :: outstanding
== ::
++ rind :: request manager
$: nix=@ud :: request index
bom=(map ,@ud ,[p=duct q=rave]) :: outstanding
2013-09-29 00:21:18 +04:00
fod=(map duct ,@ud) :: current requests
haw=(map mood (unit)) :: simple cache
2013-09-29 00:21:18 +04:00
== ::
++ riot (unit rant) :: response/complete
++ road :: secured oneway route
$: exp=@da :: expiration date
lun=(unit lane) :: route to friend
2013-10-10 06:45:57 +04:00
lew=will :: will of friend
2013-09-29 00:21:18 +04:00
== ::
++ room :: fs per ship (new)
$: hun=duct :: terminal duct
hez=(unit duct) :: sync duct
2014-05-24 00:46:43 +04:00
dos=(map ,@tas ,[p=cult q=dome]) :: native desk
rid=(map ship (map ,@tas rede)) :: neighbors
2013-09-29 00:21:18 +04:00
== ::
++ rock ,@uvO :: packet
++ rout ,[p=(list host) q=path r=oryx s=path] :: http route (new)
++ rump ,[p=care q=case r=@tas s=path] :: relative path
++ saba ,[p=ship q=@tas r=moar s=(list nori)] :: patch/merge
2014-04-10 04:28:22 +04:00
++ sufi :: domestic host
$: hoy=(list ship) :: hierarchy
val=wund :: private keys
law=will :: server will
seh=(map hand ,[p=ship q=@da]) :: key cache
hoc=(map ship door) :: neighborhood
==
2013-09-29 00:21:18 +04:00
++ salt ,@uv :: entropy
++ seal :: auth conversation
$: whu=(unit ship) :: client identity
pul=purl :: destination url
wit=? :: wait for partner
foy=(unit ,[p=ship q=hole]) :: partner to notify
pus=(unit ,@ta) :: password
== ::
2014-03-12 23:50:39 +04:00
++ seam :: logical request
$% [%app p=manx] :: (fake) app
[%cog p=@ud q=@ud] :: console get
2014-04-16 23:47:41 +04:00
[%con p=@ud] :: console face
[%cop p=@ud q=@ud r=json] :: console put
2014-05-02 03:33:15 +04:00
[%det p=desk q=moat] :: load changes
2014-04-10 03:51:19 +04:00
[%fun p=term q=tube r=(list manx)] :: functional
[%lon p=seal] :: authentication flow
2014-04-21 21:02:09 +04:00
[%red p=purl] :: redirect
2013-09-29 00:21:18 +04:00
== ::
++ sect ?(%black %blue %red %orange %white) :: banner
++ shed :: packet flow
$: $: rtt=@dr :: smoothed rtt
rto=@dr :: retransmit timeout
rtn=(unit ,@da) :: next timeout
rue=(unit ,@da) :: last heard from
== ::
$: nus=@ud :: number sent
nif=@ud :: number live
nep=@ud :: next expected
caw=@ud :: logical window
cag=@ud :: congest thresh
== ::
$: diq=(map flap ,@ud) :: packets sent
pyz=(map soup ,@ud) :: message/unacked
puq=(qeu ,[p=@ud q=soul]) :: packet queue
== ::
== ::
2014-04-30 21:04:07 +04:00
++ silk :: construction layer
$& [p=silk q=silk] :: cons
2014-05-07 21:42:31 +04:00
$% [%bake p=logo q=beam] :: local synthesis
[%boil p=logo q=beam] :: general synthesis
[%call p=silk q=silk] :: slam
2014-05-10 11:10:46 +04:00
[%cast p=logo q=beak r=silk] :: translate
2014-05-28 09:44:18 +04:00
[%done p=(set beam) q=cage] :: literal
2014-05-28 12:57:00 +04:00
[%mute p=silk q=(list (pair wing silk))] :: mutant
2014-05-28 09:44:18 +04:00
[%pass p=silk q=sill] :: twig construction
2014-05-07 21:42:31 +04:00
[%reef ~] :: kernel reef
== ::
2014-05-28 12:57:00 +04:00
++ sill :: code construction
2014-05-07 21:42:31 +04:00
$% [%0 p=@] :: direct text
[%1 p=twig] :: direct twig
[%2 p=beam] :: beam over %hoon
2014-05-28 12:57:00 +04:00
[%3 p=silk] :: build a %hoon
2014-04-30 21:04:07 +04:00
== ::
2013-09-29 00:21:18 +04:00
++ skit ,[p=(unit ,@ta) q=(list ,@ta) r=(list ,@ta)] :: tracking path
++ sink :: incoming per server
$: nes=(map flap ,[p=@da q=bait]) :: fragment actions
== ::
++ skin ?(%none %open %fast %full) :: encoding stem
2013-10-27 07:55:53 +04:00
++ slip ,[p=path q=goal] :: traceable request
2013-09-29 00:21:18 +04:00
++ sled ,[p=* q=*] :: [data code]
++ snow ,[p=@ud q=@ud r=(set ,@ud)] :: window exceptions
++ soap ,[p=[p=life q=life] q=path r=@ud] :: statement id
++ soup ,[p=path q=@ud] :: new statement id
2013-09-29 00:21:18 +04:00
++ soul :: packet in travel
$: gom=soup :: message identity
nux=@ud :: xmission count
liv=? :: deemed live
lys=@da :: last sent
pac=rock :: packet data
== ::
++ soba ,[p=cart q=(list tako)] :: delta
2013-09-29 00:21:18 +04:00
++ sock ,[p=ship q=ship] :: from to
2014-05-02 03:33:15 +04:00
++ spur path :: ship desk case spur
2013-09-29 00:21:18 +04:00
++ step ,[p=bray q=gens r=pass] :: identity stage
++ tako ,[p=path q=miso] :: change detail
2014-01-06 05:52:37 +04:00
++ tart $+([@da path note] bowl) :: process core
2013-09-29 00:21:18 +04:00
++ task ::
$: paq=(qeu gyro) :: prompt queue
2014-05-02 03:33:15 +04:00
wip=[p=@ud q=(map ,@ud beau)] :: processes
2013-09-29 00:21:18 +04:00
== ::
++ taxi ,[p=lane q=rock] :: routed packet
++ tick ,@ud :: process id
2014-03-06 00:21:52 +04:00
++ toro ,[p=@ta q=nori] :: general change
2014-04-10 04:28:22 +04:00
++ toun :: all security state
$: lit=@ud :: imperial modulus
any=@ :: entropy
urb=(map ship sufi) :: all keys and routes
== ::
2014-03-12 23:50:39 +04:00
++ tube ,[p=@ta q=@ta r=@ta s=path] :: canonical path
2014-01-04 11:28:16 +04:00
++ tutu ,* :: presumed type
2014-04-29 02:24:32 +04:00
++ vane $_ :: kernel actor
2014-05-27 00:43:40 +04:00
|+ $: now=@da ::
eny=@ ::
ska=$+(* (unit (unit))) :: activate
== ::
2014-04-29 02:24:32 +04:00
^? |% ::
2014-05-22 21:39:51 +04:00
++ call :: update
|= $: hen=duct :: channel
2014-05-26 22:59:21 +04:00
typ=type :: event type
2014-05-22 21:39:51 +04:00
fav=card :: event
== ::
2014-04-29 02:24:32 +04:00
:- p=*(list move) :: actions
q=*vane :: consequence
++ come :: load state, stale
|= [sam=? old=vase] ::
*vane ::
++ doze :: next wakeup
2014-04-29 02:24:32 +04:00
|= [now=@da hen=duct] :: channel
*(unit ,@da) :: alarm if any
++ load :: load state, fresh
|= old=vase ::
*vane ::
++ raze *vane :: erase all state
++ scry :: inspect
2014-05-27 00:43:40 +04:00
|= $: fur=(unit (set monk)) :: observers
2014-05-24 01:58:12 +04:00
ren=@tas :: submode
2014-04-29 02:24:32 +04:00
his=ship :: target
syd=@tas :: project
lot=coin :: version
tyl=path :: location
== ::
2014-04-30 21:33:50 +04:00
*(unit (unit)) :: record
2014-04-29 02:24:32 +04:00
++ stay *vase :: save state, new
++ take :: update
|= $: pax=wire :: pretext
hen=duct :: cause
typ=type :: event type
fav=card :: event
== ::
:- p=*(list move) :: actions
q=*vane :: consequence
2014-04-29 02:24:32 +04:00
++ vern [_@ud _@ud] :: hoon/vane version
-- ::
2014-04-10 04:28:22 +04:00
++ wund (list ,[p=life q=ring r=acru]) :: mace in action
2013-09-29 00:21:18 +04:00
++ what :: logical identity
$% [%anon ~] :: anonymous
[%lady p=whom] :: female person ()
[%lord p=whom] :: male person []
2013-11-08 04:34:44 +04:00
[%punk p=sect q=@t] :: opaque handle ""
2013-09-29 00:21:18 +04:00
== ::
++ whom ,[p=@ud q=govt r=sect s=name] :: year/govt/id
++ will (list deed) :: certificate
++ worm ,* :: vase of tart
++ yard :: terminal state
$: p=? :: verbose
2013-09-29 00:21:18 +04:00
q=blur :: display state
r=(map path hist) :: history
== ::
--