mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
Mostly detoxified rogue %ktts.
This commit is contained in:
parent
405e720365
commit
53b1351836
@ -171,7 +171,7 @@
|
||||
(stag %show (cook _?($1 $2 $3) (cook lent (stun [1 3] wut))))
|
||||
==
|
||||
++ dp-hooves :: hoof list
|
||||
:(stag 0 %ex %clsg (cook |=(a=tusk a) (most ;~(plug com gaw) dp-hoof)))
|
||||
:(stag 0 %ex %clsg (cook |=(a+tusk a) (most ;~(plug com gaw) dp-hoof)))
|
||||
::
|
||||
++ dp-hoof :: ++ford-hoof twig
|
||||
%+ cook |*(a+* ~!(+.a `twig`a))
|
||||
@ -403,7 +403,7 @@
|
||||
(dy-diff(per ~) %mor [%det lic] [%err q.q.cag] ~)
|
||||
::
|
||||
++ dy-done :: dialog submit
|
||||
|= txt=tape
|
||||
|= txt+tape
|
||||
?: |(?=(^ per) ?=(^ pux) ?=($~ pro))
|
||||
~& %dy-no-prompt
|
||||
(dy-diff %bel ~)
|
||||
@ -411,7 +411,7 @@
|
||||
::
|
||||
++ dy-cast
|
||||
|* {typ+__(*) bun+vase}
|
||||
|= a=vase ^- typ
|
||||
|= a+vase ^- typ
|
||||
?> (~(nest ut p.bun) & p.a)
|
||||
;;(typ q.a)
|
||||
::
|
||||
@ -492,7 +492,7 @@
|
||||
==
|
||||
==
|
||||
::
|
||||
++ dy-show |=(cay=cage (dy-print cay ~))
|
||||
++ dy-show |=(cay+cage (dy-print cay ~))
|
||||
++ dy-print
|
||||
|= {cay+cage tan+tang}
|
||||
%+ dy-rash %tan
|
||||
@ -501,7 +501,7 @@
|
||||
$tang ;;(tang q.q.cay)
|
||||
$httr
|
||||
=+ hit=;;(httr q.q.cay)
|
||||
=- (flop (turn `wall`- |=(a=tape leaf/(dash:ut a ''))))
|
||||
=- (flop (turn `wall`- |=(a+tape leaf/(dash:ut a ''))))
|
||||
:- "HTTP {<p.hit>}"
|
||||
%+ weld
|
||||
(turn q.hit |=({a+@t b+@t} "{(trip a)}: {(trip b)}"))
|
||||
@ -509,7 +509,7 @@
|
||||
==
|
||||
::
|
||||
++ dy-show-type-noun
|
||||
|= a=type ^- tank
|
||||
|= a+type ^- tank
|
||||
=- >[-]<
|
||||
|- ^- $^
|
||||
_? _% {$atom @tas}
|
||||
@ -620,7 +620,7 @@
|
||||
!>([our=our now=now eny=eny]:hid)
|
||||
::
|
||||
++ dy-made-dial :: dialog product
|
||||
|= cag=cage
|
||||
|= cag+cage
|
||||
^+ +>+>
|
||||
?. ?=(^ q.q.cag)
|
||||
(dy-diff %err q.q.cag)
|
||||
@ -746,7 +746,7 @@
|
||||
--
|
||||
::
|
||||
++ he-dope :: sole user of ++dp
|
||||
|= txt=tape ::
|
||||
|= txt+tape ::
|
||||
^- (each (unit (each dojo-command tape)) hair) :: prefix/result
|
||||
=+ len=+((lent txt)) :: line length
|
||||
=. txt :(weld buf txt "\0a") ::
|
||||
@ -770,7 +770,7 @@
|
||||
^+ .
|
||||
=. egg +(egg)
|
||||
=- ?~(msg ..he-diff (he-diff %tan leaf/u.msg ~))
|
||||
^- msg=(unit tape)
|
||||
^- msg+(unit tape)
|
||||
?+ (clan our.hid) ~
|
||||
$pawn ?+ egg ~
|
||||
$5 `":: To request a planet, run |ask 'your@email.co'"
|
||||
@ -963,7 +963,7 @@
|
||||
{$2 p+(map bone session-1)}
|
||||
{$3 p+(map bone session)}
|
||||
==
|
||||
|= old=(unit ?(house hoze)) ^+ [~ ..prep]
|
||||
|= old+(unit ?(house hoze)) ^+ [~ ..prep]
|
||||
?~ old `..prep
|
||||
?+ -.u.old !!
|
||||
$4 `..prep(+<+ u.old)
|
||||
@ -975,7 +975,7 @@
|
||||
|= {moz+(list move) ses+session}
|
||||
=> ~(. he moz ses)
|
||||
=- [wrap=- +]
|
||||
|* he-arm=__(he-type)
|
||||
|* he-arm+__(he-type)
|
||||
|= __(+<.he-arm)
|
||||
^- (quip move ..he)
|
||||
he-abet:(he-arm +<)
|
||||
|
@ -11,8 +11,8 @@
|
||||
++ hood-0 ::
|
||||
{$0 lac+(map @tas hood-part)} ::
|
||||
++ hood-good ::
|
||||
|* hed=hood-head ::
|
||||
|= paw=hood-part ::
|
||||
|* hed+hood-head ::
|
||||
|= paw+hood-part ::
|
||||
?- hed ::
|
||||
$drum ?>(?=($drum -.paw) `drum-part`paw) ::
|
||||
$helm ?>(?=($helm -.paw) `helm-part`paw) ::
|
||||
|
@ -286,7 +286,7 @@
|
||||
$(zoc t.zoc, +>.$ (sh-deal i.zoc))
|
||||
::
|
||||
++ sh-deal :: apply from shell
|
||||
|= cod=command
|
||||
|= cod+command
|
||||
^+ +>
|
||||
?- -.cod
|
||||
$design
|
||||
@ -491,8 +491,8 @@
|
||||
=| $^
|
||||
_= ret
|
||||
_: old+(list (pair partner atlas))
|
||||
new=(list (pair partner atlas))
|
||||
cha=(list (pair partner atlas))
|
||||
new+(list (pair partner atlas))
|
||||
cha+(list (pair partner atlas))
|
||||
==
|
||||
^+ ret
|
||||
=. ret
|
||||
@ -837,7 +837,7 @@
|
||||
::
|
||||
++ advance ?~(t.buf ~ $(con +(con), inx +(inx), buf t.buf))
|
||||
++ newline ?~(t.buf ~ $(con 0, inx +(inx), buf t.buf))
|
||||
++ fix |=(cha=@ [%mor [%del inx] [%ins inx `@c`cha] ~])
|
||||
++ fix |=(cha+@ [%mor [%del inx] [%ins inx `@c`cha] ~])
|
||||
--
|
||||
::
|
||||
++ sh-sane :: sanitize input
|
||||
@ -882,7 +882,7 @@
|
||||
^- audience
|
||||
%- ~(gas by *audience)
|
||||
%+ turn (~(tap in ?~(active.she passive.she u.active.she)))
|
||||
|=(a=partner [a *envelope %pending])
|
||||
|=(a+partner [a *envelope %pending])
|
||||
::
|
||||
++ sh-tell :: add command
|
||||
|= cod+command
|
||||
@ -1311,17 +1311,17 @@
|
||||
::
|
||||
++ ra-diff-talk-report :: subscription update
|
||||
|= {man+span cuz+station rad+report}
|
||||
%- (ra-know man) |= par=__(pa) =< pa-abet
|
||||
%- (ra-know man) |= par+__(pa) =< pa-abet
|
||||
(pa-diff-talk-report:par cuz rad)
|
||||
::
|
||||
++ ra-quit :: subscription quit
|
||||
|= {man+span cuz+station}
|
||||
%- (ra-know man) |= par=__(pa) =< pa-abet
|
||||
%- (ra-know man) |= par+__(pa) =< pa-abet
|
||||
(pa-quit:par %& cuz)
|
||||
::
|
||||
++ ra-retry :: subscription resend
|
||||
|= {man+span cuz+station}
|
||||
%- (ra-know man) |= par=__(pa) =< pa-abet
|
||||
%- (ra-know man) |= par+__(pa) =< pa-abet
|
||||
(pa-acquire:par [%& cuz]~)
|
||||
::
|
||||
++ ra-coup-repeat ::
|
||||
@ -1347,7 +1347,7 @@
|
||||
^+ +>
|
||||
?. ?=({@ @ *} pax)
|
||||
+>(general (~(del in general) ost.hid))
|
||||
%- (ra-know i.t.pax) |= par=__(pa) =< pa-abet
|
||||
%- (ra-know i.t.pax) |= par+__(pa) =< pa-abet
|
||||
(pa-notify:pa-cancel:par src %gone *human)
|
||||
::
|
||||
++ ra-human :: look up person
|
||||
@ -1408,7 +1408,7 @@
|
||||
%+ scag 64
|
||||
%- tufa
|
||||
%+ turn (tuba (trip q.r.r.tip))
|
||||
|= a=@c
|
||||
|= a+@c
|
||||
?: &((gte a 'A') (lte a 'Z'))
|
||||
(add a 32)
|
||||
?: |((lth a 32) (gth a 126))
|
||||
@ -1442,7 +1442,7 @@
|
||||
::
|
||||
++ ra-record :: add to story
|
||||
|= {man+span gam+telegram}
|
||||
%- (ra-know man) |= par=__(pa) =< pa-abet
|
||||
%- (ra-know man) |= par+__(pa) =< pa-abet
|
||||
(pa-learn:par gam)
|
||||
::
|
||||
++ ra-transmit :: send to neighbor
|
||||
@ -1476,7 +1476,7 @@
|
||||
&
|
||||
::
|
||||
++ pa-visible :: display to
|
||||
|= her=ship
|
||||
|= her+ship
|
||||
^- ?
|
||||
?- p.cordon.shape
|
||||
$black &
|
||||
@ -1559,7 +1559,7 @@
|
||||
|= {ost+bone cub+(list card)}
|
||||
%_ +>.$
|
||||
moves
|
||||
(welp (flop (turn cub |=(a=card [ost a]))) moves)
|
||||
(welp (flop (turn cub |=(a+card [ost a]))) moves)
|
||||
==
|
||||
::
|
||||
++ pa-abjure :: unsubscribe move
|
||||
@ -1607,8 +1607,8 @@
|
||||
=+ ^= dif ^- (pair (list partner) (list partner))
|
||||
=+ old=`(list partner)`(~(tap in sources.shape) ~)
|
||||
=+ new=`(list partner)`(~(tap in sources.cof) ~)
|
||||
:- (skip new |=(a=partner (~(has in sources.shape) a)))
|
||||
(skip old |=(a=partner (~(has in sources.cof) a)))
|
||||
:- (skip new |=(a+partner (~(has in sources.shape) a)))
|
||||
(skip old |=(a+partner (~(has in sources.cof) a)))
|
||||
=. +>.$ (pa-acquire p.dif)
|
||||
=. +>.$ (pa-abjure q.dif)
|
||||
=. shape cof
|
||||
@ -1693,8 +1693,8 @@
|
||||
(pa-sauce ost.hid [%quit ~]~)
|
||||
=+ ^= ruv ^- (unit river)
|
||||
%+ biff
|
||||
(zl:jo (turn pax ;~(biff slay |=(a=coin `(unit dime)`?~(-.a a ~)))))
|
||||
|= paf=(list dime)
|
||||
(zl:jo (turn pax ;~(biff slay |=(a+coin `(unit dime)`?~(-.a a ~)))))
|
||||
|= paf+(list dime)
|
||||
?~ paf
|
||||
$(paf [%ud (sub (max 64 count) 64)]~)
|
||||
?~ t.paf
|
||||
@ -1736,7 +1736,7 @@
|
||||
$(p.moy t.p.moy, gramsers (~(del by gramsers) i.p.moy))
|
||||
::
|
||||
++ pa-lesson :: learn multiple
|
||||
|= gaz=(list telegram)
|
||||
|= gaz+(list telegram)
|
||||
^+ +>
|
||||
?~ gaz +>
|
||||
$(gaz t.gaz, +> (pa-learn i.gaz))
|
||||
@ -1921,7 +1921,7 @@
|
||||
(~(ta-show ta man (need te-best)) ~ te-maud)
|
||||
::
|
||||
++ ta-dire :: direct message
|
||||
|= pan=partner ^- ?
|
||||
|= pan+partner ^- ?
|
||||
?& ?=($& -.pan)
|
||||
=(p.p.pan our.hid)
|
||||
::
|
||||
@ -1987,11 +1987,11 @@
|
||||
==
|
||||
::
|
||||
++ tr-rend-tors
|
||||
|= a=torso ^- tang
|
||||
|= a+torso ^- tang
|
||||
?- -.a
|
||||
$name (welp $(a q.a) leaf/"={(trip p.a)}" ~)
|
||||
$tank +.a
|
||||
$text (turn (flop +.a) |=(b=cord leaf/(trip b)))
|
||||
$text (turn (flop +.a) |=(b+cord leaf/(trip b)))
|
||||
==
|
||||
::
|
||||
++ tr-pals
|
||||
@ -2152,7 +2152,7 @@
|
||||
++ log-to-file
|
||||
|= man+span
|
||||
^- move
|
||||
=+ ^- paf=path
|
||||
=+ ^- paf+path
|
||||
=+ day=(year %*(. (yore now.hid) +.t +:*tarp))
|
||||
%+ tope [our.hid %home da/now.hid]
|
||||
/talk-telegrams/(scot %da day)/[man]/talk
|
||||
|
@ -1,4 +1,4 @@
|
||||
:: :: ames (4a), networking
|
||||
!: :: ames (4a), networking
|
||||
::
|
||||
|= pit+vase
|
||||
=> =~
|
||||
@ -422,7 +422,7 @@
|
||||
++ kins |=(tay+@ (snag tay `(list skin)`[%none %open %fast %full ~]))
|
||||
++ ksin |=(sin+skin `@`?-(sin $none 0, $open 1, $fast 2, $full 3))
|
||||
++ spit :: cake to packet
|
||||
|= kec=cake ^- @
|
||||
|= kec+cake ^- @
|
||||
=+ wim=(met 3 p.p.kec)
|
||||
=+ dum=(met 3 q.p.kec)
|
||||
=+ yax=?:((lte wim 2) 0 ?:((lte wim 4) 1 ?:((lte wim 8) 2 3)))
|
||||
@ -446,7 +446,7 @@
|
||||
::
|
||||
|%
|
||||
++ go :: go
|
||||
|_ ton=town :: ames state
|
||||
|_ ton+town :: ames state
|
||||
++ as :: as:go
|
||||
|_ {our+ship saf+sufi} :: per server
|
||||
++ born :: born:as:go
|
||||
@ -586,10 +586,10 @@
|
||||
^- (list ship) :: route unto
|
||||
=+ [fro=xen too=xeno]
|
||||
=+ ^= oot ^- (list ship)
|
||||
=| oot=(list ship)
|
||||
=| oot+(list ship)
|
||||
|- ^+ oot
|
||||
?~ too ~
|
||||
?: (lien fro |=(a=ship =(a i.too))) ~
|
||||
?: (lien fro |=(a+ship =(a i.too))) ~
|
||||
[i.too $(too t.too)]
|
||||
:: ~& [%xong-to [our her] (weld oot ?>(?=(^ fro) t.fro))]
|
||||
(weld oot ?>(?=(^ fro) t.fro))
|
||||
@ -600,7 +600,7 @@
|
||||
=< weft
|
||||
|%
|
||||
++ wasp :: null security
|
||||
^-({p+skin q=@} [%none (jam ham)])
|
||||
^-({p+skin q+@} [%none (jam ham)])
|
||||
::
|
||||
++ weft :: fragment message
|
||||
^- {p+(list rock) q+__(+>.$)}
|
||||
@ -874,7 +874,7 @@
|
||||
?: =(~ puq) [~ +>(rtn ~)]
|
||||
?. (gth caw nif) [~ +>]
|
||||
=+ wid=(sub caw nif)
|
||||
=| rub=(list rock)
|
||||
=| rub+(list rock)
|
||||
=< abet =< apse
|
||||
|%
|
||||
++ abet
|
||||
@ -1094,7 +1094,7 @@
|
||||
=+ ^= weg ^- corn
|
||||
=+ weg=(~(get by zac.fox) our)
|
||||
?^(weg u.weg *corn)
|
||||
=| bin=(list boon)
|
||||
=| bin+(list boon)
|
||||
|%
|
||||
++ ho :: ho:um:am
|
||||
|= her+ship :: per friend
|
||||
@ -1385,7 +1385,7 @@
|
||||
=+ [nix=0 rax=*(list @)]
|
||||
|- ^- @
|
||||
?: =(p.duv nix)
|
||||
(can ?:(fak.ton.fox 16 13) (turn (flop rax) |=(a=@ [1 a])))
|
||||
(can ?:(fak.ton.fox 16 13) (turn (flop rax) |=(a+@ [1 a])))
|
||||
$(nix +(nix), rax [(need (~(get by q.duv) nix)) rax])
|
||||
-- :: --la:ho:um:am
|
||||
::
|
||||
@ -1616,13 +1616,13 @@
|
||||
{$$ $ud @}
|
||||
%+ bind
|
||||
(perm who u.hun q.p.lot [syd t.tyl])
|
||||
|=(a=* [%noun !>(a)])
|
||||
|=(a+* [%noun !>(a)])
|
||||
::
|
||||
{$$ $da @}
|
||||
?. =(now q.p.lot) ~
|
||||
%+ bind
|
||||
(temp who u.hun [syd t.tyl])
|
||||
|=(a=* [%noun !>(a)])
|
||||
|=(a+* [%noun !>(a)])
|
||||
==
|
||||
::
|
||||
++ stay fox
|
||||
|
@ -1,7 +1,7 @@
|
||||
:: :: %behn, just a timer
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
!:::
|
||||
|= pit+vase
|
||||
=> =~
|
||||
|%
|
||||
++ sqeu |* {a+__(*) b+__(*)} :: binary skew queno
|
||||
@ -125,7 +125,7 @@
|
||||
++ gas
|
||||
|= b+(list {k+key n+val})
|
||||
^+ a
|
||||
q:(roll b |=({{k+key n+val} q=__(a)} (put(a q) k n)))
|
||||
q:(roll b |=({{k+key n+val} q+__(a)} (put(a q) k n)))
|
||||
::
|
||||
++ tap
|
||||
^- (list {k+key n+val})
|
||||
|
@ -111,12 +111,12 @@
|
||||
_: nix+@ud :: request index
|
||||
bom+(map @ud {p+duct q+rave}) :: outstanding
|
||||
fod+(map duct @ud) :: current requests
|
||||
haw=(map mood (unit cage)) :: simple cache
|
||||
nak=(unit nako) :: pending validation
|
||||
haw+(map mood (unit cage)) :: simple cache
|
||||
nak+(unit nako) :: pending validation
|
||||
== ::
|
||||
++ room :: fs per ship
|
||||
_: hun=duct :: terminal duct
|
||||
dos=(map desk dojo) :: native desk
|
||||
_: hun+duct :: terminal duct
|
||||
dos+(map desk dojo) :: native desk
|
||||
== ::
|
||||
++ rove :: stored request
|
||||
_% {$sing p+mood} :: single request
|
||||
@ -376,14 +376,14 @@
|
||||
^- (unit (trel term @ud (set path)))
|
||||
=- ?~(- ~ `[nam (lent s.bem) (sa -)])
|
||||
%+ skim can
|
||||
|= pax=path
|
||||
|= pax+path
|
||||
&(=(p.bem her) =(q.bem syd) =((flop s.bem) (scag (lent s.bem) pax)))
|
||||
::
|
||||
++ mont
|
||||
|= {pot+term pax+path}
|
||||
^+ +>
|
||||
=+ can=(turn (~(tap by q:(aeon-to-yaki:ze let.dom))) head)
|
||||
=+ mus=(skim can |=(paf=path =(pax (scag (lent pax) paf))))
|
||||
=+ mus=(skim can |=(paf+path =(pax (scag (lent pax) paf))))
|
||||
?~ mus
|
||||
+>.$
|
||||
%- emit
|
||||
@ -391,7 +391,7 @@
|
||||
%exec our ~ [her syd %da now] %tabl
|
||||
^- (list (pair silk silk))
|
||||
%+ turn `(list path)`mus
|
||||
|= a=path
|
||||
|= a+path
|
||||
^- (pair silk silk)
|
||||
:- [%$ %path !>(a)]
|
||||
:+ %cast %mime
|
||||
@ -485,7 +485,7 @@
|
||||
?-(-.q.i.p.lem $del '-', $ins '+', $dif ':')
|
||||
:+ %rose ["/" "/" ~]
|
||||
%+ turn (weld pre p.i.p.lem)
|
||||
|= a=cord
|
||||
|= a+cord
|
||||
?: ((sane %ta) a)
|
||||
[%leaf (trip a)]
|
||||
[%leaf (dash:ut (trip a) '\'')]
|
||||
@ -829,7 +829,7 @@
|
||||
(echo now %& sim)
|
||||
==
|
||||
?~ dok ~& %no-dok +>.$
|
||||
=+ ^- cat=(list (trel path lobe cage))
|
||||
=+ ^- cat+(list (trel path lobe cage))
|
||||
%+ turn (gage-to-cages res)
|
||||
|= {pax+cage cay+cage}
|
||||
?. ?=($path-hash p.pax)
|
||||
@ -1098,7 +1098,7 @@
|
||||
%f %exec our ~ [her syd cas] %tabl
|
||||
^- (list (pair silk silk))
|
||||
%+ turn (~(tap in pop))
|
||||
|= a=plop
|
||||
|= a+plop
|
||||
?- -.a
|
||||
$delta [[%$ %blob !>([%delta p.a q.a *page])] [%vale p.r.a q.r.a]]
|
||||
$direct [[%$ %blob !>([%direct p.a *page])] [%vale p.q.a q.q.a]]
|
||||
@ -1110,7 +1110,7 @@
|
||||
^+ +>
|
||||
?> ?=(^ ref)
|
||||
?> ?=(^ nak.u.ref)
|
||||
=+ ^- lat=(list blob)
|
||||
=+ ^- lat+(list blob)
|
||||
%+ turn ~|("validate foreign plops failed" (gage-to-cages res))
|
||||
|= {bob+cage cay+cage}
|
||||
?. ?=($blob p.bob)
|
||||
@ -1544,11 +1544,11 @@
|
||||
|= {a+(unit tako) b+tako}
|
||||
^- {(set yaki) (set plop)}
|
||||
=+ old=?~(a ~ (reachable-takos u.a))
|
||||
=+ ^- yal=(set tako)
|
||||
=+ ^- yal+(set tako)
|
||||
%- sa
|
||||
%+ skip
|
||||
(~(tap in (reachable-takos b)))
|
||||
|=(tak=tako (~(has in old) tak))
|
||||
|=(tak+tako (~(has in old) tak))
|
||||
:- (sa (turn (~(tap in yal)) tako-to-yaki))
|
||||
(sa (turn (~(tap in (new-lobes (new-lobes ~ old) yal))) lobe-to-blob))
|
||||
::
|
||||
@ -1641,7 +1641,7 @@
|
||||
:: ~& cy/pax
|
||||
:- -:!>(*arch)
|
||||
^- arch
|
||||
=+ ^- descendants=(list (pair path lobe))
|
||||
=+ ^- descendants+(list (pair path lobe))
|
||||
:: ~& %turning
|
||||
:: =- ~& %turned -
|
||||
%+ turn
|
||||
@ -1728,13 +1728,13 @@
|
||||
=| ram+path :: reverse path into
|
||||
|%
|
||||
++ descend :: descend
|
||||
|= lol=@ta
|
||||
|= lol+@ta
|
||||
^+ +>
|
||||
=+ you=(~(get by dir.ank) lol)
|
||||
+>.$(ram [lol ram], ank ?~(you [~ ~] u.you))
|
||||
::
|
||||
++ descend-path :: descend recursively
|
||||
|= way=path
|
||||
|= way+path
|
||||
^+ +>
|
||||
?~(way +> $(way t.way, +> (descend i.way)))
|
||||
--
|
||||
@ -2037,7 +2037,7 @@
|
||||
`(map path *)`old.dob.dat
|
||||
?^ bof
|
||||
(error:he %meet-conflict >(~(run by `(map path *)`bof) $~)< ~)
|
||||
=+ ^- old=(map path lobe)
|
||||
=+ ^- old+(map path lobe)
|
||||
%+ roll (~(tap by (~(uni by old.dal.dat) old.dob.dat)))
|
||||
=< .(old q.bas.dat)
|
||||
|= {{pax+path $~} old+(map path lobe)}
|
||||
@ -2243,7 +2243,7 @@
|
||||
?: ?=($| -.gon.dat)
|
||||
+>.$
|
||||
=. bop.dat p.bop
|
||||
=+ ^- con=(map path *) :: 2-change conflict
|
||||
=+ ^- con+(map path *) :: 2-change conflict
|
||||
%- mo
|
||||
%+ skim (~(tap by bof.dat))
|
||||
|=({pax+path cay+(unit cage)} ?=($~ cay))
|
||||
@ -2401,7 +2401,7 @@
|
||||
%f %exec p.bob ~ val %tabl
|
||||
^- (list (pair silk silk))
|
||||
%+ turn (~(tap in sum))
|
||||
|= a=path
|
||||
|= a+path
|
||||
^- (pair silk silk)
|
||||
:- [%$ %path !>(a)]
|
||||
=+ b=(~(got by erg.dat) a)
|
||||
@ -2427,7 +2427,7 @@
|
||||
=+ mit=?.(?=($mime p.mim) ~ `((hard mime) q.q.mim))
|
||||
$(p.tay t.p.tay, nac :_(nac [((hard path) q.q.pax) mit]))
|
||||
?: ?=({@ *} tan) (error:he tan)
|
||||
=+ `can=(map path (unit mime))`(mo tan)
|
||||
=+ `can+(map path (unit mime))`(mo tan)
|
||||
?~ hez
|
||||
(error:he %ergo-no-hez ~)
|
||||
?: ?=($| -.gon.dat)
|
||||
@ -2596,7 +2596,7 @@
|
||||
=+ bem=(~(get by mon.ruf) p.q.hic)
|
||||
?: &(?=($~ bem) !=(%$ p.q.hic))
|
||||
~|([%bad-mount-point-from-unix p.q.hic] !!)
|
||||
=+ ^- bem=beam
|
||||
=+ ^- bem+beam
|
||||
?^ bem
|
||||
u.bem
|
||||
[[?>(?=(^ fat.ruf) p.n.fat.ruf) %base %ud 1] ~]
|
||||
@ -2761,7 +2761,7 @@
|
||||
=* sud i.t.t.t.t.tea
|
||||
=* sat i.t.t.t.t.t.tea
|
||||
=+ dat=?-(+<.q.hin $writ [%& p.q.hin], $made [%| q.q.hin])
|
||||
=+ ^- kan=(unit ankh)
|
||||
=+ ^- kan+(unit ankh)
|
||||
%+ biff (~(get by fat.ruf) her)
|
||||
|= room
|
||||
%+ bind (~(get by dos) sud)
|
||||
@ -2867,7 +2867,7 @@
|
||||
=+ her=(slav %p i.t.t.tea)
|
||||
=+ syd=(slav %tas i.t.t.t.tea)
|
||||
=+ car=((hard care) i.t.t.t.t.tea)
|
||||
=+ ^- cas=case
|
||||
=+ ^- cas+case
|
||||
=+ (slay i.t.t.t.t.t.tea)
|
||||
?> ?=({$~ $$ case} -)
|
||||
->+
|
||||
@ -2934,7 +2934,7 @@
|
||||
~
|
||||
=+ mad=(mo mod)
|
||||
=+ len=(lent pax)
|
||||
=+ ^- descendants=(list path)
|
||||
=+ ^- descendants+(list path)
|
||||
%+ turn
|
||||
%+ skim (~(tap by hat))
|
||||
|= {paf+path lob+lobe}
|
||||
|
@ -1,4 +1,4 @@
|
||||
::
|
||||
!:
|
||||
:: dill (4d), terminal handling
|
||||
::
|
||||
|= pit+vase
|
||||
@ -156,7 +156,7 @@
|
||||
|= {err+@tas tac+(list tank)}
|
||||
=+ ^= wol ^- wall
|
||||
:- (trip err)
|
||||
(zing (turn (flop tac) |=(a=tank (~(win re a) [0 wid]))))
|
||||
(zing (turn (flop tac) |=(a+tank (~(win re a) [0 wid]))))
|
||||
|- ^+ +>.^$
|
||||
?~ wol +>.^$
|
||||
$(wol t.wol, +>.^$ (from %out (tuba i.wol)))
|
||||
@ -226,7 +226,7 @@
|
||||
++ into :: preinitialize
|
||||
|= gyl+(list gill)
|
||||
%_ +>
|
||||
tem `(turn gyl |=(a=gill [%yow a]))
|
||||
tem `(turn gyl |=(a+gill [%yow a]))
|
||||
moz
|
||||
:_ moz
|
||||
:* hen
|
||||
|
@ -178,8 +178,8 @@
|
||||
::
|
||||
++ from-cookies
|
||||
|= {maf+math fil+_+({@t @t} ?)}
|
||||
=+ `cot=(list @t)`(~(get ju maf) 'cookie')
|
||||
=+ `cok=quay`(zing `(list quay)`(murn cot (curr rush cock:epur)))
|
||||
=+ `cot+(list @t)`(~(get ju maf) 'cookie')
|
||||
=+ `cok+quay`(zing `(list quay)`(murn cot (curr rush cock:epur)))
|
||||
|- ^- (unit cord)
|
||||
?~ cok ~
|
||||
?:((fil i.cok) [~ q.i.cok] $(cok t.cok))
|
||||
@ -187,14 +187,14 @@
|
||||
++ wush
|
||||
|= {wid+@u tan+tang}
|
||||
^- tape
|
||||
=+ rolt=|=(a=wall `tape`?~(a ~ :(weld i.a "\0a" $(a t.a))))
|
||||
(rolt (turn tan |=(a=tank (rolt (wash 0^wid a)))))
|
||||
=+ rolt=|=(a+wall `tape`?~(a ~ :(weld i.a "\0a" $(a t.a))))
|
||||
(rolt (turn tan |=(a+tank (rolt (wash 0^wid a)))))
|
||||
::
|
||||
::
|
||||
++ add-cookies
|
||||
|= {cug+(list @t) hit+httr} ^- httr
|
||||
?~ cug hit
|
||||
=+ cuh=(turn `(list @t)`cug |=(a=@t set-cookie/a))
|
||||
=+ cuh=(turn `(list @t)`cug |=(a+@t set-cookie/a))
|
||||
hit(q (weld cuh q.hit))
|
||||
::
|
||||
++ inject :: inject dependency
|
||||
@ -544,7 +544,7 @@
|
||||
our+ship :: current ship
|
||||
sky+_+(* (unit)) :: system namespace
|
||||
== ::
|
||||
mow=(list move) :: pending actions
|
||||
mow+(list move) :: pending actions
|
||||
== ::
|
||||
bolo :: all vane state
|
||||
== ::
|
||||
@ -773,7 +773,7 @@
|
||||
=. ..axon $(tee p.tee)
|
||||
%_ ..axon
|
||||
mow %+ turn mow
|
||||
|= a=move
|
||||
|= a+move
|
||||
?+ q.a a
|
||||
{$give $thou *} a(r.p.p.q ~)
|
||||
{$pass ^} ?.(=(p.tee p.q.a) a a(p.q tee))
|
||||
@ -824,7 +824,7 @@
|
||||
::
|
||||
++ root-beak `beak`[our %home da/now] :: XX
|
||||
++ emule
|
||||
|= a=__(|?(..emule)) ^+ ..emule
|
||||
|= a+__(|?(..emule)) ^+ ..emule
|
||||
=+ mul=(mule a)
|
||||
?~ -.mul p.mul
|
||||
(fail 500 0v0 >%exit< p.mul)
|
||||
@ -1267,7 +1267,7 @@
|
||||
==
|
||||
::
|
||||
++ show-login-page
|
||||
|= ses=(unit hole) ^- (each pest __(done))
|
||||
|= ses+(unit hole) ^- (each pest __(done))
|
||||
%- (slog leaf/"login code for {(scow %p our)}: {(trip load-secret)}" ~)
|
||||
?. ?=(_|($~ {$~ $html}) p.pok)
|
||||
[%& %red ~]
|
||||
@ -1288,7 +1288,7 @@
|
||||
{$| @} (cat 3 '; Domain=' (rsh 3 1 (scot %if p.r.hat)))
|
||||
{$& $org $urbit *} '; Domain=.urbit.org'
|
||||
{$& @ @ *} =- (rap 3 "; Domain={-}{i.p.r.hat ~}")
|
||||
(turn (flop `path`t.p.r.hat) |=(a=span (cat 3 a '.')))
|
||||
(turn (flop `path`t.p.r.hat) |=(a+span (cat 3 a '.')))
|
||||
|
||||
{$& *} '' :: XX security?
|
||||
==
|
||||
@ -1410,7 +1410,7 @@
|
||||
ixor/s/(oryx-to-ixor orx)
|
||||
ship/(jape +:<our>)
|
||||
user/(jape +:<him>)
|
||||
auth/a/(turn (~(tap in aut)) |=(a=@p (jape +:<a>)))
|
||||
auth/a/(turn (~(tap in aut)) |=(a+@p (jape +:<a>)))
|
||||
==
|
||||
--
|
||||
::
|
||||
@ -1427,7 +1427,7 @@
|
||||
=. +> poll-rest
|
||||
..ix(wix (~(del by wix) ire))
|
||||
::
|
||||
++ teba |*(a+_+(* ..ix) |*(b=* %_(done ..ix (a b))))
|
||||
++ teba |*(a+_+(* ..ix) |*(b+* %_(done ..ix (a b))))
|
||||
++ give-json (teba ^give-json)
|
||||
++ pass-note (teba ^pass-note)
|
||||
++ hurl-note
|
||||
@ -1476,7 +1476,7 @@
|
||||
(get-even [%rush [[(slav %p p.a) q.a] r.a] (joba %json b)])
|
||||
::
|
||||
++ get-quit
|
||||
|= a=whir-of ^+ ..ix
|
||||
|= a+whir-of ^+ ..ix
|
||||
(get-even [%quit [[(slav %p p.a) q.a] r.a]])
|
||||
::
|
||||
++ get-ack
|
||||
@ -1608,7 +1608,7 @@
|
||||
__(=+(*stem -(|3 |5.-, q.eve *(map @u even-2))))
|
||||
=+ bolo-2=__([%2 %*(+ *bolo wix *(map ixor stem-2))])
|
||||
=+ bolo-1=__([%1 +(|4 |5.+)]:*bolo-2) :: no lyv
|
||||
|= old=?(bolo bolo-1 bolo-2)
|
||||
|= old+?(bolo bolo-1 bolo-2)
|
||||
^+ ..^$
|
||||
?- -.old
|
||||
$3 ..^$(+>- old)
|
||||
|
@ -1,4 +1,4 @@
|
||||
::::::
|
||||
!:::::
|
||||
:: :: %ford, new execution control
|
||||
!? 164
|
||||
::::
|
||||
@ -22,7 +22,7 @@
|
||||
|% :: structures
|
||||
++ axle :: all %ford state
|
||||
_: $1 :: version for update
|
||||
pol=(map ship baby) ::
|
||||
pol+(map ship baby) ::
|
||||
== ::
|
||||
++ baby :: state by ship
|
||||
_: tad+{p+@ud q+(map @ud task)} :: tasks by number
|
||||
@ -70,7 +70,7 @@
|
||||
++ task :: problem in progress
|
||||
_: nah+duct :: cause
|
||||
{bek+beak kas+silk} :: problem
|
||||
keg=(map (pair term beam) cage) :: block results
|
||||
keg+(map (pair term beam) cage) :: block results
|
||||
kig+{p+@ud q+(map @ud {p+care q+beam})} :: blocks
|
||||
== ::
|
||||
++ gagl (list (pair gage gage))
|
||||
@ -232,7 +232,7 @@
|
||||
:: ~& writ/tea
|
||||
=+ dap=(~(got by deh.bay) dep)
|
||||
=- +>.$(mow mow, deh.bay ?~(dop deh.bay (~(put by deh.bay) dep dop)))
|
||||
^- {dop+_|($~ __(dap)) mow=__(mow)}
|
||||
^- {dop+_|($~ __(dap)) mow+__(mow)}
|
||||
?- -.dap
|
||||
$done `mow :: writ redundant
|
||||
$init ~|(never-subscribed/dep !!)
|
||||
@ -240,7 +240,7 @@
|
||||
:- [%done ~]
|
||||
;: weld
|
||||
(axap dep (~(del in q.dap) bem)) :: cancel outstanding
|
||||
(turn (~(tap in p.dap)) |=(hen=duct [hen %give %news dep]))
|
||||
(turn (~(tap in p.dap)) |=(hen+duct [hen %give %news dep]))
|
||||
mow
|
||||
== ==
|
||||
==
|
||||
@ -871,7 +871,7 @@
|
||||
%+ slop
|
||||
:(slop [[%atom %p] p.mas] [[%atom %tas] q.mas] q.cay)
|
||||
:(slop [[%atom %p] p.mos] [[%atom %tas] q.mos] q.coy)
|
||||
(flux |=(dif=vase [%& u.fom dif]))
|
||||
(flux |=(dif+vase [%& u.fom dif]))
|
||||
==
|
||||
::
|
||||
++ kale :: mutate
|
||||
@ -928,7 +928,7 @@
|
||||
::
|
||||
++ return
|
||||
%- flux
|
||||
|=(a=(map span $~) done(res (~(uni by res) a)))
|
||||
|=(a+(map span $~) done(res (~(uni by res) a)))
|
||||
::
|
||||
++ next
|
||||
|= __(.) => +<
|
||||
@ -1113,10 +1113,10 @@
|
||||
(turn (sloe p.gab) |=(fro+mark [fro for]))
|
||||
?. (slob %grow p.vax) ~
|
||||
=+ gow=(slap vax [%cnzy %grow])
|
||||
(turn (sloe p.gow) |=(too=mark [for too]))
|
||||
(turn (sloe p.gow) |=(too+mark [for too]))
|
||||
::
|
||||
++ lyle :: all mark doors
|
||||
|= cof=cafe ^- (bolt (map mark vase))
|
||||
|= cof+cafe ^- (bolt (map mark vase))
|
||||
=| {sup+path res+(map mark vase)}
|
||||
|^ `(bolt (map mark vase))`wide
|
||||
++ here [bek (welp sup /mar)]
|
||||
@ -1351,7 +1351,7 @@
|
||||
::
|
||||
$core
|
||||
%+ cool |.(leaf/"ford: core {<(tope p.kas)>}")
|
||||
(cope (lear cof p.kas) (flux |=(a=vase [%& %core a])))
|
||||
(cope (lear cof p.kas) (flux |=(a+vase [%& %core a])))
|
||||
::
|
||||
$diff
|
||||
%+ cool |.(leaf/"ford: diff {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}")
|
||||
@ -1407,7 +1407,7 @@
|
||||
(faun cof vax)
|
||||
::
|
||||
$tabl
|
||||
%- cope :_ (flux |=(rex=(list (pair gage gage)) [%tabl rex]))
|
||||
%- cope :_ (flux |=(rex+(list (pair gage gage)) [%tabl rex]))
|
||||
!.
|
||||
|- ^- (bolt (list (pair gage gage)))
|
||||
?~ p.kas (fine cof ~)
|
||||
@ -1808,7 +1808,7 @@
|
||||
%^ maul cof
|
||||
(slap (slap pox [%cnzy %grad]) [%cnzy %pact])
|
||||
q.coy
|
||||
(flux |=(pat=vase [%& p.cay pat]))
|
||||
(flux |=(pat+vase [%& p.cay pat]))
|
||||
==
|
||||
::
|
||||
++ resp
|
||||
@ -1857,18 +1857,18 @@
|
||||
:_ $(a (turn a2 tail))
|
||||
:- p.i.i.a
|
||||
?~ -.q.i.i.a
|
||||
[%& (turn (turn a2 head) |=(b=mass ?~(-.q.b p.q.b !!)))]
|
||||
[%| $(a (turn (turn a2 head) |=(b=mass ?~(-.q.b !! p.q.b))))]
|
||||
[%& (turn (turn a2 head) |=(b+mass ?~(-.q.b p.q.b !!)))]
|
||||
[%| $(a (turn (turn a2 head) |=(b+mass ?~(-.q.b !! p.q.b))))]
|
||||
%+ turn (~(tap by pol))
|
||||
|= {@ baby}
|
||||
:~ =< cache/[%| (turn `(list term)`/hood/bake/lilt/slit/slim/slap/slam .)]
|
||||
=- |=(a=term [a `(~(get ja dep) a)])
|
||||
=< `dep=(jar term *)`(~(rep by jav) .)
|
||||
=- |=(a+term [a `(~(get ja dep) a)])
|
||||
=< `dep+(jar term *)`(~(rep by jav) .)
|
||||
|=({{* a+{term *}} b+(jar term *)} (~(add ja b) a))
|
||||
::
|
||||
=< depends/[%| (turn `(list term)`/init/sent/done .)]
|
||||
=- |=(a=term [a `(~(get ja dep) a)])
|
||||
=< `dep=(jar term *)`(~(rep by deh) .)
|
||||
=- |=(a+term [a `(~(get ja dep) a)])
|
||||
=< `dep+(jar term *)`(~(rep by deh) .)
|
||||
|=({{@ a+{term *}} b+(jar term *)} (~(add ja b) a))
|
||||
::
|
||||
tasks/`[dym tad]
|
||||
@ -1895,7 +1895,7 @@
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=axle
|
||||
|= old+axle
|
||||
..^$(+>- old)
|
||||
:: ..^$
|
||||
::=. old
|
||||
@ -1920,7 +1920,7 @@
|
||||
[~ ~]
|
||||
::
|
||||
++ stay :: save w/o cache
|
||||
`axle`+>-.$(pol (~(run by pol) |=(a=baby [tad.a dym.a deh.a ~])))
|
||||
`axle`+>-.$(pol (~(run by pol) |=(a+baby [tad.a dym.a deh.a ~])))
|
||||
::
|
||||
++ take :: response
|
||||
|= {tea+wire hen+duct hin+(hypo sign)}
|
||||
|
@ -121,7 +121,7 @@
|
||||
:_ +>+(pol.all (~(put by pol.all) our +<+))
|
||||
%- flop
|
||||
%+ turn moz
|
||||
|= a=move
|
||||
|= a+move
|
||||
?. ?=($pass -.q.a) a
|
||||
[p.a %pass [(scot %p our) p.q.a] q.q.a]
|
||||
::
|
||||
@ -134,7 +134,7 @@
|
||||
%_(+> moz :_(moz [hen %pass pax noh]))
|
||||
::
|
||||
++ mo-give
|
||||
|= git=gift-gall
|
||||
|= git+gift-gall
|
||||
%_(+> moz :_(moz [hen %give git]))
|
||||
::
|
||||
++ mo-okay :: valid agent core
|
||||
@ -331,7 +331,7 @@
|
||||
?- -.q.+.sih
|
||||
$tabl ~|(%made-tabl !!)
|
||||
{$&} (mo-give %unto %diff p.q.+>.sih)
|
||||
{$|} =. p.q.+>.sih (turn p.q.+>.sih |=(a=tank rose/[~ "! " ~]^[a]~))
|
||||
{$|} =. p.q.+>.sih (turn p.q.+>.sih |=(a+tank rose/[~ "! " ~]^[a]~))
|
||||
~> %slog.`%*(. >[%wh %y]< +> [>%mo-cyst-fail< (flop p.q.+>.sih)])
|
||||
(mo-give %unto %quit ~) :: XX better errors pls
|
||||
==
|
||||
@ -443,7 +443,7 @@
|
||||
{$&} ap-abet:(ap-pout:pap t.t.t.pax %diff +.q.+>.q.hin)
|
||||
{$|}
|
||||
=+ why=p.q.+>.q.hin
|
||||
=. why (turn why |=(a=tank rose/[~ "! " ~]^[a]~))
|
||||
=. why (turn why |=(a+tank rose/[~ "! " ~]^[a]~))
|
||||
~> %slog.`rose/[" " "[" "]"]^[>%mo-cook-fail< (flop why)]
|
||||
~& [him=q.q.pry our=our pax=pax]
|
||||
::
|
||||
@ -692,7 +692,7 @@
|
||||
=+ ton=(mock [q.hav q.+<.pyz] ap-sled)
|
||||
?- -.ton
|
||||
$0 [%& p.+<.pyz p.ton]
|
||||
$1 [%| (turn p.ton |=(a=* (smyt (path a))))]
|
||||
$1 [%| (turn p.ton |=(a+* (smyt (path a))))]
|
||||
$2 [%| p.ton]
|
||||
==
|
||||
::
|
||||
@ -959,14 +959,14 @@
|
||||
^+ +>
|
||||
=+ cug=(ap-find /lame)
|
||||
?~ cug
|
||||
=. why [>%ap-lame dap wut< (turn why |=(a=tank rose/[~ "! " ~]^[a]~))]
|
||||
=. why [>%ap-lame dap wut< (turn why |=(a+tank rose/[~ "! " ~]^[a]~))]
|
||||
~> %slog.`rose/[" " "[" "]"]^(flop why)
|
||||
+>.$
|
||||
=^ cam +>.$
|
||||
%+ ap-call q.u.cug
|
||||
!>([wut why])
|
||||
?^ cam
|
||||
=. why [>%ap-lame-lame< (turn u.cam |=(a=tank rose/[~ "! " ~]^[a]~))]
|
||||
=. why [>%ap-lame-lame< (turn u.cam |=(a+tank rose/[~ "! " ~]^[a]~))]
|
||||
~> %slog.`rose/[" " "[" "]"]^(welp (flop why) leaf/"." (flop u.cam))
|
||||
+>.$
|
||||
+>.$
|
||||
@ -1140,7 +1140,7 @@
|
||||
=+ ton=(ap-mong [q.gat q.arg] ap-sled)
|
||||
?- -.ton
|
||||
$0 [%& +<.wyz p.ton]
|
||||
$1 [%| (turn p.ton |=(a=* (smyt (path a))))]
|
||||
$1 [%| (turn p.ton |=(a+* (smyt (path a))))]
|
||||
$2 [%| p.ton]
|
||||
==
|
||||
::
|
||||
@ -1222,15 +1222,15 @@
|
||||
:^ hen %give %mass
|
||||
:- %gall
|
||||
:- %|
|
||||
%- |= a=(list (list mass)) ^- (list mass) :: XX single-home
|
||||
%- |= a+(list (list mass)) ^- (list mass) :: XX single-home
|
||||
=+ a2=a
|
||||
?~ a !!
|
||||
?~ i.a ~
|
||||
:_ $(a (turn a2 tail))
|
||||
:- p.i.i.a
|
||||
?~ -.q.i.i.a
|
||||
[%& (turn (turn a2 head) |=(b=mass ?~(-.q.b p.q.b !!)))]
|
||||
[%| $(a (turn (turn a2 head) |=(b=mass ?~(-.q.b !! p.q.b))))]
|
||||
[%& (turn (turn a2 head) |=(b+mass ?~(-.q.b p.q.b !!)))]
|
||||
[%| $(a (turn (turn a2 head) |=(b+mass ?~(-.q.b !! p.q.b))))]
|
||||
%+ turn (~(tap by pol.all))
|
||||
|= {@ mast}
|
||||
:~ foreign/`sap
|
||||
|
181
arvo/hoon.hoon
181
arvo/hoon.hoon
@ -62,7 +62,7 @@
|
||||
++ clue {p+chum q+nock r+(list (pair term nock))} :: battery definition
|
||||
++ coil _: p+?($gold $iron $lead $zinc) :: core type
|
||||
q+type ::
|
||||
r+{p=?($~ ^) q+(map term foot)} ::
|
||||
r+{p+?($~ ^) q+(map term foot)} ::
|
||||
== ::
|
||||
++ coin _% {$$ p+dime} ::
|
||||
{$blob p+*} ::
|
||||
@ -132,13 +132,13 @@
|
||||
++ post _: p+axis ::
|
||||
_= q ::
|
||||
_% {$0 p+type} ::
|
||||
{$1 p+axis q+(list {p=type q=foot})} ::
|
||||
{$1 p+axis q+(list {p+type q+foot})} ::
|
||||
{$2 p+twin q+type} ::
|
||||
== ::
|
||||
== ::
|
||||
++ prop _: p+axis ::
|
||||
_= q ::
|
||||
{p=?($~ axis) q+(list {p+type q+foot})} ::
|
||||
{p+?($~ axis) q+(list {p+type q+foot})} ::
|
||||
== ::
|
||||
++ qual |* {a+_+(* *) b+_+(* *) c+_+(* *) d+_+(* *)} :: just a quadruple
|
||||
{p+a q+b r+c s+d} ::
|
||||
@ -380,7 +380,7 @@
|
||||
q+(list {p+@ud q+(unit {p+@ q+@})}) :: indels
|
||||
== ::
|
||||
++ udon :: abstract delta
|
||||
_: p=umph :: preprocessor
|
||||
_: p+umph :: preprocessor
|
||||
_= q :: patch
|
||||
_% {$a p+* q+*} :: trivial replace
|
||||
{$b p+udal} :: atomic indel
|
||||
@ -643,7 +643,7 @@
|
||||
::
|
||||
++ flit :: make filter
|
||||
|* a+_+(* ?)
|
||||
|* b=*
|
||||
|* b+*
|
||||
?.((a b) ~ [~ u=b])
|
||||
::
|
||||
++ lift :: lift gate (fmap)
|
||||
@ -1060,7 +1060,7 @@
|
||||
::
|
||||
++ vor :: v-order
|
||||
~/ %vor
|
||||
|= {a+* b=*}
|
||||
|= {a+* b+*}
|
||||
^- ?
|
||||
=+ [c=(mug (mug a)) d=(mug (mug b))]
|
||||
?: =(c d)
|
||||
@ -1309,8 +1309,8 @@
|
||||
::
|
||||
++ dn :: decimal float, infinity, or NaN
|
||||
:: (-1)^s * a * 10^e
|
||||
_% {$d s=? e=@s a=@u}
|
||||
{$i s=?}
|
||||
_% {$d s+? e+@s a+@u}
|
||||
{$i s+?}
|
||||
{$n $~}
|
||||
==
|
||||
::
|
||||
@ -1332,7 +1332,7 @@
|
||||
:: infinite exponent range
|
||||
=>
|
||||
~% %cofl +> ~
|
||||
:: internal functions; mostly operating on [e=@s a=@u], in other words
|
||||
:: internal functions; mostly operating on {e+@s a+@u}, in other words
|
||||
:: positive numbers. many of these have undefined behavior if a=0.
|
||||
|%
|
||||
++ rou
|
||||
@ -1797,7 +1797,7 @@
|
||||
--
|
||||
::
|
||||
++ ff :: ieee 754 format fp
|
||||
|_ {{w=@u p=@u b=@s} r=_?($n $u $d $z $a)}
|
||||
|_ {{w+@u p+@u b+@s} r+_?($n $u $d $z $a)}
|
||||
:: this core has no use outside of the functionality
|
||||
:: provided to ++rd, ++rs, ++rq, and ++rh
|
||||
::
|
||||
@ -2252,17 +2252,17 @@
|
||||
++ corl :: compose backwards
|
||||
|* {a+gate b+__(|=(* **))}
|
||||
=< +:|.((a (b))) :: type check
|
||||
|* c=__(+<.b)
|
||||
|* c+__(+<.b)
|
||||
(a (b c))
|
||||
::
|
||||
++ cury :: curry left
|
||||
|* {a+__(|=(^ **)) b+*}
|
||||
|* c=__(+<+.a)
|
||||
|* c+__(+<+.a)
|
||||
(a b c)
|
||||
::
|
||||
++ curr :: curry right
|
||||
|* {a+__(|=(^ **)) c+*}
|
||||
|* b=__(+<+.a)
|
||||
|* b+__(+<+.a)
|
||||
(a b c)
|
||||
::
|
||||
++ gulf :: range list
|
||||
@ -2375,7 +2375,7 @@
|
||||
::
|
||||
+- del :: b without any a
|
||||
~/ %del
|
||||
|* b=*
|
||||
|* b+*
|
||||
|- ^+ a
|
||||
?~ a
|
||||
~
|
||||
@ -2998,7 +2998,7 @@
|
||||
::
|
||||
++ fail |=(tub+nail [p=p.tub q=~]) :: never parse
|
||||
++ full :: has to fully parse
|
||||
|* sef=rule
|
||||
|* sef+rule
|
||||
|= tub+nail
|
||||
=+ vex=(sef tub)
|
||||
?~(q.vex vex ?:(=(~ q.q.u.q.vex) vex [p=p.vex q=~]))
|
||||
@ -3088,7 +3088,7 @@
|
||||
::
|
||||
++ sear :: conditional cook
|
||||
|* {pyq+_+(* (unit)) sef+rule}
|
||||
|= tub=nail
|
||||
|= tub+nail
|
||||
=+ vex=(sef tub)
|
||||
?~ q.vex
|
||||
vex
|
||||
@ -3663,7 +3663,7 @@
|
||||
^- (unit @ta)
|
||||
=+ b=(rip 3 a)
|
||||
=- ?^(b ~ (some (rap 3 (flop c))))
|
||||
=| c=tape
|
||||
=| c+tape
|
||||
|- ^- {b+tape c+tape}
|
||||
?~ b [~ c]
|
||||
?. =('~' i.b)
|
||||
@ -3923,7 +3923,7 @@
|
||||
::
|
||||
++ co
|
||||
~% %co ..co ~
|
||||
=< |_ lot=coin
|
||||
=< |_ lot+coin
|
||||
++ rear |=(rom+tape =>(.(rex rom) rend))
|
||||
++ rent `@ta`(rap 3 rend)
|
||||
++ rend
|
||||
@ -4082,16 +4082,16 @@
|
||||
:- '.'
|
||||
=>(.(rex $(esc t.esc)) ((x-co 4) i.esc))
|
||||
::
|
||||
++ v-co |=(min=@ (em-co [32 min] |=({? b+@ c+tape} [~(v ne b) c])))
|
||||
++ w-co |=(min=@ (em-co [64 min] |=({? b+@ c+tape} [~(w ne b) c])))
|
||||
++ x-co |=(min=@ (em-co [16 min] |=({? b+@ c+tape} [~(x ne b) c])))
|
||||
++ y-co |=(dat=@ ((d-co 2) dat))
|
||||
++ z-co |=(dat=@ `tape`['0' 'x' ((x-co 1) dat)])
|
||||
++ v-co |=(min+@ (em-co [32 min] |=({? b+@ c+tape} [~(v ne b) c])))
|
||||
++ w-co |=(min+@ (em-co [64 min] |=({? b+@ c+tape} [~(w ne b) c])))
|
||||
++ x-co |=(min+@ (em-co [16 min] |=({? b+@ c+tape} [~(x ne b) c])))
|
||||
++ y-co |=(dat+@ ((d-co 2) dat))
|
||||
++ z-co |=(dat+@ `tape`['0' 'x' ((x-co 1) dat)])
|
||||
--
|
||||
|%
|
||||
++ em-co
|
||||
|= {{bas+@ min+@} par+_+({? @ tape} tape)}
|
||||
|= hol=@
|
||||
|= hol+@
|
||||
^- tape
|
||||
?: &(=(0 hol) =(0 min))
|
||||
rex
|
||||
@ -4105,7 +4105,7 @@
|
||||
++ ed-co
|
||||
|= {{bas+@ min+@} par+_+({? @ tape} tape)}
|
||||
=+ [fir=& cou=0]
|
||||
|= hol=@
|
||||
|= hol+@
|
||||
^- {tape @}
|
||||
?: &(=(0 hol) =(0 min))
|
||||
[rex cou]
|
||||
@ -4334,7 +4334,7 @@
|
||||
--
|
||||
++ scot ~/ %scot |=(mol+dime ~(rent co %$ mol))
|
||||
++ scow |=(mol+dime ~(rend co %$ mol))
|
||||
++ slat |=(mod+@tas |=(txt=@ta (slaw mod txt)))
|
||||
++ slat |=(mod+@tas |=(txt+@ta (slaw mod txt)))
|
||||
++ slav |=({mod+@tas txt+@ta} (need (slaw mod txt)))
|
||||
++ slaw
|
||||
~/ %slaw
|
||||
@ -4354,7 +4354,7 @@
|
||||
[~ p.u.q.vex]
|
||||
::
|
||||
++ smyt :: pretty print path
|
||||
|= bon=path ^- tank
|
||||
|= bon+path ^- tank
|
||||
:+ %rose [['/' ~] ['/' ~] ~]
|
||||
(turn bon |=(a+@ [%leaf (trip a)]))
|
||||
::
|
||||
@ -4362,7 +4362,7 @@
|
||||
++ spud |=(pax+path ~(ram re (smyt pax))) :: render path to tape
|
||||
++ stab :: parse cord to path
|
||||
=+ fel=;~(pfix fas (more fas urs:ab))
|
||||
|=(zep=@t `path`(rash zep fel))
|
||||
|=(zep+@t `path`(rash zep fel))
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2eN, pseudo-cryptography ::
|
||||
::
|
||||
@ -4682,7 +4682,7 @@
|
||||
=+ sot=(spot +.i.p.ton)
|
||||
:+ %rose [":" ~ ~]
|
||||
:~ (smyt p.sot)
|
||||
=> [ud=|=(a=@u (scow %ud a)) q.sot]
|
||||
=> [ud=|=(a+@u (scow %ud a)) q.sot]
|
||||
leaf/"<[{(ud p.p)} {(ud q.p)}].[{(ud p.q)} {(ud q.q)}]>"
|
||||
== ==
|
||||
::
|
||||
@ -4965,7 +4965,7 @@
|
||||
::
|
||||
++ tred :: diff a->b
|
||||
|= {a+* b+*} ^- upas
|
||||
=| c=(unit *)
|
||||
=| c+(unit *)
|
||||
=+ d=(axes 1 a)
|
||||
|- ^- upas
|
||||
=> .(c (~(get by d) b))
|
||||
@ -5045,7 +5045,7 @@
|
||||
?: =((mul 100 a) d)
|
||||
~|(%ar-ramp !!)
|
||||
=+ e=(~(raw og c) a)
|
||||
?: &((levy b |=(f=@ !=(1 (mod e f)))) (pram e))
|
||||
?: &((levy b |=(f+@ !=(1 (mod e f)))) (pram e))
|
||||
e
|
||||
$(c +(c), d (shax d))
|
||||
::
|
||||
@ -5286,7 +5286,7 @@
|
||||
$(m +(m), d (weld d (limo [0 ~])))
|
||||
++ sube :: s-box word
|
||||
|= {a+@ b+@} ^- @
|
||||
(rep 3 (turn (pode 3 4 a) |=(c=@ (cut 3 [c 1] b))))
|
||||
(rep 3 (turn (pode 3 4 a) |=(c+@ (cut 3 [c 1] b))))
|
||||
--
|
||||
|%
|
||||
++ be :: block cipher
|
||||
@ -5746,7 +5746,7 @@
|
||||
++ hsl :: w/length
|
||||
~/ %hsl
|
||||
|= {p+@ pl+@ s+@ sl+@ n+@ r+@ z+@ d+@}
|
||||
=| v=(list (list @))
|
||||
=| v+(list (list @))
|
||||
=> .(p (end 3 pl p), s (end 3 sl s))
|
||||
=+ u=(mul (mul 128 r) z)
|
||||
?> ?& =(n (bex (dec (xeb n)))) :: n is power of 2
|
||||
@ -5771,7 +5771,7 @@
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2eY, SHA-256 (move me) ::
|
||||
::
|
||||
++ shad |=(ruz=@ (shax (shax ruz))) :: double sha-256
|
||||
++ shad |=(ruz+@ (shax (shax ruz))) :: double sha-256
|
||||
++ shaf :: half sha-256
|
||||
|= {sal+@ ruz+@}
|
||||
=+ haz=(shas sal ruz)
|
||||
@ -5915,7 +5915,7 @@
|
||||
[[256 d] $(c d, b (sub b 256))]
|
||||
::
|
||||
++ raws :: random bits
|
||||
|= b=@ :: continuation
|
||||
|= b+@ :: continuation
|
||||
=+ r=(raw b)
|
||||
[r +>.$(a (shas %og-s r))]
|
||||
--
|
||||
@ -6143,11 +6143,11 @@
|
||||
{s+$t c+*} (shop c.vem |=(a+@ ~(rt at a)))
|
||||
{s+$v c+*} (shop c.vem |=(a+@ ~(ruv at a)))
|
||||
{s+$x c+*} (shop c.vem |=(a+@ ~(rux at a)))
|
||||
{s+{$m p=@} c+*} (shep p.s.vem c.vem)
|
||||
{s+{$r p=@} c+*}
|
||||
{s+{$m p+@} c+*} (shep p.s.vem c.vem)
|
||||
{s+{$r p+@} c+*}
|
||||
$(vem [[%r ' ' (cut 3 [0 1] p.s.vem) (cut 3 [1 1] p.s.vem)] c.vem])
|
||||
::
|
||||
{s={$r p=@ q=@ r=@} c=*}
|
||||
{s+{$r p+@ q+@ r+@} c+*}
|
||||
:+ %rose
|
||||
:* p=(mesc (trip p.s.vem))
|
||||
q=(mesc (trip q.s.vem))
|
||||
@ -6213,8 +6213,8 @@
|
||||
++ rt `tape`['\'' (weld (mesc (trip a)) `tape`['\'' ~])]
|
||||
++ rta rt
|
||||
++ rtam `tape`['%' (trip a)]
|
||||
++ rub `tape`['0' 'b' (rum 2 ~ |=(b=@ (add '0' b)))]
|
||||
++ rud (rum 10 ~ |=(b=@ (add '0' b)))
|
||||
++ rub `tape`['0' 'b' (rum 2 ~ |=(b+@ (add '0' b)))]
|
||||
++ rud (rum 10 ~ |=(b+@ (add '0' b)))
|
||||
++ rum
|
||||
|= {b+@ c+tape d+_+(@ @)}
|
||||
^- tape
|
||||
@ -6279,7 +6279,7 @@
|
||||
^- type
|
||||
?:(|(=(%void der) =(%void s.bid)) %void [%bull bid der])
|
||||
::
|
||||
++ cain |=(vax=vase (sell vax)) :: $+(vase tank) for #>
|
||||
++ cain |=(vax+vase (sell vax)) :: $+(vase tank) for #>
|
||||
++ cell :: make %cell type
|
||||
~/ %cell
|
||||
|= {hed+type tal+type}
|
||||
@ -6773,7 +6773,7 @@
|
||||
%whip whip
|
||||
==
|
||||
=+ [nag=`*`& gom=`axis`1]
|
||||
|_ sec=tile
|
||||
|_ sec+tile
|
||||
::::
|
||||
++ blah ^~ [%dtzz %$ 0]
|
||||
++ home |=(gen+twig ^-(twig ?:(=(1 gom) gen [%tsgr [~ gom] gen])))
|
||||
@ -6840,7 +6840,7 @@
|
||||
?:(?=({$0 $~} p.got) p.sec [%1 p.sec p.got])
|
||||
::
|
||||
++ whip
|
||||
|= axe=axis
|
||||
|= axe+axis
|
||||
=+ ^= tun
|
||||
|= noy+_+(* twig)
|
||||
^- twig
|
||||
@ -6853,7 +6853,7 @@
|
||||
^- twig
|
||||
?- sec
|
||||
{^ *}
|
||||
%- tun |= gon=* => .(nag gon) ^- twig
|
||||
%- tun |= gon+* => .(nag gon) ^- twig
|
||||
:- ^$(sec -.sec, nag -.nag, axe (peg axe 2))
|
||||
^$(sec +.sec, nag +.nag, axe (peg axe 3))
|
||||
::
|
||||
@ -6893,7 +6893,7 @@
|
||||
[%ktts p.sec $(sec q.sec)]
|
||||
::
|
||||
{$bush *}
|
||||
%- tun |= gon=* => .(nag gon) ^- twig
|
||||
%- tun |= gon+* => .(nag gon) ^- twig
|
||||
?@ -.nag
|
||||
?: =(& -.nag)
|
||||
[%wtpt [[%& (peg axe 2)] ~] ^$(sec q.sec) ^$(sec p.sec)]
|
||||
@ -6919,7 +6919,7 @@
|
||||
$(sec cys)
|
||||
::
|
||||
{$kelp *}
|
||||
%- tun |= gon=* => .(nag gon)
|
||||
%- tun |= gon+* => .(nag gon)
|
||||
|- ^- twig
|
||||
?~ t.p.sec
|
||||
:- [%dtzz +.p.i.p.sec]
|
||||
@ -6954,7 +6954,7 @@
|
||||
%open open
|
||||
%rake rake
|
||||
==
|
||||
|_ gen=twig
|
||||
|_ gen+twig
|
||||
++ etch
|
||||
~| %etch
|
||||
|- ^- term
|
||||
@ -7028,7 +7028,10 @@
|
||||
{$ktts *} ?. ?=(@ p.gen)
|
||||
[%herb gen] :: XX dubious
|
||||
[%bark p.gen boil(gen q.gen)]
|
||||
{$zpcb *} boil(gen q.gen)
|
||||
{$zpcb *} ?. ?=({$ktts *} q.gen)
|
||||
boil(gen q.gen)
|
||||
~> %slog.[0 (show %o p.gen)]
|
||||
boil(gen q.gen)
|
||||
==
|
||||
::
|
||||
++ open
|
||||
@ -7046,7 +7049,7 @@
|
||||
=+ lyg=~(cloq al p.gen)
|
||||
:+ %brcb q.lyg
|
||||
%- ~(run by q.gen)
|
||||
|= a=foot ^- foot
|
||||
|= a+foot ^- foot
|
||||
?. ?=($elm -.a) a
|
||||
:- -.a
|
||||
:+ %tsgl p.a
|
||||
@ -7562,23 +7565,23 @@
|
||||
|- ^- type
|
||||
?- sut
|
||||
{$atom *} %void
|
||||
{$bull *} (reco |=(p=type (bull p.sut ^$(sut p))))
|
||||
{$bull *} (reco |=(p+type (bull p.sut ^$(sut p))))
|
||||
{$cell *}
|
||||
?: =(2 now)
|
||||
(cell ^$(p.poz lat, sut p.sut) q.sut)
|
||||
(cell p.sut ^$(p.poz lat, sut q.sut))
|
||||
::
|
||||
{$core *} ?.(=(3 now) sut (core ^$(p.poz lat, sut p.sut) q.sut))
|
||||
{$cube *} (reco |=(p=type ^$(sut p)))
|
||||
{$face *} (reco |=(p=type (face p.sut ^$(sut p))))
|
||||
{$cube *} (reco |=(p+type ^$(sut p)))
|
||||
{$face *} (reco |=(p+type (face p.sut ^$(sut p))))
|
||||
{$fork *}
|
||||
?: (~(has in vil) sut)
|
||||
%void
|
||||
=> .(vil (~(put in vil) sut))
|
||||
(fork $(sut p.sut) $(sut q.sut))
|
||||
::
|
||||
{$hold *} (reco |=(p=type ^$(sut p)))
|
||||
$noun (reco |=(p=type ^$(sut p)))
|
||||
{$hold *} (reco |=(p+type ^$(sut p)))
|
||||
$noun (reco |=(p+type ^$(sut p)))
|
||||
$void %void
|
||||
==
|
||||
::
|
||||
@ -7599,7 +7602,7 @@
|
||||
=< `tank`-:$
|
||||
|%
|
||||
++ many
|
||||
|= haz=(list wine)
|
||||
|= haz+(list wine)
|
||||
^- {(list tank) (set @ud)}
|
||||
?~ haz [~ gid]
|
||||
=^ mor gid $(haz t.haz)
|
||||
@ -7672,7 +7675,7 @@
|
||||
~| [%lump lum]
|
||||
~| [%ham ham]
|
||||
%- need
|
||||
=| gil=(set {@ud *})
|
||||
=| gil+(set {@ud *})
|
||||
|- ^- (unit tank)
|
||||
?- q.ham
|
||||
$noun
|
||||
@ -8003,7 +8006,7 @@
|
||||
++ duck ^-(tank (dial dole))
|
||||
++ dune |.(duck)
|
||||
++ dunk
|
||||
|= paz=term ^- tank
|
||||
|= paz+term ^- tank
|
||||
:+ %palm
|
||||
[['.' ~] ['-' ~] ~ ~]
|
||||
[[%leaf (mesc (trip paz))] duck ~]
|
||||
@ -8273,7 +8276,7 @@
|
||||
==
|
||||
::
|
||||
++ harp
|
||||
|= dab=(map term foot)
|
||||
|= dab+(map term foot)
|
||||
^- ?($~ ^)
|
||||
?: ?=($~ dab)
|
||||
~
|
||||
@ -8684,9 +8687,9 @@
|
||||
|= {tel+? ref+type}
|
||||
^- ?
|
||||
=| $^
|
||||
_: gem=(set {p+type q+type}) :: prune ref
|
||||
gul=(set {p+type q+type}) :: assume match
|
||||
meg=(set {p+type q+type}) :: prune sut
|
||||
_: gem+(set {p+type q+type}) :: prune ref
|
||||
gul+(set {p+type q+type}) :: assume match
|
||||
meg+(set {p+type q+type}) :: prune sut
|
||||
==
|
||||
=< dext
|
||||
|%
|
||||
@ -8897,7 +8900,7 @@
|
||||
++ play
|
||||
~/ %play
|
||||
=> .(vet |)
|
||||
|= gen=twig
|
||||
|= gen+twig
|
||||
^- type
|
||||
?- gen
|
||||
{^ *} (cell $(gen p.gen) $(gen q.gen))
|
||||
@ -8947,7 +8950,7 @@
|
||||
==
|
||||
::
|
||||
++ reco
|
||||
|* fuy=__(|=(p+type p))
|
||||
|* fuy+__(|=(p+type p))
|
||||
=+ por=repo
|
||||
=+ yot=(fuy por)
|
||||
?: =(yot por)
|
||||
@ -9116,7 +9119,7 @@
|
||||
;~(plug (star low) (star hig))
|
||||
::
|
||||
++ plex
|
||||
|= gen=twig ^- (unit path)
|
||||
|= gen+twig ^- (unit path)
|
||||
?: ?=({$zpcb *} gen)
|
||||
$(gen q.gen)
|
||||
?. ?=({$clsg *} gen) ~
|
||||
@ -9169,16 +9172,16 @@
|
||||
%+ biff
|
||||
?~ pre `u=wom
|
||||
%+ bind (poon wom u.pre)
|
||||
|= moz=(list twig)
|
||||
|= moz+(list twig)
|
||||
?~(pof moz (weld moz (slag (lent u.pre) wom)))
|
||||
|= yez=(list twig)
|
||||
|= yez+(list twig)
|
||||
?~ pof `yez
|
||||
=+ zey=(flop yez)
|
||||
=+ [moz=(scag p.u.pof zey) gul=(slag p.u.pof zey)]
|
||||
=+ zom=(poon (flop moz) q.u.pof)
|
||||
?~(zom ~ `(weld (flop gul) u.zom))
|
||||
::
|
||||
++ poof |=(pax=path ^-(tusk (turn pax |=(a+@ta [%dtzy %ta a]))))
|
||||
++ poof |=(pax+path ^-(tusk (turn pax |=(a+@ta [%dtzy %ta a]))))
|
||||
++ poon
|
||||
|= {pag+tusk goo+tyke}
|
||||
^- (unit tusk)
|
||||
@ -9301,7 +9304,7 @@
|
||||
==
|
||||
::
|
||||
++ hig :: simple head
|
||||
(cook |=({a+twig b=(list twig)} [a %clsg b]) hog)
|
||||
(cook |=({a+twig b+(list twig)} [a %clsg b]) hog)
|
||||
::
|
||||
++ hog :: tag head
|
||||
%+ cook
|
||||
@ -9338,7 +9341,7 @@
|
||||
_: a+twig :: XX translation
|
||||
b+(list {@tas @tas})
|
||||
c+_|($~ {p+@tas q+twig})
|
||||
d=(list twig)
|
||||
d+(list twig)
|
||||
==
|
||||
::
|
||||
++ hul :: tall preface
|
||||
@ -9373,7 +9376,7 @@
|
||||
;~ pose
|
||||
;~ pfix ace
|
||||
%+ cook
|
||||
|= a=tape
|
||||
|= a+tape
|
||||
[%a %smdq (weld a `tape`[`@`10 ~])]
|
||||
(star (shim 32 255))
|
||||
==
|
||||
@ -9431,7 +9434,7 @@
|
||||
==
|
||||
::
|
||||
++ rab :: beet to tuna
|
||||
|= reb=(list beet)
|
||||
|= reb+(list beet)
|
||||
^- (list tuna)
|
||||
=| {sim+(list @) tuz+(list tuna)}
|
||||
|- ^- (list tuna)
|
||||
@ -9533,7 +9536,7 @@
|
||||
(stag %dtls ;~(pfix lus (ifix [pel per] wide)))
|
||||
::
|
||||
%+ cook
|
||||
|= a=(list (list beer))
|
||||
|= a+(list (list beer))
|
||||
:- %clfs
|
||||
[%smdq |-(?~(a ~ (weld i.a $(a t.a))))]
|
||||
(most dog ;~(pfix lus soil))
|
||||
@ -9545,7 +9548,7 @@
|
||||
(stag %dtzy tash:so)
|
||||
::
|
||||
%+ cook
|
||||
|= a=(list (list beer))
|
||||
|= a+(list (list beer))
|
||||
[%clsg (phax a)]
|
||||
(most dog ;~(pfix hep soil))
|
||||
::
|
||||
@ -9656,7 +9659,7 @@
|
||||
==
|
||||
++ sump (ifix [kel ker] (stag %cltr (most ace wide)))
|
||||
++ noil
|
||||
|= tol=?
|
||||
|= tol+?
|
||||
=< ;~ pfix buc
|
||||
%- stew
|
||||
^. stet ^. limo
|
||||
@ -9666,7 +9669,7 @@
|
||||
==
|
||||
|%
|
||||
++ toad
|
||||
|* har=__(exqa)
|
||||
|* har+__(exqa)
|
||||
=+ dur=(ifix [pel per] $:har(tol |))
|
||||
?:(tol ;~(pose ;~(pfix gap $:har(tol &)) dur) dur)
|
||||
::
|
||||
@ -9676,7 +9679,7 @@
|
||||
::
|
||||
++ gunk ~+((glue muck))
|
||||
++ muck ?:(tol gap ace)
|
||||
++ butt |*(zor=rule ?:(tol ;~(sfix zor ;~(plug gap duz)) zor))
|
||||
++ butt |*(zor+rule ?:(tol ;~(sfix zor ;~(plug gap duz)) zor))
|
||||
++ loaf ?:(tol howl toil)
|
||||
++ lobe ?:(tol tall wide)
|
||||
++ exqa |.(loaf)
|
||||
@ -9901,7 +9904,7 @@
|
||||
(most muck boog)
|
||||
::
|
||||
++ toad :: untrap parser exp
|
||||
|* har=__(expa)
|
||||
|* har+__(expa)
|
||||
=+ dur=(ifix [pel per] $:har(tol |))
|
||||
?:(tol ;~(pose ;~(pfix gap $:har(tol &)) dur) dur)
|
||||
::
|
||||
@ -9911,9 +9914,9 @@
|
||||
::
|
||||
++ glop ~+((glue mash)) :: separated by space
|
||||
++ gunk ~+((glue muck)) :: separated list
|
||||
++ butt |* zor=rule :: closing == if tall
|
||||
++ butt |* zor+rule :: closing == if tall
|
||||
?:(tol ;~(sfix zor ;~(plug gap duz)) zor)
|
||||
++ ulva |* zor=rule :: closing -- and tall
|
||||
++ ulva |* zor+rule :: closing -- and tall
|
||||
?.(tol fail ;~(sfix zor ;~(plug gap dun)))
|
||||
++ hank (most muck loaf) :: gapped twigs
|
||||
++ loaf ?:(tol tall wide) :: hoon, current width
|
||||
@ -10019,8 +10022,8 @@
|
||||
==
|
||||
++ bono |. :: term, wing, 2 twigs
|
||||
;~ gunk :: (as twigs)
|
||||
(cook |=(cog=term [%cnzz [cog ~]]) sym)
|
||||
(cook |=(hyp=wing [%cnzz hyp]) rope)
|
||||
(cook |=(cog+term [%cnzz [cog ~]]) sym)
|
||||
(cook |=(hyp+wing [%cnzz hyp]) rope)
|
||||
loaf
|
||||
loaf
|
||||
==
|
||||
@ -10057,8 +10060,8 @@
|
||||
^- (unit twig)
|
||||
?- -.vil
|
||||
$col [~ %tsgl ros p.vil]
|
||||
$pel (bind ~(reek ap ros) |=(hyp=wing [%cnts hyp p.vil]))
|
||||
$pat (bind ~(reek ap ros) |=(hyp=wing [%bcpt hyp p.vil]))
|
||||
$pel (bind ~(reek ap ros) |=(hyp+wing [%cnts hyp p.vil]))
|
||||
$pat (bind ~(reek ap ros) |=(hyp+wing [%bcpt hyp p.vil]))
|
||||
$ket [~ ros p.vil]
|
||||
$lus =+ tog=~(hock ap ros)
|
||||
?.(?=(@ tog) ~ [~ %cbts tog p.vil])
|
||||
@ -10163,7 +10166,7 @@
|
||||
fail
|
||||
==
|
||||
++ wart
|
||||
|* zor=rule
|
||||
|* zor+rule
|
||||
%+ here
|
||||
|= {a+pint b+twig}
|
||||
?:(bug [%zpcb [wer a] b] b)
|
||||
@ -10172,7 +10175,7 @@
|
||||
::
|
||||
++ vest
|
||||
~/ %vest
|
||||
|= tub=nail
|
||||
|= tub+nail
|
||||
~| %vest
|
||||
^- (like twig)
|
||||
%. tub
|
||||
@ -10180,7 +10183,7 @@
|
||||
(ifix [gay gay] tall:vast)
|
||||
::
|
||||
++ vice
|
||||
|= txt=@ta
|
||||
|= txt+@ta
|
||||
^- twig
|
||||
(rash txt wide:vast)
|
||||
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@ -10533,7 +10536,7 @@
|
||||
^- (unit (pair move worm))
|
||||
%+ biff ((soft duct) -.q.wec)
|
||||
|= a+duct
|
||||
%- bind :_ |=(b=(pair arvo worm) [`move`[a p.b] q.b])
|
||||
%- bind :_ |=(b+(pair arvo worm) [`move`[a p.b] q.b])
|
||||
=- ?- -.har
|
||||
{$|} ~& [%dead-card p.har] ~ :: XX properly log?
|
||||
{$&} (some p.har)
|
||||
@ -10670,7 +10673,7 @@
|
||||
::
|
||||
++ is :: operate in time
|
||||
|= {vil+vile eny+@ bud+vase niz+(pair worm (list {p+@tas q+vase}))}
|
||||
|_ now=@da
|
||||
|_ now+@da
|
||||
++ beck
|
||||
^- slad
|
||||
|= {fur+(unit (set monk)) ron+term bed+beam}
|
||||
@ -10911,7 +10914,7 @@
|
||||
::
|
||||
++ veer :: install vane/tang
|
||||
|= {now+@da fav+curd}
|
||||
=> .(fav ((hard {$veer lal=@ta pax=path txt=@t}) fav))
|
||||
=> .(fav ((hard {$veer lal+@ta pax+path txt+@t}) fav))
|
||||
?: =(%$ lal.fav)
|
||||
~& [%tang pax.fav `@p`(mug txt.fav)]
|
||||
=+ gen=(rain pax.fav txt.fav)
|
||||
|
324
arvo/zuse.hoon
324
arvo/zuse.hoon
@ -1,4 +1,4 @@
|
||||
::
|
||||
::
|
||||
:: zuse (3), standard library (tang)
|
||||
::
|
||||
~% %zuse + ~
|
||||
@ -120,7 +120,7 @@
|
||||
|= {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)))
|
||||
=+ 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)
|
||||
@ -130,7 +130,7 @@
|
||||
^- (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)))
|
||||
=+ gox=?:(det [p=bod q=0] ((hard {p+@ q+@}) (cue bod)))
|
||||
=+ dog=(punt p.gox)
|
||||
=+ pig=(dap mx 256 dog)
|
||||
=+ ^= cow
|
||||
@ -201,7 +201,7 @@
|
||||
++ nol
|
||||
|= a+@
|
||||
^+ ^?(..nu)
|
||||
=+ b=((hard {p=@ q=@}) (cue a))
|
||||
=+ b=((hard {p+@ q+@}) (cue a))
|
||||
..nu(mos (mul p.b q.b), pon [~ (ersa p.b q.b)])
|
||||
--
|
||||
--
|
||||
@ -415,9 +415,9 @@
|
||||
^- tape
|
||||
=+ wey=(daws yed)
|
||||
;: weld
|
||||
`tape`(snag wey (turn wik:yu |=(a=tape (scag 3 a))))
|
||||
`tape`(snag wey (turn wik:yu |=(a+tape (scag 3 a))))
|
||||
", " ~(rud at d.t.yed) " "
|
||||
`tape`(snag (dec m.yed) (turn mon:yu |=(a=tape (scag 3 a))))
|
||||
`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)
|
||||
" " "+0000"
|
||||
@ -426,7 +426,7 @@
|
||||
++ stud !: :: parse UTC format
|
||||
=< |= a+cord :: expose parsers
|
||||
%+ biff (rush a (more sepa elem))
|
||||
|= b=(list __((wonk *elem))) ^- (unit date)
|
||||
|= b+(list __((wonk *elem))) ^- (unit date)
|
||||
=- ?.((za:jo -) ~ (some (zp:jo -)))
|
||||
^+ =+ [*date u=unit]
|
||||
*{(u __([a y])) (u __(m)) (u __(d.t)) (u __(+.t)) $~}
|
||||
@ -465,7 +465,7 @@
|
||||
--
|
||||
::
|
||||
++ unt :: UGT to UTC time
|
||||
|= a=@
|
||||
|= a+@
|
||||
(div (sub a ~1970.1.1) ~s1)
|
||||
::
|
||||
++ yu :: UTC format constants
|
||||
@ -533,7 +533,7 @@
|
||||
(cold ~ (jest 'null'))
|
||||
(stag %b bool)
|
||||
(stag %s stri)
|
||||
(cook |=(s=tape [%n p=(rap 3 s)]) numb)
|
||||
(cook |=(s+tape [%n p=(rap 3 s)]) numb)
|
||||
abox
|
||||
obox
|
||||
==
|
||||
@ -583,7 +583,7 @@
|
||||
++ mayb |*(bus+rule ;~(pose bus (easy "")))
|
||||
++ twel |=({a+tape b+tape} (weld a b))
|
||||
++ piec
|
||||
|* bus=rule
|
||||
|* bus+rule
|
||||
(cook |=(a+@ [a ~]) bus)
|
||||
--
|
||||
::
|
||||
@ -629,7 +629,7 @@
|
||||
==
|
||||
::
|
||||
++ poxo :: node to tape
|
||||
=< |=(a=manx `tape`(apex a ~))
|
||||
=< |=(a+manx `tape`(apex a ~))
|
||||
|_ __([unq=`?`| cot=`?`|]) :: self-close all tags
|
||||
++ apex :: top level
|
||||
|= {mex+manx rez+tape}
|
||||
@ -643,7 +643,7 @@
|
||||
:- '<'
|
||||
%+ welp tam
|
||||
=- ?~(att rez [' ' (attr att rez)])
|
||||
^- rez=tape
|
||||
^- rez+tape
|
||||
?: &(?=($~ c.mex) |(cot (clot man)))
|
||||
[' ' '/' '>' rez]
|
||||
:- '>'
|
||||
@ -819,7 +819,7 @@
|
||||
++ da :: UTC date
|
||||
|= jon+json
|
||||
?. ?=({$s *} jon) ~
|
||||
(bind (stud p.jon) |=(a=date (year a)))
|
||||
(bind (stud p.jon) |=(a+date (year a)))
|
||||
::
|
||||
++ di :: millisecond date
|
||||
%- cu :_ ni
|
||||
@ -871,8 +871,8 @@
|
||||
[?~(ten ~ (+.-.wer u.ten)) ((ot-raw +.wer) jom)]
|
||||
::
|
||||
++ om :: object as map
|
||||
|* wit=fist
|
||||
|= jon=json
|
||||
|* wit+fist
|
||||
|= jon+json
|
||||
?. ?=({$o *} jon) ~
|
||||
(zm (~(run by p.jon) wit))
|
||||
::
|
||||
@ -897,7 +897,7 @@
|
||||
?.(?=({$s *} jon) ~ (some (trip p.jon)))
|
||||
::
|
||||
++ so :: string as cord
|
||||
|= jon=json
|
||||
|= jon+json
|
||||
?.(?=({$s *} jon) ~ (some p.jon))
|
||||
::
|
||||
++ su :: parse string
|
||||
@ -908,7 +908,7 @@
|
||||
::
|
||||
++ ul |=(jon+json ?~(jon (some ~) ~)) :: null
|
||||
++ za :: full unit pole
|
||||
|* pod=(pole (unit))
|
||||
|* pod+(pole (unit))
|
||||
?~ pod &
|
||||
?~ -.pod |
|
||||
(za +.pod)
|
||||
@ -932,7 +932,7 @@
|
||||
::
|
||||
++ zm :: collapse unit map
|
||||
|* lum+(map term (unit))
|
||||
?: (~(rep by lum) |=({{@ a=(unit)} b=__(|)} |(b ?=($~ a))))
|
||||
?: (~(rep by lum) |=({{@ a+(unit)} b+__(|)} |(b ?=($~ a))))
|
||||
~
|
||||
(some (~(run by lum) need))
|
||||
--
|
||||
@ -978,7 +978,7 @@
|
||||
=> .(+< [a b]=+<)
|
||||
(scan a (parsf b))
|
||||
++ parsf :: make parser from:
|
||||
|^ |* a=(pole __(:/(*{_&(rule tape)}))) :: ;"chars{rule}chars"
|
||||
|^ |* a+(pole __(:/(*{_&(rule tape)}))) :: ;"chars{rule}chars"
|
||||
%- cook :_ (bill (norm a))
|
||||
|* (list)
|
||||
?~ +< ~
|
||||
@ -1018,7 +1018,7 @@
|
||||
::
|
||||
++ tell :: wall to octstream
|
||||
|= wol+wall ^- octs
|
||||
=+ buf=(rap 3 (turn wol |=(a=tape (crip (weld a `tape`[`@`10 ~])))))
|
||||
=+ buf=(rap 3 (turn wol |=(a+tape (crip (weld a `tape`[`@`10 ~])))))
|
||||
[(met 3 buf) buf]
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 3bF, filesystem interface ::
|
||||
@ -1084,11 +1084,11 @@
|
||||
^- (unit beam)
|
||||
?. ?=({* * * *} pax) ~
|
||||
%+ biff (slaw %p i.pax)
|
||||
|= who=ship
|
||||
|= who+ship
|
||||
%+ biff (slaw %tas i.t.pax)
|
||||
|= dex=desk
|
||||
|= dex+desk
|
||||
%+ biff (slay i.t.t.pax)
|
||||
|= cis=coin
|
||||
|= cis+coin
|
||||
?. ?=({$$ case} cis) ~
|
||||
`(unit beam)`[~ [who dex `case`p.cis] (flop t.t.t.pax)]
|
||||
::
|
||||
@ -1106,7 +1106,7 @@
|
||||
[~ ~]
|
||||
?^ t.rax
|
||||
[p.pok [ire q.pok]]:[pok=$(rax t.rax) ire=i.rax]
|
||||
=+ ^- raf=(like term)
|
||||
=+ ^- raf+(like term)
|
||||
=> |=(a+@ ((sand %tas) (crip (flop (trip a)))))
|
||||
(;~(sfix (sear . sym) dot) [1^1 (flop (trip i.rax))])
|
||||
?~ q.raf
|
||||
@ -1144,7 +1144,7 @@
|
||||
==
|
||||
::
|
||||
++ sifo :: 64-bit encode
|
||||
|= tig=@
|
||||
|= tig+@
|
||||
^- tape
|
||||
=+ poc=(~(dif fo 3) 0 (met 3 tig))
|
||||
=+ pad=(lsh 3 poc (swap 3 tig))
|
||||
@ -1159,8 +1159,8 @@
|
||||
(weld (flop (slag poc sif)) (reap poc '='))
|
||||
::
|
||||
++ ofis :: XX broken
|
||||
=- |=(a=cord (rash a fel))
|
||||
=< fel=(cook |+(a=@ `@t`(swap 3 a)) (bass 64 .))
|
||||
=- |=(a+cord (rash a fel))
|
||||
=< fel=(cook |+(a+@ `@t`(swap 3 a)) (bass 64 .))
|
||||
=- (cook welp ;~(plug (plus siw) (stun 0^2 (cold %0 tis))))
|
||||
^= siw
|
||||
;~ pose
|
||||
@ -1178,7 +1178,7 @@
|
||||
=> .(b `(tup a)`b)
|
||||
?~ +.a [(scot -.a b) ~]
|
||||
[(scot -.a -.b) `(paf +.a)`(..$ +.a +.b)]
|
||||
:- paf=|*(a=(pole) ?~(a $~ {(odo:raid -.a(. %ta)) (..$ +.a)}))
|
||||
:- paf=|*(a+(pole) ?~(a $~ {(odo:raid -.a(. %ta)) (..$ +.a)}))
|
||||
tup=|*({a+@tas b+(pole @tas)} =+(c=(odo:raid a) ?~(b c {c (..$ b)})))
|
||||
::
|
||||
:: .= [p=%ack q=~sarnel r=&]
|
||||
@ -1251,7 +1251,7 @@
|
||||
pul(q.q [(rsh 3 1 (scot %p who)) q.q.pul])
|
||||
::
|
||||
++ earn :: purl to tape
|
||||
=< |=(pul=purl `tape`(apex ~ pul))
|
||||
=< |=(pul+purl `tape`(apex ~ pul))
|
||||
|%
|
||||
++ apex
|
||||
|= qur+quri
|
||||
@ -1305,7 +1305,7 @@
|
||||
%+ cook deft
|
||||
(ifix [fas ;~(pose fas (easy ~))] (more fas smeg))
|
||||
++ aurf :: 2396 with fragment
|
||||
%+ cook |+(a=purf a)
|
||||
%+ cook |+(a+purf a)
|
||||
;~(plug auri (punt ;~(pfix hax (cook crip (star pque)))))
|
||||
++ auri :: 2396 URL
|
||||
%+ cook
|
||||
@ -1326,7 +1326,7 @@
|
||||
(most ;~(plug sem ace) ;~(plug toke ;~(pfix tis tosk)))
|
||||
++ dlab :: 2396 domainlabel
|
||||
%+ sear
|
||||
|= a=@ta
|
||||
|= a+@ta
|
||||
?.(=('-' (rsh 3 (dec (met 3 a)) a)) [~ u=a] ~)
|
||||
%+ cook cass
|
||||
;~(plug aln (star alp))
|
||||
@ -1397,7 +1397,7 @@
|
||||
==
|
||||
++ zest :: 2616 request-uri
|
||||
;~ pose
|
||||
(stag %& (cook |=(a=purl a) auri))
|
||||
(stag %& (cook |=(a+purl a) auri))
|
||||
(stag %| ;~(plug apat yque))
|
||||
==
|
||||
--
|
||||
@ -1418,253 +1418,7 @@
|
||||
::
|
||||
++ glam :: carrier names
|
||||
|= zar+@pD ^- 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"
|
||||
"Suleiman the Magnificent" "Pedro II" "Genghis Khan" "Laozi"
|
||||
"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"
|
||||
"Ataturk"
|
||||
==
|
||||
::
|
||||
++ glon :: ISO language codes
|
||||
|= 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"]
|
||||
$sl [~ "Slovenian"]
|
||||
$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"]
|
||||
==
|
||||
(weld "galaxy " (scow %p zar))
|
||||
::
|
||||
++ gnom :: ship display name
|
||||
|= {{our+@p now+@da} him+@p} ^- @t
|
||||
@ -1705,7 +1459,7 @@
|
||||
(skim (~(tap by sup.hid)) fun)
|
||||
::
|
||||
++ prix :: filter gate
|
||||
|= pax=path |= sink ^- ?
|
||||
|= pax+path |= sink ^- ?
|
||||
?~ pax & ?~ r.+< |
|
||||
&(=(i.pax i.r.+<) $(pax t.pax, r.+< t.r.+<))
|
||||
::
|
||||
@ -1759,7 +1513,7 @@
|
||||
++ pack :: light path encoding
|
||||
|= {a+term b+path} ^- span
|
||||
%+ rap 3 :- (wack a)
|
||||
(turn b |=(c=span (cat 3 '_' (wack c))))
|
||||
(turn b |=(c+span (cat 3 '_' (wack c))))
|
||||
::
|
||||
++ puck :: light path decoding
|
||||
=+ fel=(most cab (sear wick urt:ab))
|
||||
@ -1982,10 +1736,10 @@
|
||||
++ hoke %+ each {$localhost $~} :: local host
|
||||
?($.0.0.0.0 $.127.0.0.1) ::
|
||||
++ httq :: raw http request
|
||||
_: p=meth :: method
|
||||
q=@t :: unparsed url
|
||||
r=(list {p=@t q=@t}) :: headers
|
||||
s=(unit octs) :: body
|
||||
_: p+meth :: method
|
||||
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
|
||||
|
@ -6,7 +6,8 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvI bec=beak]
|
||||
[arg=~ ~]
|
||||
|= $^
|
||||
_: {now+@da eny+@uvI bec+beak}
|
||||
{arg+$~ $~}
|
||||
==
|
||||
[%helm-deset ~]
|
||||
|
@ -12,7 +12,7 @@
|
||||
|%
|
||||
++ mark
|
||||
~/ %mark
|
||||
|= p=@t
|
||||
|= p+@t
|
||||
(normalize (rash p parse))
|
||||
::
|
||||
++ print sing
|
||||
|
@ -67,7 +67,7 @@
|
||||
++ leas |*(a+rule ;~(pfix ;~(less (stun 4^4 ace) (stun 0^3 ace)) a))
|
||||
++ pech
|
||||
|* a+{rule rule}
|
||||
|= tub=nail
|
||||
|= tub+nail
|
||||
^- (like (each __((wonk (-.a))) __((wonk (+.a)))))
|
||||
%. tub
|
||||
;~(pose (stag %& -.a) (stag %| +.a))
|
||||
@ -345,7 +345,7 @@
|
||||
::
|
||||
++ many
|
||||
=> pars :: XX
|
||||
|= tub=nail ^- (like kids)
|
||||
|= tub+nail ^- (like kids)
|
||||
=- [[0 0] ~ (reso -<) [0 0] ;;(tape ->)] :: XX
|
||||
=+ [ins=`?(fens $~)`~ bof=| noz=|]
|
||||
?~ q.tub [`~ ~]
|
||||
@ -386,7 +386,7 @@
|
||||
$(+<+ t)
|
||||
::
|
||||
++ flome
|
||||
|= a=__(+:*nuft)
|
||||
|= a+__(+:*nuft)
|
||||
^- {(unit ?($| fens)) tape}
|
||||
?. ?=({* ?($| fens)} a)
|
||||
[~ a]
|
||||
@ -554,11 +554,11 @@
|
||||
--
|
||||
::
|
||||
++ normalize
|
||||
|= a=down ^- down
|
||||
|= a+down ^- down
|
||||
%+ turn a |= b+elem
|
||||
?^ -.b b(q (turn q.b ..$))
|
||||
=- ?+(-.b b $para b(p (- p.b)), $head b(q (- q.b)))
|
||||
|= c=kids ^- kids
|
||||
|= c+kids ^- kids
|
||||
?~ c ~
|
||||
?: ?& ?=(^ t.c)
|
||||
?=($$ -.i.c)
|
||||
@ -646,7 +646,7 @@
|
||||
=- => .(cur t.cur, q.p.tub p.i.cur)
|
||||
?~ cur self(top [hed top])
|
||||
self(q.q.i.cur [hed q.q.i.cur])
|
||||
^- hed=tops
|
||||
^- hed+tops
|
||||
=+ cub=q.i.cur
|
||||
?+ -.p.cub cub
|
||||
$list
|
||||
@ -787,7 +787,7 @@
|
||||
?. ?=($item -.p.q.i.cur)
|
||||
(. cur)
|
||||
[i.cur (. t.cur)]
|
||||
|= a=__(cur) ^+ a
|
||||
|= a+__(cur) ^+ a
|
||||
~? > bug naro/[debu nil-li a cur]
|
||||
?~ a a
|
||||
?: ?=({{$item $~} $~} q.i.a)
|
||||
|
@ -69,7 +69,7 @@
|
||||
(push (reso ele) ~)
|
||||
:: begin reparsing of html that the spec jankily lets through ::
|
||||
=+ tex=(trip (role p.ele))
|
||||
=^ mar lum (chomp tex (sear |=(a=marl ?~(a ~ (some a))) many:poxa))
|
||||
=^ mar lum (chomp tex (sear |=(a+marl ?~(a ~ (some a))) many:poxa))
|
||||
?^ mar
|
||||
(push u.mar)
|
||||
=^ hed lum (chomp tex head:poxa)
|
||||
|
@ -365,7 +365,7 @@
|
||||
|= tac+(list tank)
|
||||
^+ +>
|
||||
?. se-ably (se-talk tac)
|
||||
=+ wol=`wall`(zing (turn (flop tac) |=(a=tank (~(win re a) [0 edg]))))
|
||||
=+ wol=`wall`(zing (turn (flop tac) |=(a+tank (~(win re a) [0 edg]))))
|
||||
|- ^+ +>.^$
|
||||
?~ wol +>.^$
|
||||
$(wol t.wol, +>.^$ (se-blit %out (tuba i.wol)))
|
||||
@ -520,7 +520,7 @@
|
||||
(se-nuke gyl)
|
||||
..ta(fug (~(put by fug) gyl ``target`+<+))
|
||||
::
|
||||
++ ta-poke |=(a=pear +>(..ta (se-poke gyl a))) :: poke gyl
|
||||
++ ta-poke |=(a+pear +>(..ta (se-poke gyl a))) :: poke gyl
|
||||
::
|
||||
++ ta-act :: send action
|
||||
|= act+sole-action
|
||||
@ -755,7 +755,7 @@
|
||||
::
|
||||
++ ta-tan :: print tanks
|
||||
|= tac+(list tank)
|
||||
=+ wol=`wall`(zing (turn (flop tac) |=(a=tank (~(win re a) [0 edg]))))
|
||||
=+ wol=`wall`(zing (turn (flop tac) |=(a+tank (~(win re a) [0 edg]))))
|
||||
|- ^+ +>.^$
|
||||
?~ wol +>.^$
|
||||
$(wol t.wol, +>+>.^$ (se-text i.wol))
|
||||
|
@ -7,8 +7,10 @@
|
||||
!:
|
||||
|%
|
||||
++ request
|
||||
_: domain+(list cord) end-point=path
|
||||
req-type+_?($get {$post p=json}) headers=math
|
||||
_: domain+(list cord)
|
||||
end-point+path
|
||||
req-type+_?($get {$post p+json})
|
||||
headers+math
|
||||
queries+quay
|
||||
==
|
||||
++ send
|
||||
@ -19,7 +21,7 @@
|
||||
++ request-to-hiss
|
||||
|= request ^- hiss
|
||||
=- ~& hiss=- -
|
||||
:- ^- parsed-url=purl
|
||||
:- ^- parsed-url+purl
|
||||
:+ :+ security=%.y
|
||||
port=~
|
||||
host=[%.y [path=domain]]
|
||||
|
@ -169,7 +169,7 @@
|
||||
%- emil
|
||||
%+ turn
|
||||
`(list term)`~[%ames %behn %clay %dill %eyre %ford %gall %zuse %hoon]
|
||||
|= syd=term
|
||||
|= syd+term
|
||||
^- card
|
||||
:* %warp /kiln/autoload/[syd] [our our] %home ~
|
||||
%next %y da/now /arvo/[syd]/hoon
|
||||
@ -195,7 +195,7 @@
|
||||
++ take-mere-sync ::
|
||||
|= {way+wire mes+(each (set path) (pair term tang))}
|
||||
?> ?=({@ @ @ $~} way)
|
||||
=+ ^- hos=kiln-sync
|
||||
=+ ^- hos+kiln-sync
|
||||
:* syd=(slav %tas i.way)
|
||||
her=(slav %p i.t.way)
|
||||
sud=(slav %tas i.t.t.way)
|
||||
@ -205,7 +205,7 @@
|
||||
++ take-writ-sync ::
|
||||
|= {way+wire rot+riot}
|
||||
?> ?=({@ @ @ $~} way)
|
||||
=+ ^- hos=kiln-sync
|
||||
=+ ^- hos+kiln-sync
|
||||
:* syd=(slav %tas i.way)
|
||||
her=(slav %p i.t.way)
|
||||
sud=(slav %tas i.t.t.way)
|
||||
@ -436,7 +436,7 @@
|
||||
=+ bobs=[%file [our syd %da now] (flop pax)]
|
||||
=+ dali=[%diff base alis]
|
||||
=+ dbob=[%diff base bobs]
|
||||
=+ ^- for=mark
|
||||
=+ ^- for+mark
|
||||
=+ (slag (dec (lent pax)) pax)
|
||||
?~(- %$ i.-)
|
||||
[%mash for [her sud dali] [our syd dbob]]
|
||||
@ -485,7 +485,7 @@
|
||||
::
|
||||
++ tape-to-tanks
|
||||
|= a+tape ^- (list tank)
|
||||
(scan a (more (just '\0a') (cook |=(a=tape leaf/a) (star prn))))
|
||||
(scan a (more (just '\0a') (cook |=(a+tape leaf/a) (star prn))))
|
||||
::
|
||||
++ tanks-if-any
|
||||
|= {a+tape b+(list path) c+tape} ^- (list tank)
|
||||
@ -498,7 +498,7 @@
|
||||
?: ?=($| -.reg)
|
||||
=+ "failed to mash"
|
||||
lose:(spam leaf/- p.reg)
|
||||
=+ ^- can=(list (pair path (unit miso)))
|
||||
=+ ^- can+(list (pair path (unit miso)))
|
||||
%+ turn (gage-to-cages reg)
|
||||
|= {pax+cage dif+cage}
|
||||
^- (pair path (unit miso))
|
||||
@ -511,7 +511,7 @@
|
||||
=+ annotated=(turn `(list (pair path *))`-.notated head)
|
||||
=+ unnotated=(turn `(list (pair path *))`+.notated head)
|
||||
=+ `desk`(cat 3 syd '-scratch')
|
||||
=+ ^- tan=(list tank)
|
||||
=+ ^- tan+(list tank)
|
||||
%- zing
|
||||
^- (list (list tank))
|
||||
:~ %- tape-to-tanks
|
||||
|
@ -10,7 +10,7 @@
|
||||
|% ::
|
||||
++ icon |=(? ?:(+< 'X' 'O')) :: display at
|
||||
++ bo :: per board
|
||||
|_ bud=board ::
|
||||
|_ bud+board ::
|
||||
++ bit |=(@ =(1 (cut 0 [+< 1] bud))) :: moved at address
|
||||
++ get |=(point (bit (off +<))) :: get point
|
||||
++ jon a/(turn (gulf 0 9) |=(@ b/(bit +<))) :: to json
|
||||
@ -45,7 +45,7 @@
|
||||
++ res ?. |(~(win bo box) ~(win bo boo)) :: possible result
|
||||
?: =(511 (con boo box)) ::
|
||||
`"tie :-(" ~ `"{<nam>} wins" ::
|
||||
++ row |= y=@ :- (add y '1') %- zing :: print row
|
||||
++ row |= y+@ :- (add y '1') %- zing :: print row
|
||||
(turn (gulf 0 3) |=(@ ~[' ' ~(v at y +<)])) ::
|
||||
++ str =+ [own ~[(icon who)]] ^- tape :: print player
|
||||
?~(-< -> (scow %p u.-<)) ::
|
||||
|
@ -10,13 +10,13 @@
|
||||
|%
|
||||
++ icon |=(? ?:(+< 'X' 'O')) :: display at
|
||||
++ bo :: per board
|
||||
|_ bud=board ::
|
||||
|_ bud+board ::
|
||||
++ bit |=(@ =(1 (cut 0 [+< 1] bud))) :: moved at address
|
||||
++ get |=(point (bit (off +<))) :: get point
|
||||
++ jon a/(turn (gulf 0 9) |=(@ b/(bit +<))) :: to json
|
||||
++ off |=(point (add x (mul 3 y))) :: bitfield address
|
||||
++ set |=(point (con bud (bex (off +<)))) :: set point
|
||||
++ win %- lien :_ |=(a=@ =(a (dis a bud))) :: test for win
|
||||
++ win %- lien :_ |=(a+@ =(a (dis a bud))) :: test for win
|
||||
(rip 4 0wl04h0.4A0Aw.4A00s.0e070) :: with bitmasks
|
||||
-- ::
|
||||
++ go :: play from
|
||||
|
@ -22,7 +22,7 @@
|
||||
~+ ^- (map term cord)
|
||||
%- mo ^- (list {term cord})
|
||||
:- [%class 'className']
|
||||
=- (rash - (more next (cook |=(a=tape [(cass a) (crip a)]) (star alf))))
|
||||
=- (rash - (more next (cook |=(a+tape [(cass a) (crip a)]) (star alf))))
|
||||
'''
|
||||
accept acceptCharset accessKey action allowFullScreen allowTransparency alt
|
||||
async autoComplete autoFocus autoPlay cellPadding cellSpacing charSet checked
|
||||
@ -62,7 +62,7 @@
|
||||
;pre
|
||||
;div:"error"
|
||||
;* %+ turn p.result
|
||||
|= a=tank
|
||||
|= a+tank
|
||||
^- manx
|
||||
;div:"{~(ram re a)}"
|
||||
== ==
|
||||
@ -77,7 +77,7 @@
|
||||
(fall (~(get by react-attrs) a) a)
|
||||
==
|
||||
::
|
||||
++ mane-to-cord |=(a=mane `cord`?@(a a (rap 3 -.a ':' +.a ~)))
|
||||
++ mane-to-cord |=(a+mane `cord`?@(a a (rap 3 -.a ':' +.a ~)))
|
||||
:: generates React javascript XX deprecated
|
||||
++ react-to-tape
|
||||
|= src+manx ^- tape
|
||||
@ -103,7 +103,7 @@
|
||||
;div:"error"
|
||||
;* %+ turn
|
||||
(scag (dec (lent p.result)) p.result) :: hide react trace
|
||||
|= a=tank
|
||||
|= a+tank
|
||||
^- manx
|
||||
;div:"{~(ram re a)}"
|
||||
==
|
||||
|
@ -10,9 +10,9 @@
|
||||
v.i.a.g.i.a
|
||||
::
|
||||
++ getall
|
||||
|= tag=(list mane)
|
||||
|= ele=manx ^- marl
|
||||
?: (lien tag |=(a=mane =(a n.g.ele)))
|
||||
|= tag+(list mane)
|
||||
|= ele+manx ^- marl
|
||||
?: (lien tag |=(a+mane =(a n.g.ele)))
|
||||
~[ele]
|
||||
(zing (turn c.ele ..$))
|
||||
::
|
||||
@ -32,7 +32,7 @@
|
||||
::
|
||||
++ map-to-json
|
||||
|* {a+_+(* cord) b+_+(* json)}
|
||||
|* c=(map) ^- json
|
||||
|* c+(map) ^- json
|
||||
~! c
|
||||
(jobe (turn (~(tap by c)) |*({k+* v+*} [(a k) (b v)])))
|
||||
::
|
||||
|
@ -11,7 +11,7 @@
|
||||
++ grab :: converter arm
|
||||
|%
|
||||
++ noun bit-accounts :: clam from noun
|
||||
++ json |= jon=^json ^- bit-accounts
|
||||
++ json |= jon+^json ^- bit-accounts
|
||||
~| jon
|
||||
%- need %. jon
|
||||
=> jo
|
||||
|
@ -5,7 +5,7 @@
|
||||
/- bit-api
|
||||
/+ http
|
||||
[bit-api .]
|
||||
|_ req=bit-get-token
|
||||
|_ req+bit-get-token
|
||||
::
|
||||
++ grow
|
||||
|% ++ httpreq
|
||||
|
@ -1,8 +1,8 @@
|
||||
::
|
||||
:::: /hoon/term-line/mar
|
||||
:::: /hoon/client-secret/mar
|
||||
::
|
||||
/? 314
|
||||
|_ txt=cord
|
||||
|_ txt+cord
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
|
@ -2,7 +2,7 @@
|
||||
:::: /hoon/core/md/pro
|
||||
::
|
||||
/? 314
|
||||
|_ mud=@t
|
||||
|_ mud+@t
|
||||
++ grow
|
||||
|%
|
||||
++ mime [/text/coffeescript (taco mud)]
|
||||
|
@ -1,7 +1,7 @@
|
||||
::
|
||||
:::: /hoon/core/css/mar
|
||||
::
|
||||
|_ mud=@t
|
||||
|_ mud+@t
|
||||
++ grow :: convert to
|
||||
|% ++ mime [/text/css (taco mud)] :: convert to %mime
|
||||
++ elem ;style :: convert to %hymn
|
||||
|
@ -15,7 +15,7 @@
|
||||
++ json
|
||||
^- ^json
|
||||
?+ -.dib ~|(unsupported-blit/-.dib !!)
|
||||
$mor [%a (turn p.dib |=(a=dill-blit json(dib a)))]
|
||||
$mor [%a (turn p.dib |=(a+dill-blit json(dib a)))]
|
||||
$hop (joba %hop (jone p.dib))
|
||||
?($pro $out) (joba -.dib (jape (tufa p.dib)))
|
||||
?($bel $clr) (joba %act %s -.dib)
|
||||
|
@ -3,7 +3,7 @@
|
||||
::
|
||||
/? 314
|
||||
!:
|
||||
|_ own=@t
|
||||
|_ own+@t
|
||||
::
|
||||
++ grow :: convert to
|
||||
|%
|
||||
@ -43,7 +43,7 @@
|
||||
++ mime |=({p+mite q+octs} q.q)
|
||||
++ noun @t :: clam from %noun
|
||||
++ txt
|
||||
|= wan=wain
|
||||
|= wan+wain
|
||||
=+ (role wan)
|
||||
(end 3 (dec (met 3 -)) -)
|
||||
--
|
||||
|
@ -3,7 +3,7 @@
|
||||
::
|
||||
/? 314
|
||||
!:
|
||||
|_ own=@t
|
||||
|_ own+@t
|
||||
::
|
||||
++ grow :: convert to
|
||||
|%
|
||||
|
@ -5,7 +5,7 @@
|
||||
::
|
||||
:::: compute
|
||||
::
|
||||
|_ jon=json
|
||||
|_ jon+json
|
||||
::
|
||||
++ grow :: convert to
|
||||
|%
|
||||
|
@ -3,7 +3,7 @@
|
||||
::
|
||||
/? 314
|
||||
::
|
||||
|_ mud=@t
|
||||
|_ mud+@t
|
||||
++ grow
|
||||
|%
|
||||
++ mime [/text/x-markdown (taco mud)]
|
||||
@ -17,7 +17,7 @@
|
||||
++ noun @t
|
||||
++ md |=(@t +<)
|
||||
++ txt
|
||||
|= wan=wain
|
||||
|= wan+wain
|
||||
=+ (role wan)
|
||||
(end 3 (dec (met 3 -)) -)
|
||||
--
|
||||
|
@ -15,7 +15,7 @@
|
||||
++ mime |=({p+mite q+octs} q.q)
|
||||
++ noun @t
|
||||
++ txt
|
||||
|= wan=wain
|
||||
|= wan+wain
|
||||
=+ (role wan)
|
||||
(end 3 (dec (met 3 -)) -)
|
||||
--
|
||||
|
@ -18,14 +18,14 @@
|
||||
|^ (fo %ret (of det/change ~))
|
||||
++ fo
|
||||
|* {a+term b+fist}
|
||||
|=(c=json ?.(=([%s a] c) (b c) (some [a ~])))
|
||||
|=(c+json ?.(=([%s a] c) (b c) (some [a ~])))
|
||||
::
|
||||
++ ra
|
||||
|* {a+{p+term q+fist} b+fist}
|
||||
|= c=json %. c
|
||||
|= c+json %. c
|
||||
?.(=(%a -.c) b (pe p.a (ar q.a)))
|
||||
::
|
||||
++ change (ot ler/(at ni ni ~) ted/(cu |*(a=* [0v0 a]) edit) ~)
|
||||
++ change (ot ler/(at ni ni ~) ted/(cu |*(a+* [0v0 a]) edit) ~)
|
||||
++ char (cu turf so)
|
||||
++ edit
|
||||
%+ fo %nop
|
||||
|
@ -28,12 +28,12 @@
|
||||
++ wush
|
||||
|= {wid+@u tan+tang}
|
||||
^- tape
|
||||
=+ rolt=|=(a=wall `tape`?~(a ~ ?~(t.a i.a :(weld i.a "\0a" $(a t.a)))))
|
||||
(rolt (turn (flop tan) |=(a=tank (rolt (wash 0^wid a)))))
|
||||
=+ rolt=|=(a+wall `tape`?~(a ~ ?~(t.a i.a :(weld i.a "\0a" $(a t.a)))))
|
||||
(rolt (turn (flop tan) |=(a+tank (rolt (wash 0^wid a)))))
|
||||
::
|
||||
--
|
||||
!:
|
||||
|_ sef=sole-effect
|
||||
|_ sef+sole-effect
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
@ -45,7 +45,7 @@
|
||||
^- ^json
|
||||
?+ -.sef
|
||||
~|(unsupported-effect/-.sef !!)
|
||||
$mor [%a (turn p.sef |=(a=sole-effect json(sef a)))]
|
||||
$mor [%a (turn p.sef |=(a+sole-effect json(sef a)))]
|
||||
$err (joba %hop (jone p.sef))
|
||||
$txt (joba %txt (jape p.sef))
|
||||
$tan (joba %tan (jape (wush 160 p.sef)))
|
||||
|
@ -5,7 +5,7 @@
|
||||
/- talk
|
||||
!:
|
||||
[talk .]
|
||||
|_ cod=command
|
||||
|_ cod+command
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
|
@ -47,7 +47,7 @@
|
||||
::
|
||||
++ jome :: stringify keys
|
||||
|* {a+__(cord) b+__(json)}
|
||||
|= c=(map __(+<.a) __(+<.b))
|
||||
|= c+(map __(+<.a) __(+<.b))
|
||||
(jobe (turn (~(tap by c)) (both a b)))
|
||||
::
|
||||
++ both :: cons two gates
|
||||
@ -67,7 +67,7 @@
|
||||
++ audi (jome parn jove)
|
||||
++ bouq
|
||||
|= a+bouquet
|
||||
a/(turn (~(tap in a)) |=(b=path a/(turn b |=(c=span s/c))))
|
||||
a/(turn (~(tap in a)) |=(b+path a/(turn b |=(c+span s/c))))
|
||||
::
|
||||
++ parn
|
||||
|= a+partner ^- cord
|
||||
@ -129,7 +129,7 @@
|
||||
::
|
||||
++ sorc
|
||||
|= a+(set partner) ^- json
|
||||
[%a (turn (~(tap in a)) |=(b=partner s/(parn b)))]
|
||||
[%a (turn (~(tap in a)) |=(b+partner s/(parn b)))]
|
||||
::
|
||||
++ conf
|
||||
|= config
|
||||
|
@ -95,7 +95,7 @@
|
||||
|%
|
||||
++ tags
|
||||
|= a+(set @t)
|
||||
[%a (turn (sort (~(tap in a)) aor) |=(b=cord s/b))]
|
||||
[%a (turn (sort (~(tap in a)) aor) |=(b+cord s/b))]
|
||||
::
|
||||
++ task
|
||||
|= ^task
|
||||
@ -171,7 +171,7 @@
|
||||
=- ~! gar ~! (need -) -
|
||||
((sef) jon)
|
||||
::
|
||||
++ lake |*(a=__(*) _+(json (unit a)))
|
||||
++ lake |*(a+__(*) _+(json (unit a)))
|
||||
++ head-rush
|
||||
|* a+rule
|
||||
|* {b+cord c+*}
|
||||
@ -249,7 +249,7 @@
|
||||
++ jode |=(a+time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1)))
|
||||
++ jome :: stringify keys
|
||||
|* {a+__(cord) b+__(json)}
|
||||
|= c=(map __(+<.a) __(+<.b))
|
||||
|= c+(map __(+<.a) __(+<.b))
|
||||
(jobe (turn (~(tap by c)) (both a b)))
|
||||
::
|
||||
++ both :: cons two gates
|
||||
@ -263,7 +263,7 @@
|
||||
++ audi (jome parn jove)
|
||||
++ bouq
|
||||
|= a+bouquet
|
||||
a/(turn (~(tap in a)) |=(b=path a/(turn b |=(c=span s/c))))
|
||||
a/(turn (~(tap in a)) |=(b+path a/(turn b |=(c+span s/c))))
|
||||
::
|
||||
++ parn
|
||||
|= a+partner ^- cord
|
||||
|
@ -3,7 +3,7 @@
|
||||
::
|
||||
/? 314
|
||||
!:
|
||||
|_ tan=(list tank)
|
||||
|_ tan+(list tank)
|
||||
::
|
||||
++ grow
|
||||
|%
|
||||
|
14
mar/txt.hoon
14
mar/txt.hoon
@ -46,19 +46,19 @@
|
||||
{$&}
|
||||
?: =(p.i.ali p.i.bob)
|
||||
%+ bind $(ali t.ali, bob t.bob)
|
||||
|=(cud=(urge cord) [i.ali cud])
|
||||
|=(cud+(urge cord) [i.ali cud])
|
||||
?: (gth p.i.ali p.i.bob)
|
||||
%+ bind $(p.i.ali (sub p.i.ali p.i.bob), bob t.bob)
|
||||
|=(cud=(urge cord) [i.bob cud])
|
||||
|=(cud+(urge cord) [i.bob cud])
|
||||
%+ bind $(ali t.ali, p.i.bob (sub p.i.bob p.i.ali))
|
||||
|=(cud=(urge cord) [i.ali cud])
|
||||
|=(cud+(urge cord) [i.ali cud])
|
||||
{$|}
|
||||
?: =(p.i.ali (lent p.i.bob))
|
||||
%+ bind $(ali t.ali, bob t.bob)
|
||||
|=(cud=(urge cord) [i.bob cud])
|
||||
|=(cud+(urge cord) [i.bob cud])
|
||||
?: (gth p.i.ali (lent p.i.bob))
|
||||
%+ bind $(p.i.ali (sub p.i.ali (lent p.i.bob)), bob t.bob)
|
||||
|=(cud=(urge cord) [i.bob cud])
|
||||
|=(cud+(urge cord) [i.bob cud])
|
||||
~
|
||||
==
|
||||
::
|
||||
@ -68,7 +68,7 @@
|
||||
{$&}
|
||||
?: =(p.i.bob (lent p.i.ali))
|
||||
%+ bind $(ali t.ali, bob t.bob)
|
||||
|=(cud=(urge cord) [i.ali cud])
|
||||
|=(cud+(urge cord) [i.ali cud])
|
||||
?: (gth p.i.bob (lent p.i.ali))
|
||||
%+ bind $(ali t.ali, p.i.bob (sub p.i.bob (lent p.i.ali)))
|
||||
|=(cud+(urge cord) [i.ali cud])
|
||||
@ -172,7 +172,7 @@
|
||||
~
|
||||
::
|
||||
++ clean :: clean
|
||||
|= wig=(urge cord)
|
||||
|= wig+(urge cord)
|
||||
^- (urge cord)
|
||||
?~ wig ~
|
||||
?~ t.wig wig
|
||||
|
@ -14,8 +14,8 @@
|
||||
=< (corl need (cu |=(a+command a) coma))
|
||||
|%
|
||||
++ as
|
||||
:: |*(a=fist (cu sa (ar a))) :: XX types
|
||||
|* a=fist
|
||||
:: |*(a+fist (cu sa (ar a))) :: XX types
|
||||
|* a+fist
|
||||
%- cu :_ (ar a)
|
||||
~(gas in *(set __((need *a))))
|
||||
++ ot
|
||||
@ -86,7 +86,7 @@
|
||||
--
|
||||
++ grow
|
||||
|%
|
||||
++ elem ;pre: {(zing `wall`(turn (wash 0^120 >mad<) |=(a=tape ['\0a' a])))}
|
||||
++ elem ;pre: {(zing `wall`(turn (wash 0^120 >mad<) |=(a+tape ['\0a' a])))}
|
||||
--
|
||||
--
|
||||
:: {new: {
|
||||
|
@ -11,20 +11,20 @@
|
||||
|% ++ json
|
||||
=+ jope=|=(a+ship [%s (rsh 3 1 (scot %p a))])
|
||||
%- jobe :~
|
||||
sort/[%a (turn sort |=(a=@uv [%s (scot %uv a)]))]
|
||||
sort/[%a (turn sort |=(a+@uv [%s (scot %uv a)]))]
|
||||
=< tasks/(jobe (turn (~(tap by tasks)) .))
|
||||
|= {@ client-task}
|
||||
=+ tax
|
||||
:- (scot %uv id)
|
||||
%- jobe :~ id/[%s (scot %uv id)]
|
||||
tags/[%a (turn (^sort (~(tap in tags)) aor) |=(a=cord s/a))]
|
||||
tags/[%a (turn (^sort (~(tap in tags)) aor) |=(a+cord s/a))]
|
||||
doer/?~(doer ~ (jope u.doer))
|
||||
title/[%s title]
|
||||
creator/(jope creator)
|
||||
version/(jone version)
|
||||
archived/[%b archived]
|
||||
=< audience/[%a (turn (~(tap in audience)) .)]
|
||||
|=(a=station:talk [%s (crip "{<p.a>}/{(trip q.a)}")])
|
||||
|=(a+station:talk [%s (crip "{<p.a>}/{(trip q.a)}")])
|
||||
'date_created'^(jode date-created)
|
||||
'date_modified'^(jode date-modified)
|
||||
description/[%s description]
|
||||
|
@ -8,7 +8,7 @@
|
||||
[work .]
|
||||
|%
|
||||
++ rend
|
||||
|= a=(list _|(char dime)) ^- cord
|
||||
|= a+(list _|(char dime)) ^- cord
|
||||
%- crip
|
||||
|- ^- tape
|
||||
?~ a ~
|
||||
@ -34,7 +34,7 @@
|
||||
?^ hed ;~(pfix (just (crip hed)) (..$ tal))
|
||||
=- ?~(tal had ;~(plug had (..$ tal)))
|
||||
=< had=(sear . nuck:so)
|
||||
|= a=coin ^- (unit (odo:raid hed))
|
||||
|= a+coin ^- (unit (odo:raid hed))
|
||||
?. &(?=({$$ @ @} a) =(hed p.p.a)) ~
|
||||
(some q.p.a)
|
||||
::
|
||||
@ -45,13 +45,13 @@
|
||||
!:
|
||||
::::
|
||||
::
|
||||
|_ taz=task
|
||||
|_ taz+task
|
||||
++ grab
|
||||
|% ++ txt
|
||||
|= a+wain ^+ taz
|
||||
=+ ~[id=%uv "_" date-created=%da " " version=%ud date-modified=%da]
|
||||
=^ b a (advance a ;~(plug (parse -) (punt (parse " " %da ~))))
|
||||
=+ [-.b `date-due=(unit @da)`+.b]
|
||||
=+ [-.b `date-due+(unit @da)`+.b]
|
||||
=^ tags a (undent a ~(gas in *(set cord)))
|
||||
=^ title a ?~(a !! a)
|
||||
=^ b a %+ advance a
|
||||
@ -70,7 +70,7 @@
|
||||
--
|
||||
++ grow
|
||||
|%
|
||||
++ elem ;pre: {(zing `wall`(turn (wash 0^120 >taz<) |=(a=tape ['\0a' a])))}
|
||||
++ elem ;pre: {(zing `wall`(turn (wash 0^120 >taz<) |=(a+tape ['\0a' a])))}
|
||||
++ mime [/text/x-task (taco (role txt))]
|
||||
++ txt
|
||||
=+ taz
|
||||
|
@ -2,7 +2,7 @@
|
||||
::
|
||||
:::: /hoon/kyev/sur
|
||||
::
|
||||
=- {p+(set ?($ctrl $shift $alt $meta)) q=_|(cord {$act speck})}
|
||||
=- {p+(set ?($ctrl $shift $alt $meta)) q+_|(cord {$act speck})}
|
||||
^= speck
|
||||
_? $ctrl $shift $alt $meta $entr $esc $caps $uncap
|
||||
$pgup $pgdn $home $end $baxp $del $ins
|
||||
|
@ -11,10 +11,10 @@
|
||||
++ stage (pair (unit ship) (unit ship)) :: players
|
||||
++ play (each game tape) :: update
|
||||
++ game :: game state
|
||||
_: who=? :: whose turn
|
||||
sag=stage :: who's playing
|
||||
aud=(map ship @ud) :: who's watching
|
||||
box=board :: X board
|
||||
boo=board :: O board
|
||||
_: who+? :: whose turn
|
||||
sag+stage :: who's playing
|
||||
aud+(map ship @ud) :: who's watching
|
||||
box+board :: X board
|
||||
boo+board :: O board
|
||||
== ::
|
||||
--
|
||||
|
@ -11,10 +11,10 @@
|
||||
++ stage (pair (unit ship) (unit ship)) :: players
|
||||
++ play (each game tape) :: update
|
||||
++ game :: game state
|
||||
_: who=? :: whose turn
|
||||
sag=stage :: who's playing
|
||||
aud=(map ship @ud) :: who's watching
|
||||
box=board :: X board
|
||||
boo=board :: O board
|
||||
_: who+? :: whose turn
|
||||
sag+stage :: who's playing
|
||||
aud+(map ship @ud) :: who's watching
|
||||
box+board :: X board
|
||||
boo+board :: O board
|
||||
== ::
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user