diff --git a/arvo/ames.hoon b/arvo/ames.hoon
index f0fb4aa05..bf4f764f7 100644
--- a/arvo/ames.hoon
+++ b/arvo/ames.hoon
@@ -5,19 +5,52 @@
=> =~
:: structures
|%
+++ flog :: error wrapper
+ $% [%crud p=@tas q=(list tank)] ::
+ [%text p=tape] ::
+ == ::
++ gift :: out result <-$
- card
-::
+ $% [%hear p=lane q=@] :: receive packet
+ [%init p=@p] :: report install
+ [%send p=lane q=@] :: transmit packet
+ [%waft p=sock q=*] :: response message
+ [%wart p=sock q=@tas r=path s=*] :: network request
+ [%went p=ship q=cape] :: reaction message
+ == ::
++ kiss :: in request ->$
- card
-::
+ $% [%crud p=@tas q=(list tank)] :: error with trace
+ [%cash p=@p q=buck] :: civil license
+ [%hear p=lane q=@] :: receive packet
+ [%hole p=lane q=@] :: packet failed
+ [%junk p=@] :: entropy
+ [%kick p=@da] :: wake up
+ [%make p=(unit ,@t) q=@ud r=@ s=?] :: wild license
+ [%sith p=@p q=@uw r=?] :: imperial generator
+ [%wake ~] :: timer activate
+ [%want p=sock q=path r=*] :: send message
+ == ::
++ move ,[p=duct q=(mold note gift)] :: local move
-::
++ note :: out request $->
- card
-::
-++ sign :: in result $-<
- card
+ $? $: %d :: to %dill
+ $% [%flog p=flog] ::
+ == == ::
+ $: %a :: to %ames
+ $% [%kick p=@da] ::
+ == == ::
+ $: @tas :: to any
+ $% [%init p=@p] ::
+ [%want p=sock q=path r=*] ::
+ [%wart p=sock q=@tas r=path s=*] ::
+ == == == ::
+++ sign :: in result $<-
+ $? $: %a :: from %ames
+ $% [%went p=ship q=cape] ::
+ == == ::
+ $: @tas ::
+ $% [%crud p=@tas q=(list tank)] :: by any
+ [%send p=lane q=@] :: transmit packet
+ [%went p=ship q=cape] :: by %ames
+ == == == ::
--
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 4aA, identity logic ::
@@ -54,7 +87,8 @@
|= [new=deed old=deed]
^- ?
=+ rac=(clan r.p.q.new)
- ?& ?~ q.p.q.new
+ ?& =(r.new r.old) :: match fake
+ ?~ q.p.q.new
?& =(r.p.q.old r.p.q.new)
&(!=(%earl rac) =(p.p.q.old (dec p.p.q.new)))
==
@@ -78,11 +112,12 @@
?. =(i.wal i.ouf) ouf
$(wal t.wal, ouf t.ouf)
::
- ++ pier :: initial deed
+ ++ pier !: :: initial deed
|= wed=deed
^- &
?> =+ rac=(clan r.p.q.wed)
=+ loy=(haul r.q.wed)
+ ?: &(r.wed =(rac %czar)) %&
?> =(0 p.p.q.wed)
?> =(fig:ex:loy ?+(rac !! %czar (zeno r.p.q.wed), %pawn r.p.q.wed))
?> =((shaf %self (sham q.wed)) (need (sure:as:loy *code p.wed)))
@@ -445,17 +480,18 @@
?. =(pub r.q.i.lew.wod.u.rad) [~ +>.$]
[[~ lew.wod.u.rad] +>.$]
=+ syp=[[0 [~ p.nes] her now] ges pub]
- =+ ded=[(sign:as:q.nes *code (shaf %meld (sham syp))) syp]
+ =+ ded=[(sign:as:q.nes *code (shaf %meld (sham syp))) syp fak.ton]
=+ wil=[ded law.saf]
?> =(wil (grip wil ~))
:- [~ wil]
- +>.$(hoc.saf (~(put by hoc.saf) her [[~31337.1.1 ~ wil] ~ *cask]))
+ +>.$(hoc.saf (~(put by hoc.saf) her [[~31337.1.1 ~ wil] ~ *clot]))
::
++ lax :: lax:as:go
|_ [her=ship dur=door] :: per client
++ cluy :: cluy:lax:as:go
^- [p=life q=gens r=acru] :: client crypto
?~ lew.wod.dur !!
+ ?. =(fak.ton r.i.lew.wod.dur) ~|([%client-wrong-fake her] !!)
:+ p.p.q.i.lew.wod.dur
q.q.i.lew.wod.dur
(haul r.q.i.lew.wod.dur)
@@ -523,9 +559,7 @@
?: ?| ?=(~ lun.wod.dur)
?=([%ix *] u.lun.wod.dur)
?& ?=([%if *] u.lun.wod.dur)
- ?| !=(q.ryn p.u.lun.wod.dur)
- !=(r.ryn q.u.lun.wod.dur)
- ==
+ (gth p.ryn (add ~s10 p.u.lun.wod.dur))
==
==
[~ ryn]
@@ -647,8 +681,8 @@
++ gur :: default door
|= her=ship
^- door
- =+ def=?.((lth her 256) ~ [~ %if 0 (mix her .0.0.1.0)])
- [[~2100.1.1 def ~] ~ *cask]
+ =+ def=?.((lth her 256) ~ [~ %if ~2000.1.1 0 (mix her .0.0.1.0)])
+ [[~2100.1.1 def ~] ~ *clot]
::
++ myx :: door by ship
|= her=ship
@@ -698,7 +732,7 @@
?:((lth her 256) ~ $(her (sein her)))
-- :: --as:go
::
- ++ ha :: adopt new license
+ ++ ha !: :: adopt new license
|= [our=ship mac=mace wil=will]
^- toun
?> !=(~ mac)
@@ -707,6 +741,7 @@
?> =(wil (grip wil ~))
?> (real mac wil)
%_ ton
+ fak r.i.wil
urb
%+ ~(put by urb.ton)
our
@@ -967,7 +1002,7 @@
==
==
++ come :: come:am
- |= [ges=(unit ,@t) wid=@ bur=@] :: instantiate pawn
+ |= [ges=(unit ,@t) wid=@ bur=@ fak=?] :: instantiate pawn
^- [p=[p=ship q=@uvG] q=furt]
=+ loy=(bruw wid bur)
=+ rig=sec:ex:loy
@@ -979,20 +1014,24 @@
%^ ~(ha go ton.fox)
our
`mace`[[0 rig] ~]
- `will`[[(sign:as:loy _@ (shaf %self (sham syp))) syp] ~]
+ `will`[[(sign:as:loy _@ (shaf %self (sham syp))) syp fak] ~]
+ fak.ton
+ fak
==
::
- ++ czar :: czar:am
- |= [our=ship ger=@uw] :: instantiate emperor
+ ++ czar !: :: czar:am
+ |= [our=ship ger=@uw fak=?] :: instantiate emperor
^- [p=(list boon) q=furt]
- =+ loy=(bruw 2.048 ger)
- ?> =(fig:ex:loy (zeno our))
+ =+ loy=?:(fak (bruw 2.048 our) (bruw 2.048 ger)) :: fake uses carrier #
+ =+ fim==(fig:ex:loy (zeno our))
+ ?: &(!fak !fim) !! :: not fake & bad fig
=+ mac=`mace`[[0 sec:ex:loy] ~]
=+ syp=`step`[`bray`[0 ~ our now] [%en %czar ~] pub:ex:loy]
- =+ ded=`deed`[(sign:as:loy _@ (shaf %self (sham syp))) syp]
+ =+ ded=`deed`[(sign:as:loy _@ (shaf %self (sham syp))) syp fak]
=+ buq=`buck`[mac [ded ~]]
=: ton.fox (~(ha go ton.fox) our buq)
zac.fox (~(put by zac.fox) our *corn)
+ fak.ton.fox fak
==
[[[%beer our pac:ex:loy] ~] fox]
::
@@ -1093,7 +1132,6 @@
++ done :: done:ho:um:am
|= [cha=path num=@ud] :: complete outgoing
^- [(unit duct) _+>]
- ~? =(~wicwyc-sitlyr her) [%done cha num]
=+ rol=(need (~(get by ryl.bah) cha))
=+ rix=(~(get by san.rol) num)
?~ rix [~ +>.$]
@@ -1262,7 +1300,7 @@
=+ ^= lyn ^- lane
?~ q.fud ryn
?. ?=(%if -.u.q.fud) u.q.fud
- [%ix now +.u.q.fud]
+ [%ix +.u.q.fud]
:: u.q.fud
?: =(our p.fud)
(emit %mead lyn r.fud)
@@ -1450,18 +1488,24 @@
^? :: opaque core
=<
|% :: vane interface
- ++ take
- |= [tea=wire hen=duct hin=(hypo sign)]
+ ++ call :: handle request
+ |= $: hen=duct
+ hic=(hypo (hobo kiss))
+ ==
+ => %= . :: XX temporary
+ q.hic
+ ^- kiss
+ ?: ?=(%soft -.q.hic)
+ ((hard kiss) p.q.hic)
+ ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
+ ~& [%ames-call-flub (,@tas `*`-.q.hic)]
+ ((hard kiss) q.hic)
+ ==
^- [p=(list move) q=_..^$]
- =^ duy ..knap
- (knap tea hen q.hin)
+ =^ duy ..knob
+ (knob hen q.hic)
[duy ..^$]
::
- ++ call
- |= [hen=duct hic=(hypo kiss)]
- ^- [p=(list move) q=_..^$]
- (take ~ hen hic)
- ::
++ doze
|= [now=@da hen=duct]
=+ doz=`(unit ,@da)`[~ (add now ~s32)]
@@ -1484,7 +1528,7 @@
::
++ scry
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
- ^- (unit (unit (pair lode ,*)))
+ ^- (unit (unit (pair logo ,*)))
?~ tyl [~ ~]
=+ hun=(slaw %p i.tyl)
?~ hun [~ ~]
@@ -1506,6 +1550,12 @@
==
::
++ stay fox
+ ++ take :: accept response
+ |= [tea=wire hen=duct hin=(hypo sign)]
+ ^- [p=(list move) q=_..^$]
+ =^ duy ..knap
+ (knap tea hen q.hin)
+ [duy ..^$]
--
|%
++ claw |=(our=ship ^-(duct hen:(need (~(get by zac.fox) our))))
@@ -1515,10 +1565,12 @@
?- -.bon
%beer
:_ fox(zac (~(put by zac.fox) p.bon `corn`[hen ~ ~ ~]))
+ :: ~& [%ames-clop p.bon hen]
:* [hen [%slip %c %init p.bon]]
[hen [%give %init p.bon]]
[hen [%slip %a %kick now]]
[hen [%slip %e %init p.bon]]
+ [hen [%slip %g %init p.bon]]
~
==
::
@@ -1572,7 +1624,7 @@
=. ton.fox (~(su go ton.fox) gus)
:_ fox
:~ :- hen
- [%toss %a ~ %want p.bon [%r %ta t.t.q.q.bon] `(unit will)`wyl]
+ [%pass ~ %a %want p.bon [%r %ta t.t.q.q.bon] `(unit will)`wyl]
==
%re :: %re
:_ fox
@@ -1589,7 +1641,7 @@
%+ turn paz
|= him=ship
:- hen
- [%toss %a ~ %want [p.p.bon him] /q/yu [q.p.bon r.bon]]
+ [%pass ~ %a %want [p.p.bon him] /q/yu [q.p.bon r.bon]]
==
::
%ouzo
@@ -1614,41 +1666,46 @@
==
::
++ knap
- |= [tea=wire hen=duct fav=card]
+ |= [tea=wire hen=duct sih=sign]
^- [(list move) _+>]
- ?: ?=([%crud *] fav)
- [[[hen [%slip %d %flog fav]] ~] +>]
- ?: ?=([%soft *] fav)
- $(fav ((hard card) p.fav))
+ ?- +<.sih
+ %crud [[[hen [%slip %d %flog +.sih]] ~] +>]
+ %send [[hen %give +.sih]~ +>]
+ %went [~ +>]
+ ==
+ ::
+ ++ knob
+ |= [hen=duct kyz=kiss]
+ ^- [(list move) _+>]
+ ?: ?=([%crud *] kyz)
+ [[[hen [%slip %d %flog kyz]] ~] +>]
=+ ^= fuy
^- [p=(list boon) q=furt]
- ?+ -.fav
- [~ fox]
- ::
+ ?- -.kyz
%cash
- (~(have am [now fox]) p.fav q.fav)
+ (~(have am [now fox]) p.kyz q.kyz)
::
%hear
- (~(gnaw am [now fox]) %good p.fav q.fav)
+ (~(gnaw am [now fox]) %good p.kyz q.kyz)
::
%hole
- (~(gnaw am [now fox]) %dead p.fav q.fav)
+ (~(gnaw am [now fox]) %dead p.kyz q.kyz)
::
%junk
- [~ fox(any.ton (shax (mix any.ton.fox p.fav)))]
+ [~ fox(any.ton (shax (mix any.ton.fox p.kyz)))]
::
%kick
- (~(kick am [now fox(hop p.fav)]) hen)
+ (~(kick am [now fox(hop p.kyz)]) hen)
::
%make
- =+ vun=(~(come am [now fox]) p.fav (bex q.fav) r.fav)
+ =+ vun=(~(come am [now fox]) p.kyz (bex q.kyz) r.kyz s.kyz)
[[[%beer p.vun] ~] q.vun]
::
%sith
- (~(czar am [now fox]) p.fav q.fav)
+ (~(czar am [now fox]) p.kyz q.kyz r.kyz)
::
%want
- (~(wise am [now fox]) p.fav hen q.fav r.fav)
+ (~(wise am [now fox]) p.kyz hen q.kyz r.kyz)
::
%wake
(~(wake am [now fox]) hen)
diff --git a/arvo/batz.hoon b/arvo/batz.hoon
index 2c8274d3f..282244386 100644
--- a/arvo/batz.hoon
+++ b/arvo/batz.hoon
@@ -8,18 +8,84 @@
::
|%
++ ghat :: out result <-$
- card
-::
+ $% [%crud p=@tas q=(list tank)] :: error with trace
+ [%hail ~] :: refresh
+ [%helo p=path q=prod] :: trigger prompt
+ [%init p=@p] :: report install
+ [%line p=@t] :: source line
+ [%logo p=@] :: logout
+ [%note p=@tD q=tank] :: show message
+ [%save p=path q=@] :: write atomic file
+ [%send p=lane q=@] :: send packet
+ [%talk p=tank] :: show on console
+ [%tell p=(list ,@t)] :: dump lines
+ [%veer p=@ta q=path r=@t] :: install vane
+ [%vega p=path] :: reboot by path
+ [%verb ~] :: reboot by path
+ [%warn p=tape] :: syslog
+ == ::
++ kiss :: in request ->$
- card
-::
+ $% [%crud p=@tas q=(list tank)] :: error with trace
+ [%hail ~] :: refresh
+ [%hook ~] :: this term hung up
+ [%harm ~] :: all terms hung up
+ [%init p=@p] :: report install
+ [%kill p=~] :: kill a task
+ [%line p=@t] :: source line
+ [%ling ~] :: rotate interface
+ [%limn ~] :: rotate ship
+ [%make p=(unit ,@t) q=@ud r=@ s=?] :: wild license
+ [%noop ~] :: no operation
+ [%sith p=@p q=@uw r=?] :: imperial generator
+ [%wake ~] :: timer activate
+ [%wart p=sock q=@tas r=path s=*] :: network request
+ == ::
+++ flog :: sent to %dill
+ $% [%crud p=@tas q=(list tank)] ::
+ [%text p=tape] ::
+ == ::
++ move ,[p=duct q=(mold newt ghat)] :: local move
-::
-++ newt :: out request $->
- card
-::
+++ newt ::
+ $% $: %a :: to %ames
+ $% [%make p=(unit ,@t) q=@ud r=@ s=?] ::
+ [%sith p=@p q=@uw r=?] ::
+ [%want p=sock q=path r=*] ::
+ == == ::
+ $: %b ::
+ $% [%hail ~] :: to %batz
+ [%line p=@t] ::
+ == == ::
+ $: %c :: to %clay
+ $% [%info p=@p q=@tas r=nori] ::
+ [%warp p=sock q=riff] ::
+ == == ::
+ $: %d :: to %dill
+ $% [%flog p=flog] ::
+ == == ::
+ $: %e :: to %eyre
+ $% [%band p=ship q=(list rout)] ::
+ [%that p=@ud q=love] ::
+ [%them p=(unit hiss)] ::
+ == == == ::
+++ rave :: see %clay
+ $% [& p=mood] :: single request
+ [| p=moat] :: change range
+ == ::
+++ riff ,[p=desk q=(unit rave)] :: see %clay
+++ sigh ,[@tas p=sign] :: sourced sign
++ sign :: in result $-<
- card
+ $% [%crud p=@tas q=(list tank)] :: by any
+ [%hail ~] :: by any
+ [%helo p=path q=prod] :: by %ames
+ [%init p=@p] :: by %ames
+ [%note p=@tD q=tank] :: by %clay
+ [%pipe p=(unit ,[p=tutu q=(list)])] :: by %batz
+ [%send p=lane q=@] :: by %ames
+ [%thou p=httr] :: by %eyre
+ [%waft p=sock q=*] :: by %ames
+ [%went p=ship q=cape] :: by %ames
+ [%writ p=riot] :: by %clay
+ == ::
--
|%
++ bard :: new session
@@ -32,6 +98,23 @@
p.sur 1
p.god 1
==
+++ beau ,[p=(unit ,@ud) q=(map wire goal) r=boor] :: next/want/thread
+++ beef :: raw product
+ $: p=(list gilt) :: actions
+ q=(list slip) :: requests
+ r=boar :: state
+ == ::
+++ 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=?(sign kiss)]) :: waiting cards
+ r=(qeu ,[p=wire q=nose]) :: pending notes
+ s=boar :: execution
+ == ::
++ brad :: session/dynamic
$: fog=(list ,@ud) :: task consoles
fen=(map ,@tas ,@ud) :: named tasks
@@ -86,6 +169,11 @@
==
++ brat ,[[who=ship bran] brad] :: don't ask why
++ brim (list ,[p=ship q=brad]) :: session
+++ gyro ,[p=@ud q=wire r=prod] :: live prompt
+++ task ::
+ $: paq=(qeu gyro) :: prompt queue
+ wip=[p=@ud q=(map ,@ud beau)] :: processes
+ == ::
-- ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 4bB, session engine ::
@@ -162,45 +250,61 @@
[r.fat (past:(fest p.fat hen) q.fat)]
::
++ lean :: lean:be
- |= [tea=wire hen=duct fav=card] :: deliver card
+ |= [tea=wire hen=duct sin=sign] :: deliver card
^+ *fi
=+ lay=(lead tea hen)
?> ?=([%ma *] p.lay)
- abet:(glob:q.lay t.p.lay fav)
+ abet:(glob:q.lay t.p.lay sin)
::
++ leap :: leap:be
- |= [tea=wire hen=duct fav=card] :: handle event
+ |= [tea=wire hen=duct sin=sign] :: accept response
^- [p=(list move) q=brat]
- ?: ?=([%crud *] fav)
- [[[hen [%slip %d %flog fav]] ~] +<.^^$]
- ?+ -.fav
- [[[hen %give fav] ~] +<.^^$]
+ ?- -.sin
+ %crud [[[hen [%slip %d %flog sin]] ~] +<.^^$]
+ %hail [[[hen %give sin] ~] +<.^^$]
+ %helo [~ +<.^^$]
+ %init [[[hen %give sin] ~] +<.^^$]
+ %note [[[hen %give sin] ~] +<.^^$]
+ %pipe !!
+ %send [[[hen %give sin] ~] +<.^^$]
+ %thou ?. (fear tea) :: legit
+ [~ +<.^^$]
+ abet:lash:(lean tea hen sin)
+ %waft :: ~& [%leap-waft sin]
+ abet:lash:(lean tea hen sin)
+ %went ?. (fear tea)
+ ~& [%went-fear tea]
+ [~ +<.^^$]
+ abet:lash:(lean tea hen sin)
+ %writ abet:lash:(loam tea hen +.sin)
+ ==
+ ::
+ ++ lear :: lear:be
+ |= [hen=duct kyz=kiss] :: handle request
+ ^- [p=(list move) q=brat]
+ ?- -.kyz
+ %crud [[[hen [%slip %d %flog kyz]] ~] +<.^^$]
%hail [[[hen [%give %helo prot]] ~] +<.^^$]
+ %harm [~ +<.^^$]
+ %hook ~&(%batz-hook [~ +<.^^$])
%line =+ gyp=?>(?=(^ fog) i.fog)
- ?: &(=(0 gyp) =(%$ p.fav)) $(fav [%hail ~])
+ ?: &(=(0 gyp) =(%$ p.kyz)) $(kyz [%hail ~])
=< abet
?: =(0 gyp)
- lash:(gill:(fist hen) p.fav)
- lash:(como:(fest gyp hen) p.fav)
+ lash:(gill:(fist hen) p.kyz)
+ lash:(como:(fest gyp hen) p.kyz)
%kill =+ gyp=?>(?=(^ fog) i.fog)
- ?: =(0 gyp) [[[hen [%give %logo ~]] ~] +<.^^$]
- abet:kill:(fest gyp hen)
+ ?. =(0 gyp)
+ abet:kill:(fest gyp hen)
+ ?: =(~[/[%$]/term/1] ?>(?=(^ hen) t.hen)) :: XX gross
+ [[[hen [%give %logo ~]] ~] +<.^^$]
+ [~ +<.^^$]
%ling ?> ?=(^ fog)
=> .(fog (weld t.fog `(list ,@ud)`[i.fog ~]))
[[[hen [%give %helo prot]] ~] +<.^^$]
%noop [~ +<.^^$]
- %soft $(fav ((hard card) p.fav))
- %thou ?. (fear tea) :: legit
- [~ +<.^^$]
- abet:lash:(lean tea hen fav)
- %waft :: ~& [%leap-waft fav]
- abet:lash:(lean tea hen fav)
- %went ?. (fear tea)
- ~& [%went-fear tea]
- [~ +<.^^$]
- abet:lash:(lean tea hen fav)
- %writ abet:lash:(loam tea hen +.fav)
- %wart (lion hen +.fav)
+ %wart (lion hen +.kyz)
+ ?(%init %limn %make %sith %wake) !! :: handled earlier
==
::
++ leon :: leon:be
@@ -269,7 +373,7 @@
::
++ fi :: fi:be
|= [gyp=@ud hen=duct gyr=task] :: process task
- =| duv=(list ,[p=duct q=card])
+ =| duv=(list move)
|%
++ abet :: abet:fi:be
^- [(list move) brat] :: resolve
@@ -285,8 +389,8 @@
==
:_ +<.^^$
%+ turn
- (flop `_duv`?:(sam duv [[~ [%helo prot]] duv]))
- |=([p=duct q=card] [(weld p hen) [%sick q]])
+ (flop `_duv`?:(sam duv [[~ [%give %helo prot]] duv]))
+ |=([p=duct q=(mold newt ghat)] [(weld p hen) q])
::
++ bitt |=(lap=path [(scot %ud gyp) lap]) :: bitt:fi:be
++ como :: como:fi:be
@@ -312,7 +416,7 @@
|= [lap=wire ted=@ud] :: XX ugly
^+ +>
%= +>
- duv :_(duv [[/b ~] [%hail ~]])
+ duv :_(duv `move`[~ %pass ~ %b [%hail ~]])
paq.gyr
%- ~(gas to *(qeu gyro))
%+ skip
@@ -324,7 +428,7 @@
|= [lap=wire ted=@ud pod=prod] :: install prompt
^+ +>
%_ +>
- duv :_(duv [[/b ~] [%hail ~]])
+ duv :_(duv [~ %pass ~ %b [%hail ~]])
paq.gyr (~(put to paq.gyr) [ted lap pod])
==
::
@@ -375,7 +479,7 @@
++ warn :: warn:fi:be
|= txt=tape :: send warning
^+ +>
- +>(duv :_(duv [~ [%warn txt]]))
+ +>(duv :_(duv [~ [%give %warn txt]]))
::
++ ra :: ra:fi:be
|_ $: ted=@ud :: thread id
@@ -460,9 +564,9 @@
%_(+> r.orb (~(put to r.orb) [lap nob]))
::
++ glob :: extern
- |= [lap=wire fav=card]
+ |= [lap=wire sik=?(sign kiss)]
^+ +>
- %_(+> q.orb (~(put to q.orb) [lap fav]))
+ %_(+> q.orb (~(put to q.orb) [lap sik]))
::
++ glum :: blocked thread
|= [gez=(list path) hog=boar]
@@ -492,6 +596,7 @@
|= sik=skit
^+ +>
%+ gram ~
+ :- %give
:+ %note '^'
:- %leaf
;: weld
@@ -523,11 +628,11 @@
[%clsg (turn pax |=(a=@ta [%dtzy %ta a]))]
::
++ gram :: add action
- |= [hom=duct fav=card]
- %_(+> duv [[hom fav] duv])
+ |= mov=move
+ %_(+> duv [mov duv])
::
++ gran :: add actions
- |= vid=(list ,[p=duct q=card])
+ |= vid=(list move)
^+ +>
?~(vid +> $(vid t.vid, +> (gram i.vid)))
::
@@ -537,7 +642,7 @@
?- -.ton
%0 [[~ p.ton] +>]
%1 [~ (glum ((list path) p.ton) s.orb)]
- %2 [~ (gram(orb [~ ~ ~ %r ~]) ~ [%crud %exit p.ton])]
+ %2 [~ (gram(orb [~ ~ ~ %r ~]) ~ [%give %crud %exit p.ton])]
==
::
++ grid :: process result
@@ -546,7 +651,7 @@
?- -.ton
%0 (fun p.ton)
%1 (glum ((list path) p.ton) s.orb)
- %2 (gram(orb [~ ~ ~ %r ~]) ~ [%crud %exit p.ton])
+ %2 (gram(orb [~ ~ ~ %r ~]) ~ [%give %crud %exit p.ton])
==
::
++ grin :: process result
@@ -555,7 +660,7 @@
?- -.ton
%0 (haul (fret p.ton))
%1 (glum ((list path) p.ton) hog)
- %2 (gram(orb [~ ~ ~ %r ~]) ~ [%crud %exit p.ton])
+ %2 (gram(orb [~ ~ ~ %r ~]) ~ [%give %crud %exit p.ton])
==
::
++ grip :: step to completion
@@ -709,7 +814,7 @@
::
++ gull :: request control
|= [tea=wire him=ship ryf=riff]
- (gram ~[/c [%b tea]] [%warp [who him] ryf])
+ (gram ~ %pass tea %c [%warp [who him] ryf])
::
++ gulf :: stop request
|= [tea=wire kit=kite]
@@ -750,11 +855,11 @@
^+ +>
?~ nex
?~ pun +>
- (gran (turn q.u.pun |=(a=* [~ (gyve p.u.pun a)])))
+ (gran (turn q.u.pun |=(a=* [~ %give (gyve p.u.pun a)])))
+>.$(..ra abet:(glob:(past u.nex) ~ [%pipe pun]))
::
++ gyve :: print vase
- |= [toy=tutu val=*] ^- card
+ |= [toy=tutu val=*] ^- ghat
=+ caf=((hard calf) (need (mang [felt:zu toy] sky)))
:: ?: =([~ [%atom %t]] caf)
:: [%tell ((hard ,@t) val) ~]
@@ -787,32 +892,42 @@
+>.^$(loq p.gud)
%ck +>.^$(cwd p.gud)
%cs +>.^$(cws p.gud)
- %de (gram ~ %note '#' q.gud)
+ %de (gram ~ %give %note '#' q.gud)
%ex =. +>.^$ guff
+>.^$(s.orb [%n p.gud *claw q.gud])
- %ha (gram ~ %crud %soft [p.gud ~])
- %ho (gram ~ %crud %soft p.gud)
- %la (gram ~ %talk p.gud)
- %lo (gran (turn p.gud |=(a=tank [~ %talk a])))
+ %ha (gram ~ %give %crud %soft [p.gud ~])
+ %ho (gram ~ %give %crud %soft p.gud)
+ %la (gram ~ %give %talk p.gud)
+ %lo (gran (turn p.gud |=(a=tank [~ %give %talk a])))
%mu !!
%mx |- ^+ +>.^^$
?~ p.gud +>.^^$
$(p.gud t.p.gud, +>.^^$ ^$(gud i.p.gud))
- %ok (gram [/c ~] %info who p.gud q.gud)
+ %ok (gram ~ %pass ~ %c %info who p.gud q.gud)
%sc good:+>.^$(sac ?~(p.gud ?~(sac ~ +.sac) [u.p.gud sac]))
%sp !!
%sq =+ tea=(bist %ma r.gud)
- %+ gram
- [/a [%b tea] ~]
- [%want [who p.gud] [%q q.gud %b tea] s.gud]
- %sr (gram [/a /b ~] [%want [who p.gud] [%r q.gud] r.gud])
- %te (gram ~ %tell p.gud)
- %th (gram [/e ~] %that p.gud q.gud)
+ %+ gram ~
+ [%pass tea %a [%want [who p.gud] [%q q.gud %b tea] s.gud]]
+ %sr (gram ~ %pass ~ %a [%want [who p.gud] [%r q.gud] r.gud])
+ %te (gram ~ %give %tell p.gud)
+ %th (gram ~ %pass ~ %e %that p.gud q.gud)
%tq =+ tea=(bist %ma p.gud)
- (gram [/e [%b tea] ~] [%them ~ q.gud])
+ (gram ~ %pass tea %e [%them ~ q.gud])
%va !!
- %xx (gram ~ p.gud)
- %xy (gram [p.gud /b ~] q.gud)
+ %xx =+ gah=((soft ghat) p.gud)
+ ?~ gah
+ ~& [%batz-xx (,@tas -.p.gud)]
+ !!
+ (gram ~ %give u.gah)
+ %xy ?. ?=([@ ~] p.gud)
+ ~& [%batz-xyz p.gud]
+ !!
+ =+ hug=((soft newt) [i.p.gud q.gud])
+ ?~ hug
+ ~& [%batz-xy (,@tas -.q.gud)]
+ !!
+ (gram ~ %pass ~ u.hug)
==
==
::
@@ -838,7 +953,7 @@
%es :: ~& %es-loss
(gull (bist %ma lap) p.gal q.gal ~)
%hp +>
- %ht (gram [/e [%b (bist [%ma lap])] ~] [%band who ~])
+ %ht (gram ~ %pass (bist [%ma lap]) %e [%band who ~])
%lq (gump | p.gal gyp ted lap)
%ow +>
%rt +>
@@ -856,7 +971,7 @@
%es :: ~& %es-moor
(gull (bist %ma lap) p.gal q.gal [~ r.gal])
%hp +>
- %ht (gram [/e [%b (bist [%ma lap])] ~] [%band who p.gal])
+ %ht (gram ~ %pass [%b (bist [%ma lap])] %e [%band who p.gal])
%lq (gump & p.gal [gyp ted lap])
%ow +>
%rt +>
@@ -883,74 +998,74 @@
++ pane |=(gal=goal %_(. lug [~ gal])) :: set goal
++ pang %_(. lug ~) :: delete goal
++ pong :: accept card
- |= fav=card
+ |= sik=?(sign kiss)
^+ +>
?> ?=(^ lug)
?- -.u.lug
~
- ?> ?=(%pipe -.fav)
- +>.$(+>.$ (glib lap [%$ p.fav]))
+ ?> ?=(%pipe -.sik)
+ +>.$(+>.$ (glib lap [%$ p.sik]))
::
%do !!
::
%eg
- ?> ?=(%writ -.fav)
- +>.$(lug ~, +>.$ (glib lap [%eg +.fav]))
+ ?> ?=(%writ -.sik)
+ +>.$(lug ~, +>.$ (glib lap [%eg +.sik]))
::
%es
- ?> ?=(%writ -.fav)
+ ?> ?=(%writ -.sik)
=+ ^= goh ^- (unit goal)
- ?~ p.fav `(unit goal)`~
+ ?~ p.sik `(unit goal)`~
?- -.r.u.lug
%& ~
%|
^- (unit goal)
:- ~
- ?> ?=(%ud -.q.p.u.p.fav)
+ ?> ?=(%ud -.q.p.u.p.sik)
%= u.lug
p.p.r
?> ?| !=(%ud -.p.p.r.u.lug)
- =(p.p.p.r.u.lug p.q.p.u.p.fav)
+ =(p.p.p.r.u.lug p.q.p.u.p.sik)
==
- [%ud +(p.q.p.u.p.fav)]
+ [%ud +(p.q.p.u.p.sik)]
==
==
=. loz ?~(goh (~(del by loz) lap) (~(put by loz) lap u.goh))
%= +>.$
lug goh
gul goh
- +>.$ (glib lap [%eg +.fav])
+ +>.$ (glib lap [%eg +.sik])
==
::
%hp
- ?> ?=(%thou -.fav)
- +>.$(+>.$ (glib lap [%hp +.fav]))
+ ?> ?=(%thou -.sik)
+ +>.$(+>.$ (glib lap [%hp +.sik]))
::
%ht !!
- :: ?> ?=(%thee -.fav)
- :: +>.$(+>.$ (glib lap [%ht +.fav]))
+ :: ?> ?=(%thee -.sik)
+ :: +>.$(+>.$ (glib lap [%ht +.sik]))
::
%lq
- ?> ?=(%wart -.fav)
- +>.$(+>.$ (glib lap [%lq q.p.fav r.fav s.fav]))
+ ?> ?=(%wart -.sik)
+ +>.$(+>.$ (glib lap [%lq q.p.sik r.sik s.sik]))
::
%rt
- ?: ?=(%went -.fav)
- ?. ?=(%dead q.fav) +>.$
+ ?: ?=(%went -.sik)
+ ?. ?=(%dead q.sik) +>.$
+>.$(+>.$ (glib lap [%rt ~]))
- ?> ?=(%waft -.fav)
- +>.$(+>.$ (glib lap [%rt ~ q.fav]))
+ ?> ?=(%waft -.sik)
+ +>.$(+>.$ (glib lap [%rt ~ q.sik]))
::
%up
- ?> ?=(%line -.fav)
- +>.$(+>.$ (glib lap [%up +.fav]))
+ ?> ?=(%line -.sik)
+ +>.$(+>.$ (glib lap [%up +.sik]))
::
%ow
- ?> ?=(%went -.fav)
- +>.$(+>.$ (glib lap [%ow q.fav]))
+ ?> ?=(%went -.sik)
+ +>.$(+>.$ (glib lap [%ow q.sik]))
::
%wa
- ?> ?=(%wake -.fav)
+ ?> ?=(%wake -.sik)
+>.$(+>.$ (glib lap [%wa ~]))
==
--
@@ -1166,17 +1281,26 @@
|= [now=@da eny=@ ski=sled] :: current invocation
^? :: opaque core
|% :: poke/peek pattern
-++ take :: process move
- |= [tea=wire hen=duct hin=(hypo sign)]
+++ call :: handle request
+ |= $: hen=duct
+ hic=(hypo (hobo kiss))
+ ==
+ => %= . :: XX temporary
+ q.hic
+ ^- kiss
+ ?: ?=(%soft -.q.hic)
+ :: ~& [%dill-call-soft (,@tas `*`-.p.q.hic)]
+ ((hard kiss) p.q.hic)
+ ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
+ ~& [%batz-call-flub (,@tas `*`-.q.hic)]
+ ((hard kiss) q.hic)
+ ==
^- [p=(list move) q=_..^$]
- :: ~& [%batz-take -.q.hin [%tea tea] [%hen hen]]
=+ ska=(slod ski)
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
- ?: ?=([%crud *] q.hin)
- [[[hen [%slip %d %flog q.hin]] ~] ..^$]
- ?: ?=([%soft *] q.hin)
- $(q.hin ((hard card) p.q.hin))
- ?: ?=(%wake -.q.hin)
+ ?: ?=([%crud *] q.hic)
+ [[[hen [%slip %d %flog q.hic]] ~] ..^$]
+ ?: ?=(%wake -.q.hic)
=+ ^= fiy
=| fiy=(list ,[p=duct q=ship r=[p=@ud q=@ud r=wire]])
|- ^+ fiy
@@ -1214,63 +1338,41 @@
|- ^- [p=(list move) q=_..^^$]
=+ dus=(~(get by dez) hen)
?~ dus
- ?+ -.q.hin
- ~& [%take-none -.q.hin tea hen]
- ~|([%take-none -.q.hin] !!)
+ ?+ -.q.hic
+ ~& [%take-none -.q.hic ~ hen]
+ ~|([%take-none -.q.hic] !!)
::
%hail
?~ big
- ~& [%take-hail-soon hen]
+ ~& [%call-hail-soon hen]
[~ ..^^$]
- ~& [%batz-hack-console hen]
$(dez (~(put by dez) hen [[u.big (bard u.big)] ~]))
::
%init
- :: ~& [%take-init p.q.hin hen]
+ :: ~& [%take-init p.q.hic hen]
=. big ?~ big
- `p.q.hin
- `(min p.q.hin u.big)
- =+ bos=(sein p.q.hin)
- =. bos ?.(=(bos p.q.hin) bos ~zod)
- :- :- [hen [%give q.hin]]
- ?: =(bos p.q.hin) ~
+ `p.q.hic
+ `(min p.q.hic u.big)
+ =+ bos=(sein p.q.hic)
+ :- :- [hen [%give q.hic]]
+ ?: =(bos p.q.hic) ~
:_ ~
[hen [%slip %b %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
- ..^^$(dez (~(put by dez) hen [[p.q.hin (bard p.q.hin)] ~]))
+ ..^^$(dez (~(put by dez) hen [[p.q.hic (bard p.q.hic)] ~]))
::
- ?(%loin %make %sith)
- [[[hen [%toss %a tea q.hin]] ~] ..^^$]
+ ?(%make %sith)
+ [[[hen [%pass ~ %a q.hic]] ~] ..^^$]
==
?> ?=(^ u.dus)
- ?+ -.q.hin
- =+ beg=`brat`[[p.i.u.dus bred] q.i.u.dus]
- =+ yub=(leap:((be beg) now eny sky) tea hen q.hin)
- :- p.yub
- ..^^$(dez (~(put by dez) hen [[p.i.u.dus +.q.yub] t.u.dus]))
- ::
- %init
- =+ bos=(sein p.q.hin)
- =. bos ?.(=(bos p.q.hin) bos ~zod)
- :- :* [hen %give q.hin]
- [[[%b tea] hen] [%sick %hail ~]]
- ?: =(bos p.q.hin) ~
- :_ ~
- [[/b hen] [%sick %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
- ==
- ..^^$(dez (~(put by dez) hen [[p.q.hin (bard p.q.hin)] u.dus]))
- ::
- %limn
- $(q.hin [%hail ~], dez (~(put by dez) hen (weld t.u.dus `brim`[i.u.dus ~])))
- ==
-::
-++ call :: process move
- |= [hen=duct hic=(hypo kiss)]
- (take ~ hen hic)
+ =+ beg=`brat`[[p.i.u.dus bred] q.i.u.dus]
+ =+ yub=(lear:((be beg) now eny sky) hen q.hic)
+ :- p.yub
+ ..^^$(dez (~(put by dez) hen [[p.i.u.dus +.q.yub] t.u.dus]))
::
++ doze
|= [now=@da hen=duct]
^- (unit ,@da)
- =| doz=(unit ,@da)
+ =| doz=(unit ,@da)
|- ^+ doz
?~ dez doz
=. doz $(dez l.dez)
@@ -1294,8 +1396,54 @@
::
++ scry
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
- ^- (unit (unit (pair lode ,*)))
+ ^- (unit (unit (pair logo ,*)))
~
::
++ stay [%0 big dez]
+++ take :: accept response
+ |= [tea=wire hen=duct hin=(hypo sigh)]
+ ^- [p=(list move) q=_..^$]
+ :: ~& [%batz-take -.p.q.hin [%tea tea] [%hen hen]]
+ =+ ska=(slod ski)
+ =+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
+ ?: ?=([%crud *] p.q.hin)
+ [[[hen [%slip %d %flog p.q.hin]] ~] ..^$]
+ =+ dus=(~(get by dez) hen)
+ ?~ dus
+ ?+ -.p.q.hin
+ ~&([%take-none -.p.q.hin] !!)
+ ::
+ ?(%hail %send)
+ ?~ big
+ ~& [%take-hail-soon hen]
+ [~ ..^$]
+ :: ~& [%batz-take-console hen]
+ $(dez (~(put by dez) hen [[u.big (bard u.big)] ~]))
+ ::
+ %init
+ :: ~& [%take-init p.p.q.hin hen]
+ =. big ?~ big
+ `p.p.q.hin
+ `(min p.p.q.hin u.big)
+ =+ bos=(sein p.p.q.hin)
+ :- :- [hen [%give p.q.hin]]
+ ?: =(bos p.p.q.hin) ~
+ :_ ~
+ [hen [%slip %b %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
+ ..^$(dez (~(put by dez) hen [[p.p.q.hin (bard p.p.q.hin)] ~]))
+ ==
+ ?> ?=(^ u.dus)
+ ?: ?=(%init -.p.q.hin)
+ =+ bos=(sein p.p.q.hin)
+ :- :* [hen %give p.q.hin]
+ [[[%b ~] hen] [%sick %hail ~]]
+ ?: =(bos p.p.q.hin) ~
+ :_ ~
+ [[/b hen] [%sick %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
+ ==
+ ..^$(dez (~(put by dez) hen [[p.p.q.hin (bard p.p.q.hin)] u.dus]))
+ =+ beg=`brat`[[p.i.u.dus bred] q.i.u.dus]
+ =+ yub=(leap:((be beg) now eny sky) tea hen p.q.hin)
+ :- p.yub
+ ..^$(dez (~(put by dez) hen [[p.i.u.dus +.q.yub] t.u.dus]))
--
diff --git a/arvo/clay.hoon b/arvo/clay.hoon
index 79fdefba6..ba1158590 100644
--- a/arvo/clay.hoon
+++ b/arvo/clay.hoon
@@ -3,19 +3,75 @@
::
|= pit=vase
=> |%
+++ cult (map duct rave) :: subscriptions
+++ dojo ,[p=cult q=dome] :: domestic desk state
++ gift :: out result <-$
- card
-::
+ $% [%ergo p=@p q=@tas r=@ud] :: version update
+ [%note p=@tD q=tank] :: debug message
+ [%send p=lane q=@] :: send packet
+ [%writ p=riot] :: response
+ == ::
++ kiss :: in request ->$
- card
-::
+ $% [%info p=@p q=@tas r=nori] :: internal edit
+ [%ingo p=@p q=@tas r=nori] :: internal noun edit
+ [%init p=@p] :: report install
+ [%into p=@p q=@tas r=nori] :: external edit
+ [%invo p=@p q=@tas r=nori] :: external noun edit
+ [%wake ~] :: timer activate
+ [%wart p=sock q=@tas r=path s=*] :: network request
+ [%warp p=sock q=riff] :: file request
+ == ::
++ move ,[p=duct q=(mold note gift)] :: local move
-::
++ note :: out request $->
- card
-::
+ $% $: %a :: to %ames
+ $% [%want p=sock q=path r=*] ::
+ == == ::
+ $: %c :: to %clay
+ $% [%warp p=sock q=riff] ::
+ == == ::
+ $: %d ::
+ $% [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill
+ == == == ::
++ sign :: in result $-<
- card
+ $? $: %a :: by %ames
+ $% [%send p=lane q=@] ::
+ [%waft p=sock q=*] ::
+ [%went p=ship q=cape] ::
+ == == ::
+ $: %c :: by %clay
+ $% [%writ p=riot] ::
+ == == ::
+ $: @tas :: by any
+ $% [%crud p=@tas q=(list tank)] ::
+ == == == ::
+++ raft :: filesystem
+ $: fat=(map ship room) :: domestic
+ hoy=(map ship rung) :: foreign
+ == ::
+++ rave :: general request
+ $% [& p=mood] :: single request
+ [| p=moat] :: change range
+ == ::
+++ rede :: universal project
+ $: lim=@da :: complete to
+ qyx=cult :: subscribers
+ ref=(unit rind) :: outgoing requests
+ dom=dome :: revision state
+ == ::
+++ riff ,[p=desk q=(unit rave)] :: request/desist
+++ rind :: request manager
+ $: nix=@ud :: request index
+ bom=(map ,@ud ,[p=duct q=rave]) :: outstanding
+ fod=(map duct ,@ud) :: current requests
+ haw=(map mood (unit)) :: simple cache
+ == ::
+++ room :: fs per ship
+ $: hun=duct :: terminal duct
+ hez=(unit duct) :: sync duct
+ dos=(map desk dojo) :: native desk
+ == ::
+++ rung $: rus=(map desk rede) :: neighbor desks
+ == ::
-- =>
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 4cA, filesystem logic ::
@@ -27,9 +83,9 @@
|= [now=@da hun=duct hez=(unit duct)]
|= [[who=@p for=@p] syd=@ta rede]
=* red +<+>
- =| yel=(list ,[p=duct q=card])
+ =| yel=(list ,[p=duct q=gift])
=| byn=(list ,[p=duct q=riot])
- =| vag=(list ,[p=duct q=card])
+ =| vag=(list ,[p=duct q=gift])
=| say=(list ,[p=duct q=path r=ship s=[p=@ud q=riff]])
|%
++ abet
@@ -37,18 +93,18 @@
:_ red
;: weld
%+ turn (flop yel)
- |=([a=duct b=card] [hun %give b])
+ |=([a=duct b=gift] [hun %give b])
::
%+ turn (flop byn)
|=([a=duct b=riot] [a %give [%writ b]])
::
%+ turn (flop vag)
- |=([a=duct b=card] [a %give b])
+ |=([a=duct b=gift] [a %give b])
::
%+ turn (flop say)
|= [a=duct b=path c=ship d=[p=@ud q=riff]]
:- a
- [%toss %a b %want [who c] [%q %re p.q.d (scot %ud p.d) ~] q.d]
+ [%pass b %a %want [who c] [%q %re p.q.d (scot %ud p.d) ~] q.d]
==
::
++ aver :: read
@@ -344,96 +400,77 @@
|= [now=@da eny=@ ski=sled] :: activate
^? :: opaque core
|% ::
- ++ take :: update
- |= [tea=wire hen=duct hin=(hypo sign)]
+ ++ call :: handle request
+ |= $: hen=duct
+ hic=(hypo (hobo kiss))
+ ==
+ => %= . :: XX temporary
+ q.hic
+ ^- kiss
+ ?: ?=(%soft -.q.hic)
+ ((hard kiss) p.q.hic)
+ ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
+ ~& [%clay-call-flub (,@tas `*`-.q.hic)]
+ ((hard kiss) q.hic)
+ ==
^- [p=(list move) q=_..^$]
- ?+ -.q.hin [[[hen %give q.hin] ~] ..^$]
- %crud
- [[[hen %slip %d %flog q.hin] ~] ..^$]
- ::
- %soft
- $(q.hin ((hard card) p.q.hin))
- ::
+ ?- -.q.hic
%init
- [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hin [hen ~ ~]))]
+ [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~]))]
::
?(%info %into)
- ?: =(%$ q.q.hin)
- ?. ?=(%into -.q.hin) [~ ..^$]
- =+ yar=(need (~(get by fat.ruf) p.q.hin))
- [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hin yar(hez [~ hen])))]
+ ?: =(%$ q.q.hic)
+ ?. ?=(%into -.q.hic) [~ ..^$]
+ =+ yar=(need (~(get by fat.ruf) p.q.hic))
+ [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))]
=^ mos ruf
- =+ une=(un p.q.hin now ruf)
- =+ zot=abet:(exec:(di:wake:une q.q.hin) hen now r.q.hin)
+ =+ une=(un p.q.hic now ruf)
+ =+ zot=abet:(exec:(di:wake:une q.q.hic) hen now r.q.hic)
:- -.zot
- =. une (pish:une q.q.hin +.zot)
- abet:une(hez.yar ?.(=(%into -.q.hin) hez.yar.une [~ hen]))
+ =. une (pish:une q.q.hic +.zot)
+ abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen]))
[mos ..^$]
::
- ?(%ingo %invo)
- ?: =(%$ q.q.hin)
- ?. ?=(%invo -.q.hin) [~ ..^$]
- =+ yar=(need (~(get by fat.ruf) p.q.hin))
- [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hin yar(hez [~ hen])))]
+ ?(%ingo %invo) :: not yet used
+ ?: =(%$ q.q.hic)
+ ?. ?=(%invo -.q.hic) [~ ..^$]
+ =+ yar=(need (~(get by fat.ruf) p.q.hic))
+ [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))]
=^ mos ruf
- =+ une=(un p.q.hin now ruf)
- =+ zot=abet:(exec:(di:wake:une q.q.hin) hen now r.q.hin)
+ =+ une=(un p.q.hic now ruf)
+ =+ zot=abet:(exec:(di:wake:une q.q.hic) hen now r.q.hic)
:- -.zot
- =. une (pish:une q.q.hin +.zot)
- abet:une(hez.yar ?.(=(%invo -.q.hin) hez.yar.une [~ hen]))
- [mos ..^$]
- ::
- %waft
- ?> ?=([@ @ ~] tea)
- =+ syd=(need (slaw %tas i.tea))
- =+ inx=(need (slaw %ud i.t.tea))
- =^ mos ruf
- =+ ^= zot
- abet:wake:(knit:(do now p.q.hin syd ruf) [inx ((hard riot) q.q.hin)])
- [-.zot (posh q.p.q.hin syd +.zot ruf)]
+ =. une (pish:une q.q.hic +.zot)
+ abet:une(hez.yar ?.(=(%invo -.q.hic) hez.yar.une [~ hen]))
[mos ..^$]
::
%warp
=^ mos ruf
- ?: =(p.p.q.hin q.p.q.hin)
- =+ une=(un p.p.q.hin now ruf)
- =+ wex=(di:une p.q.q.hin)
+ ?: =(p.p.q.hic q.p.q.hic)
+ =+ une=(un p.p.q.hic now ruf)
+ =+ wex=(di:une p.q.q.hic)
=+ ^= woo
- ?~ q.q.q.hin
+ ?~ q.q.q.hic
abet:(ease:wex hen)
- abet:(eave:wex hen u.q.q.q.hin)
- [-.woo abet:(pish:une p.q.q.hin +.woo)]
- =+ wex=(do now p.q.hin p.q.q.hin ruf)
+ abet:(eave:wex hen u.q.q.q.hic)
+ [-.woo abet:(pish:une p.q.q.hic +.woo)]
+ =+ wex=(do now p.q.hic p.q.q.hic ruf)
=+ ^= woo
- ?~ q.q.q.hin
+ ?~ q.q.q.hic
abet:(ease:wex hen)
- abet:(eave:wex hen u.q.q.q.hin)
- [-.woo (posh q.p.q.hin p.q.q.hin +.woo ruf)]
+ abet:(eave:wex hen u.q.q.q.hic)
+ [-.woo (posh q.p.q.hic p.q.q.hic +.woo ruf)]
[mos ..^$]
::
%wart
- ?> ?=(%re q.q.hin)
- =+ ryf=((hard riff) s.q.hin)
+ ?> ?=(%re q.q.hic)
+ =+ ryf=((hard riff) s.q.hic)
:_ ..^$
:~ :- hen
- :^ %toss %c
- [(scot %p p.p.q.hin) (scot %p q.p.q.hin) r.q.hin]
- [%warp [p.p.q.hin p.p.q.hin] ryf]
+ :^ %pass [(scot %p p.p.q.hic) (scot %p q.p.q.hic) r.q.hic]
+ %c
+ [%warp [p.p.q.hic p.p.q.hic] ryf]
==
- ::
- %writ
- ?> ?=([@ @ *] tea)
- =+ our=(need (slaw %p i.tea))
- =+ him=(need (slaw %p i.t.tea))
- :_ ..^$
- :~ :- hen
- [%toss %a ~ [%want [our him] [%r %re %c t.t.tea] p.q.hin]]
- ==
- ::
- %went :: XX should actually propagate
- ?: =(%good q.q.hin) [~ ..^$]
- ~& [%clay-lost p.q.hin tea]
- [~ ..^$]
::
%wake
=+ dal=(turn (~(tap by fat.ruf) ~) |=([a=@p b=room] a))
@@ -445,10 +482,6 @@
$(dal t.dal, ruf abet:une, mos (weld som mos))
==
::
- ++ call :: process move
- |= [hen=duct hic=(hypo kiss)]
- (take ~ hen hic)
- ::
++ doze
|= [now=@da hen=duct]
=| nex=(unit ,@da)
@@ -464,7 +497,7 @@
::
++ scry :: inspect
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
- ^- (unit (unit (pair lode ,*)))
+ ^- (unit (unit (pair logo ,*)))
=+ got=(~(has by fat.ruf) his)
=+ luk=?.(?=(%$ -.lot) ~ ((soft case) p.lot))
?~ luk [~ ~]
@@ -479,4 +512,39 @@
|=(a=(unit) (bind a |=(b=* [%noun b])))
::
++ stay [%0 ruf]
+ ++ take :: accept response
+ |= [tea=wire hen=duct hin=(hypo sign)]
+ ^- [p=(list move) q=_..^$]
+ ?- -.+.q.hin
+ %crud
+ [[[hen %slip %d %flog +.q.hin] ~] ..^$]
+ ::
+ %send
+ [[hen %give +.q.hin]~ ..^$]
+ ::
+ %waft
+ ?> ?=([@ @ ~] tea)
+ =+ syd=(need (slaw %tas i.tea))
+ =+ inx=(need (slaw %ud i.t.tea))
+ =^ mos ruf
+ =+ ^= zot
+ =< abet =< wake
+ (knit:(do now p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)])
+ [-.zot (posh q.p.+.q.hin syd +.zot ruf)]
+ [mos ..^$]
+ ::
+ %writ
+ ?> ?=([@ @ *] tea)
+ =+ our=(need (slaw %p i.tea))
+ =+ him=(need (slaw %p i.t.tea))
+ :_ ..^$
+ :~ :- hen
+ [%pass ~ %a [%want [our him] [%r %re %c t.t.tea] p.+.q.hin]]
+ ==
+ ::
+ %went
+ ?: =(%good q.+.q.hin) [~ ..^$]
+ ~& [%clay-lost p.+.q.hin tea]
+ [~ ..^$]
+ ==
--
diff --git a/arvo/dill.hoon b/arvo/dill.hoon
index caaa6de48..61f3c70c2 100644
--- a/arvo/dill.hoon
+++ b/arvo/dill.hoon
@@ -2,43 +2,125 @@
:: dill (4d), terminal handling
::
|= pit=vase
-=> |%
+=> |% :: interface tiles
++ gift :: out result <-$
- card
-::
+ $% [%bbye ~] :: reset prompt
+ [%blit p=(list blit)] :: terminal output
+ [%init p=@p] :: report install
+ [%logo p=@] :: logout
+ [%send p=lane q=@] :: transmit packet
+ [%veer p=@ta q=path r=@t] :: install vane
+ [%vega p=path] :: reboot by path
+ [%verb ~] :: by %batz
+ ==
++ kiss :: in request ->$
- card
-::
+ $% [%belt p=belt] :: terminal input
+ [%blew p=blew] :: terminal config
+ [%boot p=*] :: weird %dill boot
+ [%crud p=@tas q=(list tank)] :: error with trace
+ [%flog p=flog] :: wrapped error
+ [%hail ~] :: terminal refresh
+ [%hook ~] :: this term hung up
+ [%harm ~] :: all terms hung up
+ [%noop ~] :: no operation
+ [%talk p=tank] ::
+ [%text p=tape] ::
+ == ::
+++ flog :: sent to %dill
+ $% [%crud p=@tas q=(list tank)] ::
+ [%text p=tape] ::
+ == ::
++ move ,[p=duct q=(mold note gift)] :: local move
-::
++ note :: out request $->
- card
-::
-++ sign :: in result $-<
- card
---
-=| $: %0 ::
- dug=(map duct yard) ::
- == ::
-|= [now=@da eny=@ ski=sled] :: current invocation
-^? :: opaque core
-|% :: poke/peek pattern
-++ take :: process move
- |= [tea=wire hen=duct hin=(hypo sign)]
- ^- [p=(list move) q=_..^$]
- ?: ?=(%flog -.q.hin)
- :_ ..^$
- %+ turn (~(tap by dug) *(list ,[p=duct q=yard]))
- |=([a=duct b=yard] [a %slip %d p.q.hin])
- ?: ?=(%soft -.q.hin)
- $(q.hin ((hard card) p.q.hin))
+ $% $: %b :: to %batz
+ $% [%hail ~] ::
+ [%harm ~] ::
+ [%hook ~] ::
+ [%kill p=~] ::
+ [%line p=@t] ::
+ [%ling ~] ::
+ [%make p=(unit ,@t) q=@ud r=@ s=?] ::
+ [%sith p=@p q=@uw r=?] ::
+ == == ::
+ $: %d :: to %dill
+ $% [%crud p=@tas q=(list tank)] ::
+ [%text p=tape] ::
+ == == == ::
+++ sign :: in result $<-
+ $? $: %b :: by %batz
+ $% [%hail ~] ::
+ [%helo p=path q=prod] ::
+ [%logo p=@] ::
+ [%save p=path q=@] ::
+ [%talk p=tank] ::
+ [%tell p=(list ,@t)] ::
+ [%text p=tape] ::
+ [%verb ~] ::
+ [%veer p=@ta q=path r=@t] ::
+ [%vega p=path] ::
+ [%warn p=tape] ::
+ == == ::
+ $: @tas :: by any
+ $% [%crud p=@tas q=(list tank)] ::
+ [%init p=@p] ::
+ [%note p=@tD q=tank] ::
+ [%send p=lane q=@] ::
+ == == == ::
+:::::::: :: dill tiles
+++ bein :: terminal control
+ $: $: bul=@ud :: buffer length
+ bus=@ud :: cursor in buffer
+ but=(list ,@c) :: buffer text
+ 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
+ == ::
+ $: pol=@ud :: length of prompt
+ pot=tape :: prompt text
+ == ::
+ == ::
+++ blew ,[p=@ud q=@ud] :: columns rows
+++ 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
+ [%ret ~] :: return
+ [%txt p=(list ,@c)] :: utf32 text
+ == ::
+++ 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
+ == ::
+++ blur ,[p=@ud q=(unit bein) r=blot] :: columns, prompt
+++ yard :: terminal state
+ $: p=? :: verbose
+ q=blur :: display state
+ r=(map path hist) :: history
+ == ::
+-- =>
+|%
+++ dy
+ |= [hen=duct dug=(map duct yard)]
=+ ^= yar ^- yard
- =+ yar=(~(get by dug) hen)
- ?^ yar u.yar
- [& [80 ~ *blot] ~]
+ =+ yur=(~(get by dug) hen)
+ ?^ yur u.yur
+ [& [80 ~ *blot] ~]
=| mos=(list move)
- =+ wip=|
- =< yerk:leap
|%
++ beep (curb [[%bel ~] ~]) :: send beep
++ curb :: send blits
@@ -175,15 +257,71 @@
(gore(hyr.u.q.q.yar [~ txt]) hup)
$(hup +(hup))
::
- ++ leap :: terminal event
- |- ^+ +
- ?+ -.q.hin +(mos :_(mos [hen %give q.hin]))
- %noop +
+ ++ leap :: accept response
+ |= [tea=wire sih=sign]
+ ^+ +>
+ ?- -.+.sih
+ %crud :: error trace
+ =. q.+.sih [[%leaf (trip p.+.sih)] q.+.sih]
+ |- ^+ +>.^$
+ ?~ q.+.sih +>.^$
+ (fume:$(q.+.sih t.q.+.sih) '!' `tank`i.q.+.sih)
+ ::
+ %helo :: trigger prompt
+ %- edit
+ =| bed=bein
+ =+ ^= hyt ^- hist
+ =+ hyt=(~(get by r.yar) p.+.sih)
+ ?~(hyt *hist u.hyt)
+ ?: &(?=(^ q.q.yar) =(p.+.sih hux.u.q.q.yar))
+ %= u.q.q.yar
+ hyt [+(p.hyt) [%$ q.hyt]]
+ pot q.q.+.sih
+ pol (lent q.q.+.sih)
+ buy p.q.+.sih
+ ==
+ =+ zon=(tuba r.q.+.sih)
+ =+ zow=(lent zon)
+ %= bed
+ bul zow
+ bus zow
+ but zon
+ buy p.q.+.sih
+ hux p.+.sih
+ hiz 0
+ hyt [+(p.hyt) [%$ q.hyt]]
+ pot q.q.+.sih
+ pol (lent q.q.+.sih)
+ ==
+ ::
+ ?(%hail %make %sith)
+ +>.$(mos :_(mos [hen %pass ~ %b +.sih]))
+ ::
+ %note ?.(p.yar +>.$ (fume p.+.sih q.+.sih)) :: debug message
+ %save :: write a file
+ %= +>.$
+ mos :_(mos [hen [%give %blit [%sav p.+.sih q.+.sih] ~]])
+ ==
+ ::
+ %tell (furl (turn p.+.sih |=(a=@t (trip a)))) :: wall of text
+ %talk (furl (~(win re p.+.sih) 0 p.q.yar)) :: program output
+ %text $(+.sih [%talk %leaf p.+.sih]) :: simple message
+ %warn (fume '~' [%leaf p.+.sih]) :: system message
+ ?(%init %logo %send %veer %vega %verb) :: drop-throughs
+ +>(mos :_(mos [hen %give +.sih]))
+ ==
+ ::
+ ++ lear :: handle request
+ |= kyz=kiss
+ ^+ +>
+ ?- -.kyz
+ %flog !!
+ %noop +>
%belt :: terminal input
?~ q.q.yar
beep
?^ hyr.u.q.q.yar :: live search
- ?+ p.q.hin $(hiz.u.q.q.yar 0, hyr.u.q.q.yar ~)
+ ?+ p.kyz $(hiz.u.q.q.yar 0, hyr.u.q.q.yar ~)
[%bac *]
?: =(~ u.hyr.u.q.q.yar)
(curb [[%bel ~] ~])
@@ -192,16 +330,16 @@
hyr [~ (scag (dec (lent u.hyr.u.q.q.yar)) u.hyr.u.q.q.yar)]
==
::
- [%txt *] (look hiz.u.q.q.yar (weld u.hyr.u.q.q.yar p.p.q.hin))
+ [%txt *] (look hiz.u.q.q.yar (weld u.hyr.u.q.q.yar p.p.kyz))
[%ctl %g] (edit u.q.q.yar(bul 0, bus 0, but ~, hiz 0, hyr ~))
[%ctl %r]
?: =(p.hyt.u.q.q.yar hiz.u.q.q.yar)
beep
(look +(hiz.u.q.q.yar) u.hyr.u.q.q.yar)
==
- ?- -.p.q.hin
+ ?- -.p.kyz
%aro :: arrow
- ?- p.p.q.hin
+ ?- p.p.kyz
%d :: down
?: =(0 hiz.u.q.q.yar)
beep
@@ -225,7 +363,7 @@
==
::
%bac :: backspace
- ^+ +.$
+ ^+ +>.$
?: =(0 bus.u.q.q.yar)
(curb `(list blit)`[[%bel ~] ~])
%- edit
@@ -239,20 +377,20 @@
==
::
%ctl :: control
- ?+ p.p.q.hin
+ ?+ p.p.kyz
beep
%a (edit u.q.q.yar(bus 0))
- %b $(q.hin [%belt %aro %l])
+ %b $(kyz [%belt %aro %l])
%d ?: ?& =(0 bul.u.q.q.yar)
=(0 bus.u.q.q.yar)
==
- +.$(mos :_(mos [hen %toss %b ~ [%kill ~]]))
- $(q.hin [%belt %del ~])
+ +>.$(mos :_(mos [hen %pass ~ %b [%kill ~]]))
+ $(kyz [%belt %del ~])
%e (edit u.q.q.yar(bus bul.u.q.q.yar))
- %f $(q.hin [%belt %aro %r])
+ %f $(kyz [%belt %aro %r])
%k ?: =(bul.u.q.q.yar bus.u.q.q.yar)
beep
- => .(+.$ (kill (slag bus.u.q.q.yar but.u.q.q.yar)))
+ => .(+>.$ (kill (slag bus.u.q.q.yar but.u.q.q.yar)))
%- edit
?> ?=(^ q.q.yar)
%= u.q.q.yar
@@ -279,12 +417,12 @@
~
(slag (add 2 pos) but.u.q.q.yar)
==
- %l +.$(mos :_(mos [hen %give %blit [[%clr ~] ~]]))
- %n $(q.hin [%belt %aro %d])
- %p $(q.hin [%belt %aro %u])
+ %l +>.$(mos :_(mos [hen %give %blit [[%clr ~] ~]]))
+ %n $(kyz [%belt %aro %d])
+ %p $(kyz [%belt %aro %u])
%u ?: =(0 bus.u.q.q.yar)
beep
- => .(+.$ (kill (scag bus.u.q.q.yar but.u.q.q.yar)))
+ => .(+>.$ (kill (scag bus.u.q.q.yar but.u.q.q.yar)))
%- edit
?> ?=(^ q.q.yar)
%= u.q.q.yar
@@ -294,11 +432,11 @@
==
%r (edit u.q.q.yar(hyr [~ ~]))
:: TODO
- :: %w +.$(mos :_(mos [hen %toss %b ~ [%limn ~]]))
- %x +.$(mos :_(mos [hen %toss %b ~ [%ling ~]]))
+ :: %w +>.$(mos :_(mos [hen %pass ~ %b [%limn ~]]))
+ %x +>.$(mos :_(mos [hen %pass ~ %b [%ling ~]]))
%y ?: =(0 p.r.q.yar)
beep
- $(q.hin [%belt %txt (snag q.r.q.yar r.r.q.yar)])
+ $(kyz [%belt %txt (snag q.r.q.yar r.r.q.yar)])
==
::
%del :: delete
@@ -314,7 +452,7 @@
==
::
%met :: meta
- ?+ p.p.q.hin
+ ?+ p.p.kyz
beep
%f
?: =(bul.u.q.q.yar bus.u.q.q.yar)
@@ -354,7 +492,7 @@
%ret :: return
?: =(%none buy.u.q.q.yar) beep
=+ jab=(rap 3 (tufa but.u.q.q.yar))
- %= +.$
+ %= +>.$
q.q.yar ~
r.yar
?: |(=(%$ jab) =(%pass buy.u.q.q.yar))
@@ -364,9 +502,9 @@
[p.hyt.u.q.q.yar [jab ?~(q.hyt.u.q.q.yar ~ +.q.hyt.u.q.q.yar)]]
::
mos
- :* [hen %toss %b ~ [%hail ~]]
+ :* [hen %pass ~ %b [%hail ~]]
[hen %give [%bbye ~]]
- [hen %toss %b ~ [%line jab]]
+ [hen %pass ~ %b [%line jab]]
[hen %give [%blit [[%mor ~] ~]]]
mos
==
@@ -374,7 +512,7 @@
::
%txt :: text keys
?: =(%none buy.u.q.q.yar) beep
- =+ let=(lent p.p.q.hin)
+ =+ let=(lent p.p.kyz)
%- edit
%= u.q.q.yar
bus (add let bus.u.q.q.yar)
@@ -382,77 +520,75 @@
but
;: weld
(scag bus.u.q.q.yar but.u.q.q.yar)
- p.p.q.hin
+ p.p.kyz
(slag bus.u.q.q.yar but.u.q.q.yar)
==
==
==
::
- %blew +.$(p.q.yar p.p.q.hin) :: window size
+ %blew +>.$(p.q.yar p.p.kyz) :: window size
%boot
- %= +.$
+ %= +>.$
mos
- :_(mos [hen %toss %b tea p.q.hin])
+ :_(mos [hen %pass ~ (note %b p.kyz)])
==
::
%crud :: error trace
- =. q.q.hin [[%leaf (trip p.q.hin)] q.q.hin]
- |- ^+ +.^$
- ?~ q.q.hin +.^$
- (fume:$(q.q.hin t.q.q.hin) '!' i.q.q.hin)
+ =. q.kyz [[%leaf (trip p.kyz)] q.kyz]
+ |- ^+ +>.^$
+ ?~ q.kyz +>.^$
+ (fume:$(q.kyz t.q.kyz) '!' `tank`i.q.kyz)
::
- %helo :: trigger prompt
- %- edit
- =| bed=bein
- =+ ^= hyt ^- hist
- =+ hyt=(~(get by r.yar) p.q.hin)
- ?~(hyt *hist u.hyt)
- ?: &(?=(^ q.q.yar) =(p.q.hin hux.u.q.q.yar))
- %= u.q.q.yar
- hyt [+(p.hyt) [%$ q.hyt]]
- pot q.q.q.hin
- pol (lent q.q.q.hin)
- buy p.q.q.hin
- ==
- =+ zon=(tuba r.q.q.hin)
- =+ zow=(lent zon)
- %= bed
- bul zow
- bus zow
- but zon
- buy p.q.q.hin
- hux p.q.hin
- hiz 0
- hyt [+(p.hyt) [%$ q.hyt]]
- pot q.q.q.hin
- pol (lent q.q.q.hin)
+ %hail :: refresh
+ +>.$(mos :_(mos [hen %pass ~ %b kyz]))
+ ::
+ %harm :: all terms hung up
+ =+ nug=((map duct yard) [[hen (~(get by dug) hen)] ~ ~])
+ ^+ +>.$
+ %= +>.$
+ dug nug
+ mos :_(mos [hen %pass ~ %b kyz])
==
::
- ?(%hail %make %loin %sith)
- +.$(mos :_(mos [hen %toss %b ~ q.hin]))
+ %hook :: this term hung up
+ +>.$(dug (~(del by dug) hen), mos :_(mos [hen %pass ~ %b kyz]))
::
- %note ?.(p.yar +.$ (fume p.q.hin q.q.hin)) :: debug message
- %save :: write a file
- %= +.$
- mos :_(mos [hen [%give %blit [%sav p.q.hin q.q.hin] ~]])
- ==
- ::
- %tell (furl (turn p.q.hin |=(a=@t (trip a)))) :: wall of text
- %text $(q.hin [%talk %leaf p.q.hin]) :: simple message
- %talk (furl (~(win re p.q.hin) 0 p.q.yar)) :: program output
- %warn (fume '~' [%leaf p.q.hin]) :: system message
- %wipe +.$(wip &) :: delete old
+ %talk (furl (~(win re p.kyz) 0 p.q.yar)) :: program output
+ %text $(kyz [%talk %leaf p.kyz]) :: simple message
==
::
++ yerk :: complete core
- ^- [p=(list move) q=_..^$]
+ ^- [p=(list move) q=(map duct yard)]
:- (flop mos)
- ..^$(dug ?.(wip (~(put by dug) hen yar) (~(del by dug) hen)))
+ (~(put by dug) hen yar)
--
-::
-++ call :: process move
- |= [hen=duct hic=(hypo kiss)]
- (take ~ hen hic)
+--
+=| $: %0 ::
+ dug=(map duct yard) ::
+ == ::
+|= [now=@da eny=@ ski=sled] :: current invocation
+|% :: poke/peek pattern
+++ call :: handle request
+ |= $: hen=duct
+ hic=(hypo (hobo kiss))
+ ==
+ ^- [p=(list move) q=_..^$]
+ => %= . :: XX temporary
+ q.hic
+ ^- kiss
+ ?: ?=(%soft -.q.hic)
+ :: ~& [%dill-call-soft (,@tas `*`-.p.q.hic)]
+ ((hard kiss) p.q.hic)
+ ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
+ ~& [%dill-call-flub (,@tas `*`-.q.hic)]
+ ((hard kiss) q.hic)
+ ==
+ ?: ?=(%flog -.q.hic)
+ :_ ..^$
+ %+ turn (~(tap by dug) *(list ,[p=duct q=yard]))
+ |=([a=duct b=yard] [a %slip %d p.q.hic])
+ =^ moz dug yerk:(lear:(dy hen dug) q.hic)
+ [moz ..^$]
::
++ doze
|= [now=@da hen=duct]
@@ -466,8 +602,13 @@
::
++ scry
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
- ^- (unit (unit (pair lode ,*)))
- ~
+ ^- (unit (unit (pair logo ,*)))
+ [~ ~ [%tank >dug<]]
::
++ stay [%0 dug]
+++ take :: process move
+ |= [tea=wire hen=duct hin=(hypo sign)]
+ ^- [p=(list move) q=_..^$]
+ =^ moz dug yerk:(leap:(dy hen dug) tea q.hin)
+ [moz ..^$]
--
diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon
index a657f4737..730e730b4 100644
--- a/arvo/eyre.hoon
+++ b/arvo/eyre.hoon
@@ -1,46 +1,94 @@
-!: :: %eyre, http servant
+:: :: %eyre, http servant
!? 164
::::
|= pit=vase
=> =~
-|% :: metastructures
+|% :: interfaces
+++ bead ,[p=(set beam) q=cage] :: computed result
+++ chop ,[p=@ud q=@da] :: see
++ gift :: out result <-$
- card
-::
+ $% [%thou p=httr] :: raw http response
+ [%thus p=@ud q=(unit hiss)] :: http request/cancel
+ == ::
+++ hasp ,[p=ship q=term] :: see %gall
++ kiss :: in request ->$
- card
-::
+ $% [%born ~] :: new unix process
+ [%crud p=@tas q=(list tank)] :: XX rethink
+ [%init p=@p] :: report install
+ [%them p=(unit hiss)] :: outbound request
+ [%they p=@ud q=httr] :: inbound response
+ [%this p=? q=clip r=httq] :: inbound request
+ [%thud ~] :: inbound cancel
+ [%wart p=sock q=@tas r=path s=*] :: urbit message
+ == ::
++ move ,[p=duct q=(mold note gift)] :: local move
-::
++ note :: out request $->
- card
-::
-++ sign :: in result $-<
- card
---
-|% :: structures
-++ ju :: jug engine
- |/ a=(jug)
- +- get
- |* b=*
- =+ c=(~(get by a) b)
- ?~(c ~ u.c)
- ::
- +- has
- |* [b=* c=*]
- ^- ?
- (~(has in (get(+< a) b)) c)
- ::
- +- put
- |* [b=* c=*]
- ^+ a
- =+ d=(get(+< a) b)
- (~(put by a) b (~(put in d) c))
- --
+ $% $: %a :: to %ames
+ $% [%want p=sock q=path r=*] ::
+ == == ::
+ $: %b :: to %batz
+ $% [%hail ~] ::
+ [%line p=@t] ::
+ [%ling ~] ::
+ == == ::
+ $: %c :: to %clay
+ $% [%warp p=sock q=riff] ::
+ == == ::
+ $: %d :: to %dill
+ $% [%flog p=[%crud p=@tas q=(list tank)]] ::
+ == == ::
+ $: %e :: to %eyre
+ $% [%this p=? q=clip r=httq] ::
+ [%thud ~] ::
+ == == ::
+ $: %f :: to %ford
+ $% [%exec p=@p q=(unit silk)] ::
+ == == ::
+ $: %g :: to %gall
+ $% [%mess p=hasp q=ship r=cage] ::
+ [%nuke p=hasp] ::
+ [%show p=hasp q=ship r=path] ::
+ == == == ::
+++ rave :: see %clay
+ $% [| p=moat] ::
+ == ::
+++ riff ,[p=desk q=(unit rave)] :: see %clay
+++ sign :: in result $<-
+ $? $: %a :: by %ames
+ $% [%waft p=sock q=*] ::
+ [%went p=ship q=cape] ::
+ == == ::
+ $: %b :: by %batz
+ $% [%helo p=path q=prod] ::
+ [%talk p=tank] ::
+ [%tell p=(list ,@t)] ::
+ [%text p=tape] ::
+ [%warn p=tape] ::
+ == == ::
+ $: %c :: by %clay
+ $% [%writ p=riot] ::
+ == == ::
+ $: %e :: by %eyre
+ $% [%thou p=httr] ::
+ == == ::
+ $: %f :: by %ford
+ $% [%made p=(each bead (list tank))] ::
+ == == ::
+ $: %g :: by %gall
+ $% [%dumb ~] ::
+ [%rasp p=(unit (pair logo noun))] ::
+ [%rush p=logo q=*] ::
+ [%rust p=logo q=*] ::
+ == == ::
+ $: @tas :: by any
+ $% [%crud p=@tas q=(list tank)] ::
+ == == == ::
+-- ::
+|% :: models
++ bolo :: eyre state
$: %0 :: version
gub=@t :: random identity
- hov=(unit ,@p) :: master for remote
+ hov=(unit ship) :: master for remote
ged=duct :: client interface
ney=@uvI :: rolling entropy
dop=(map host ship) :: host aliasing
@@ -61,6 +109,7 @@
cow=(map ,@ud clue) :: consoles
cug=(list ,@t) :: unacked cookies
lax=@da :: last used
+ sok=(map ,@ud (trel term ship sink)) :: live apps by reqno
rey=[p=@ud q=(map ,@ud pimp)] :: live requests
== ::
++ dual ,[p=@ud q=(each ,[p=ship q=hole] ship)] :: request handle
@@ -72,34 +121,57 @@
== ::
$% [%err p=@ud q=(list tank)] :: error report
[%fin p=love] :: ready to send
- [%fud p=(each beet (list tank))] :: function finished
+ [%fud p=(each bead (list tank))] :: function finished
[%haz p=riot] :: clay responded
[%raw p=hiss] :: wild url
[%who p=@tas q=@ta] :: awaiting auth
== ::
++ pimp :: traced request
$: ful=? :: | === HEAD
+ fur=(unit logo) :: type goal
hen=duct :: event trace
som=seam :: logical request
pez=pest :: request state
+ vaz=(list ,[p=cord q=tape]) :: variables
+ sip=(list manx) :: scripts in result
== ::
++ rote :: remote server
$: cnt=@ud :: number served
sor=@p :: home sponsor
rem=[p=@ud q=(map ,@ud duct)] :: active requests
== ::
+++ seam :: logical request
+ $% [%ape p=term q=ship r=@ud s=@ud t=@ud] :: subscribe pull
+ [%apg p=term q=ship r=logo s=path] :: app get/start
+ [%apm p=term q=ship r=@ud s=@ud t=json] :: message send
+ [%aps p=term q=ship r=@ud s=@ud t=path] :: subscribe
+ [%apu p=term q=ship r=@ud s=@ud] :: unsubscribe
+ [%cog p=@ud q=@ud] :: console get
+ [%con p=@ud] :: console face
+ [%cop p=@ud q=@ud r=json] :: console put
+ [%det p=desk q=moat] :: load changes
+ [%fun p=term q=tube r=(list manx)] :: functional
+ [%lon p=seal] :: authentication flow
+ [%red p=purl] :: redirect
+ [%sil p=@ud q=silk] :: status and silk
+ == ::
++ serf :: local server
$: pef=@t :: server prefix
wup=(map hole cyst) :: secure sessions
cah=(map cash vase) :: compilation cache
- :: wez=(map duct root) :: all routes
+ == ::
+++ sink :: page push system
+ $: meg=@ud :: message counter
+ haw=(map ,@ud swig) :: subscriptions
+ == ::
+++ swig :: update channel
+ $: cnt=@ud :: updates produced
+ toy=@ud :: updates sent
+ wan=(map ,@ud ,@ud) :: upno to reqno
+ red=(map ,@ud (unit (each cage cage))) :: ready for pickup
== ::
-- ::
|%
-++ colt :: prune to save
- |= bol=bolo
- %_(bol own (~(run by own.bol) |=(a=serf a(cah ~))))
-::
++ coss :: cookie search
|= [nam=@t mah=math]
^- (unit hole)
@@ -114,6 +186,25 @@
?~ u.mar ^$(cok t.cok)
?:(=(nam p.i.u.mar) [~ q.i.u.mar] $(u.mar t.u.mar))
::
+++ ecce :: JS from moth
+ |= moh=moth
+ ^- (unit json)
+ ?. =([~ 'text/json' ~] (~(get by q.moh) 'content-type')) ~
+ ?~ r.moh ~
+ `(unit json)`(rush q.u.r.moh apex:poja)
+::
+++ ecci :: ecce w/oryx
+ |= [orx=oryx moh=moth]
+ ^- (unit json)
+ =+ jun=(ecce moh)
+ ?~ jun ~
+ ?. ?=(%o -.u.jun) ~
+ ?. =([~ %s orx] (~(get by p.u.jun) %oryx))
+ ~& [%ecci-oryx u.jun]
+ ~
+ =+ nuj=(~(get by p.u.jun) %xyro)
+ ?~(nuj [~ ~] [~ u.nuj])
+::
++ ecco :: eat headers
|= hed=(list ,[p=@t q=@t])
=+ mah=*math
@@ -150,7 +241,27 @@
==
==
::
-++ lofi :: insert scripts
+++ lofa :: scripts in head
+ |= [mog=(list manx) luv=love]
+ ^- love
+ ?: =(~ mog) luv
+ ?+ -.luv luv
+ %mid
+ =+ str=(trip q.q.luv)
+ =+ scr=|-(^-(tape ?~(mog ~ (xmlt & i.mog $(mog t.mog)))))
+ =+ rep=(need (repg "
" str (weld "" scr)))
+ [%mid p.luv (tact rep)]
+ ==
+++ lofe :: variables in head
+ |= [vaz=(list ,[p=cord q=tape]) luv=love]
+ %- lofa
+ :_ luv
+ :_ ~
+ ^- manx
+ :- %script
+ (turn vaz |=([a=cord b=tape] :/("var {(trip a)}={b};")))
+::
+++ lofi :: insert in body
|= [mog=(list manx) luv=love]
^- love
?: =(~ mog) luv
@@ -183,10 +294,7 @@
--
|% :: functions
++ ye :: per event
- =| $: $: $: tea=wire :: event place
- hen=duct :: event floor
- fav=card :: event data
- == ::
+ =| $: $: hen=duct :: event floor
$: now=@da :: event date
eny=@ :: unique entropy
sky=$+(* (unit)) :: system namespace
@@ -204,56 +312,125 @@
++ adit
.(ney (mix eny ney))
::
- ++ apex
- |- ^+ +
- ?+ -.fav
- +.$(mow [[hen %give fav] mow])
+ ++ axon
+ |= [tea=wire typ=type sih=sign]
+ ^+ +>
+ ?- -.+.sih
+ %crud
+ +>.$(mow [[hen %slip %d %flog +.sih] mow])
::
- %born +(ged hen) :: register external
+ %dumb
+ ?> ?=([%hoop @ @ @ @ ~] tea)
+ =+ ^= ouy
+ %- yolk:(gale (slav %p i.t.tea) i.t.t.tea)
+ (slav %ud i.t.t.t.tea)
+ ?~ ouy
+ +>.$
+ abet:work:abet:dumb:(yule:u.ouy (slav %ud i.t.t.t.t.tea))
+ ::
+ %made
+ ?. ?=([%honk @ @ @ ~] tea)
+ +>.$
+ %- galt
+ [(slav %p i.t.tea) i.t.t.tea (slav %ud i.t.t.t.tea) p.+.sih]
+ ::
+ %rasp
+ =+ ^= cuy ^- (unit cage)
+ ?~ p.+.sih ~
+ `[p.u.p.+.sih (slot 15 [typ +.sih])]
+ ?> ?=([%hoop @ @ @ @ ~] tea)
+ =+ ^= ouy
+ %- yolk:(gale (slav %p i.t.tea) i.t.t.tea)
+ (slav %ud i.t.t.t.tea)
+ ?~ ouy
+ +>.$
+ =+ woy=(yule:u.ouy (slav %ud i.t.t.t.t.tea))
+ =< abet =< work =< abet
+ ?~ cuy
+ dumb:woy
+ (hear:woy `[%& u.cuy])
+ ::
+ ?(%rush %rust)
+ =+ cay=`cage`[p.+.sih (slot 3 (spec (slot 3 [typ +.sih])))]
+ =+ heq=?:(?=(%rust -.+.sih) [%& cay] [%| cay])
+ ?> ?=([%hoop @ @ @ @ ~] tea)
+ =+ ^= ouy
+ %- yolk:(gale (slav %p i.t.tea) i.t.t.tea)
+ (slav %ud i.t.t.t.tea)
+ ?~ ouy
+ +>.$
+ abet:work:abet:(hear:(yule:u.ouy (slav %ud i.t.t.t.t.tea)) `heq)
+ ::
+ %thou :: remote return
+ ?> ?=([@ @ *] tea)
+ (hajj (slav %p i.tea) (slav %p i.t.tea) t.t.tea p.+.sih)
+ ::
+ %waft
+ ?. ?=([%hork @ ~] tea)
+ +>.$
+ (gosh q.p.+.sih (slav %ud i.t.tea) ((hard httr) q.+.sih))
+ ::
+ %went
+ +>.$
+ ::
+ %writ
+ ?. ?=([%hoot @ @ @ ~] tea)
+ +>.$
+ %- gout
+ [(slav %p i.t.tea) i.t.t.tea (slav %ud i.t.t.t.tea) p.+.sih]
+ ::
+ ?(%helo %tell %text %talk %warn)
+ ?. ?=([%cons @ @ @ ~] tea)
+ +>.$
+ %- goat
+ [(slav %p i.t.tea) i.t.t.tea (slav %ud i.t.t.t.tea) sih]
+ ==
+ ::
+ ++ apex
+ |= kyz=kiss
+ ^+ +>
+ ?- -.kyz
+ %born +>.$(ged hen) :: register external
+ %crud
+ +>.$(mow [[hen %slip %d %flog kyz] mow])
%init :: register ownership
- %_ +.$
- hov ?~(hov [~ p.fav] [~ (min u.hov p.fav)])
+ %_ +>.$
+ hov ?~(hov [~ p.kyz] [~ (min u.hov p.kyz)])
own
%+ ~(put by own)
- p.fav
+ p.kyz
^- serf
- :* (cat 3 gub (rsh 3 1 (scot %p p.fav)))
+ :* (cat 3 gub (rsh 3 1 (scot %p p.kyz)))
~
~
==
==
- ::
- %made
- ?. ?=([%honk @ @ @ ~] tea)
- +.$
- %- galt
- [(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) p.fav]
::
%them :: outbound request
- ?~ p.fav
+ ?~ p.kyz
=+ sud=(need (~(get by kes) hen))
- %= +.$
+ %= +>.$
mow :_(mow [ged [%give %thus sud ~]])
q.ask (~(del by q.ask) sud)
kes (~(del by kes) hen)
==
- %= +.$
- mow :_(mow [ged [%give %thus p.ask p.fav]])
+ %= +>.$
+ mow :_(mow [ged [%give %thus p.ask p.kyz]])
p.ask +(p.ask)
- q.ask (~(put by q.ask) p.ask hen u.p.fav)
+ q.ask (~(put by q.ask) p.ask hen u.p.kyz)
kes (~(put by kes) hen p.ask)
==
::
%they :: inbound response
- =+ kas=(need (~(get by q.ask) p.fav))
- %= +.$
- mow :_(mow [p.kas [%give %thou q.fav]])
+ =+ kas=(need (~(get by q.ask) p.kyz))
+ %= +>.$
+ mow :_(mow [p.kas [%give %thou q.kyz]])
q.ask (~(del by q.ask) p.kas)
==
::
%this :: inbound request
- =* sec p.fav :: ? :: https bit
- =* heq r.fav :: httq :: request content
+ =* sec p.kyz :: ? :: https bit
+ =* heq r.kyz :: httq :: request content
=+ ryp=`quri`(rash q.heq zest:epur)
=+ mah=(ecco r.heq)
=+ ^= pul ^- purl
@@ -264,50 +441,26 @@
[[sec (rash i.u.hot thor:epur)] p.ryp q.ryp]
==
=. p.p.pul |(p.p.pul =([& /localhost] r.p.pul))
- (hell pul +.fav [p.heq mah s.heq])
+ (hell pul +.kyz [p.heq mah s.heq])
::
%thud :: cancel request
=+ dul=(~(get by lor) hen)
- ?~ dul +.$
+ ?~ dul +>.$
=. lor (~(del by lor) hen)
?- -.q.u.dul
& =+ boy=(myth p.p.q.u.dul q.p.q.u.dul)
- ?~(boy +.$ abet:(idle:u.boy p.u.dul))
+ ?~(boy +>.$ abet:(idle:u.boy p.u.dul))
| (hops p.q.u.dul p.u.dul)
==
- ::
- %thou :: remote return
- ?> ?=([@ @ *] tea)
- (hajj (need (slaw %p i.tea)) (need (slaw %p i.t.tea)) t.t.tea p.fav)
::
%wart :: remote request
- ?+ q.fav
- ~& [%strange-wart p.fav q.fav]
- +.$
+ ?+ q.kyz
+ ~& [%strange-wart p.kyz q.kyz]
+ +>.$
::
- %pr (hare p.p.fav r.fav q.p.fav s.fav)
- %pc (here p.p.fav q.p.fav s.fav)
+ %pr (hare p.p.kyz r.kyz q.p.kyz s.kyz)
+ %pc (here p.p.kyz q.p.kyz s.kyz)
==
- ::
- %waft
- ?. ?=([%hork @ ~] tea)
- +.$
- (gosh q.p.fav (need (slaw %ud i.t.tea)) ((hard httr) q.fav))
- ::
- %went
- +.$
- ::
- %writ
- ?. ?=([%hoot @ @ @ ~] tea)
- +.$
- %- gout
- [(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) p.fav]
- ::
- ?(%helo %tell %text %talk %warn)
- ?. ?=([%cons @ @ @ ~] tea)
- +.$
- %- goat
- [(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) fav]
==
::
++ doss :: host to ship
@@ -326,8 +479,14 @@
^- httr
[sas ~[content-type/'text/plain'] [~ (tact str)]]
::
+ ++ gale :: ya from response
+ |= [our=ship ses=hole]
+ =+ sef=(need (~(get by own) our))
+ =+ cyz=(need (~(get by wup.sef) ses))
+ ~(. ya [our ses] sef cyz)
+ ::
++ galt
- |= [our=ship ses=hole num=@ud mez=(each beet (list tank))]
+ |= [our=ship ses=hole num=@ud mez=(each bead (list tank))]
^+ +>
=+ suf=(~(get by own) our)
?~ suf +>.$
@@ -335,13 +494,13 @@
?~ cuz +>.$
abet:work:(~(inch ya [our ses] u.suf u.cuz) num mez)
::
- ++ goat
- |= [our=ship ses=hole num=@ud fav=card]
+ ++ goat :: console response
+ |= [our=ship ses=hole num=@ud sih=sign]
=+ suf=(~(get by own) our)
?~ suf +>.$
=+ cuz=(~(get by wup.u.suf) ses)
?~ cuz +>.$
- abet:work:(~(dodo ya [our ses] u.suf u.cuz) num fav)
+ abet:work:(~(dodo ya [our ses] u.suf u.cuz) num sih)
::
++ gosh :: receive %pr response
|= [him=ship num=@ud har=httr]
@@ -367,12 +526,12 @@
++ haji :: send %pc login
|= [our=ship him=ship ses=hole]
^+ +>
- +>.$(mow :_(mow [hen %toss %a ~ [%want [our him] [%r %pc ~] ses]]))
+ +>.$(mow :_(mow [hen %pass ~ %a [%want [our him] [%r %pc ~] ses]]))
::
++ hajj :: send %pr response
|= [our=ship him=ship tus=path har=httr]
^+ +>
- +>.$(mow :_(mow [hen %toss %a ~ [%want [our him] [%r %pr tus] har]]))
+ +>.$(mow :_(mow [hen %pass ~ %a [%want [our him] [%r %pr tus] har]]))
::
++ hare :: receive request
|= [our=ship tus=path him=ship hor=*]
@@ -382,8 +541,8 @@
mow
:_ mow
:- hen
- :^ %toss %e
- [(scot %p our) (scot %p him) tus]
+ :^ %pass [(scot %p our) (scot %p him) tus]
+ %e
?~(hux [%thud ~] [%this u.hux])
==
::
@@ -396,18 +555,19 @@
++ hell :: request, no ship
|= [pul=purl hyx=httx moh=moth]
^+ +>
- =^ wiq q.q.pul
- ?~ q.q.pul [~ ~]
- =+ nam=(cat 3 '~' i.q.q.pul)
- =+ gow=(rush i.q.q.pul fed:ag)
- ^- [(unit ship) (list ,@t)]
- ?~(gow [~ q.q.pul] [gow t.q.q.pul])
- =+ oar=`(unit ship)`?^(wiq wiq (doss r.p.pul))
- ?~ oar
- (horn pul q.hyx moh)
- ?. (home u.oar)
- (hork u.oar hyx)
- (huff u.oar ?=(@ wiq) q.hyx pul moh)
+ =+ hon=(horn pul q.hyx moh)
+ ?^ hon (muff u.hon)
+ :: =^ wiq q.q.pul
+ :: ?~ q.q.pul [~ ~]
+ :: =+ nam=(cat 3 '~' i.q.q.pul)
+ :: =+ gow=(rush i.q.q.pul fed:ag)
+ :: ^- [(unit ship) (list ,@t)]
+ :: ?~(gow [~ q.q.pul] [gow t.q.q.pul])
+ :: =+ oar=`(unit ship)`?^(wiq wiq (doss r.p.pul))
+ =+ oar=(fall (doss r.p.pul) (need hov))
+ ?. (home oar)
+ (hork oar hyx)
+ (huff oar q.hyx pul moh)
::
++ home :: do we own?
|= who=ship
@@ -421,8 +581,8 @@
%_ +>
mow
:_ mow
- :^ hen %toss %c
- [[%hoot (scot %p our) ses (scot %ud num) ~] [%warp [our our] rif]]
+ :+ hen %pass
+ [[%hoot (scot %p our) ses (scot %ud num) ~] %c [%warp [our our] rif]]
==
::
++ hone :: kill ford
@@ -430,7 +590,7 @@
%_ +>
mow
:_ mow
- [hen %toss %f [%honk (scot %p our) ses (scot %ud num) ~] [%exec our ~]]
+ [hen %pass [%honk (scot %p our) ses (scot %ud num) ~] %f [%exec our ~]]
==
::
++ honk :: ford request
@@ -439,7 +599,7 @@
%_ +>
mow
:_ mow
- [hen %toss %f [%honk (scot %p our) ses (scot %ud num) ~] [%exec our `kas]]
+ [hen %pass [%honk (scot %p our) ses (scot %ud num) ~] %f [%exec our `kas]]
==
::
++ hops :: cancel remote
@@ -451,21 +611,11 @@
mow
:_ mow
:- hen
- :^ %toss %a
- [%hork (scot %p sor.rot) mun ~]
+ :^ %pass [%hork (scot %p sor.rot) mun ~]
+ %a
[%want [sor.rot him] [%q %pr %e %hork mun ~] ~]
==
::
- ++ hoth :: simple app request
- |= [our=ship num=@ud ses=hole app=term hop=hope]
- %_ +>
- mow
- :_ mow
- :^ hen %toss %g
- :- [%hoth (scot %p our) ses (scot %ud num) ~]
- [%show [our app] ~ hop]
- ==
- ::
++ hork :: remote request
|= [him=ship hyx=httx]
^+ +>
@@ -487,8 +637,8 @@
mow
:_ mow
:- hen
- :^ %toss %a
- [%hork (scot %p sor.rot) mun ~]
+ :^ %pass [%hork (scot %p sor.rot) mun ~]
+ %a
[%want [sor.rot him] [%q %pr %e %hork mun ~] [~ hyx]]
::
fon
@@ -502,21 +652,21 @@
::
++ horn :: irregular request
|= [pul=purl cip=clip moh=moth]
- ^+ +>
+ ^- (unit gift)
=- ?: &(=(/favicon q.q.pul) ?=([~ ?(%ico %png)] p.q.pul))
- %- muff
+ :- ~
:- %thou
^- httr
[200 ~[content-type/'image/png'] [~ (taco fac)]]
?: &(=(/robots q.q.pul) ?=([~ %txt] p.q.pul))
- %- muff
+ :- ~
:- %thou
^- httr
[200 ~[content-type/'text/plain'] [~ (taco rob)]]
- (fail 400 "urbit: url {} does not match a vessel")
+ ~
:*
^= rob
- %- role
+ %- roly
:~ 'User-agent: *'
'Disallow: /'
==
@@ -588,7 +738,7 @@
==
::
++ huff :: request by ship
- |= [our=ship hey=? cip=clip pul=purl moh=moth]
+ |= [our=ship cip=clip pul=purl moh=moth]
=* sec p.p.pul
=+ ^= sef ^- serf
=+ suf=(~(get by own) our)
@@ -604,7 +754,7 @@
:- ses
^- cyst
:* ^- cred
- :* [sec hey q.p.pul r.p.pul]
+ :* [sec q.p.pul r.p.pul]
~
(rsh 3 1 (scot %p (end 6 1 (shaf %oryx ses))))
::
@@ -624,13 +774,14 @@
'; Path=/; HttpOnly'
::
now
+ ~
[1 ~]
==
abet:work:(~(into ya [our p.saw] sef q.saw) pul moh)
::
++ muff :: return card
- |= fav=card
- +>(mow :_(mow [hen %give fav]))
+ |= gef=gift
+ +>(mow :_(mow [hen %give gef]))
::
++ myth :: load session
|= [our=ship ses=hole]
@@ -796,10 +947,10 @@
==
=+ ^= bod ^- manx
;body
- ;div@output;
- ;div@input
- ;div/prompt;
- ;input/line(type "text");
+ ;div#output;
+ ;div#input
+ ;div.prompt;
+ ;input.line(type "text");
==
==
=. +.bod (weld `marl`+.bod `marl`~[sic])
@@ -825,23 +976,23 @@
%_(+> aut.ced (~(put ju aut.ced) %$ (scot %p him)))
::
++ dodo :: console s->c
- |= [con=@ud fav=card]
+ |= [con=@ud sih=sign]
^+ +>
=+ cal=(need (~(get by cow) con))
=+ ^= jon ^- json
- ?: ?=(%helo -.fav)
+ ?: ?=(%helo -.+.sih)
%+ joba %helo
%- jobe
- :~ [%path [%a `(list jval)`(turn p.fav |=(a=@ta [%s a]))]]
- [%prod ~[%a [%s p.q.fav] (jape q.q.fav) (jape r.q.fav)]]
+ :~ [%path [%a `(list jval)`(turn p.+.sih |=(a=@ta [%s a]))]]
+ [%prod ~[%a [%s p.q.+.sih] (jape q.q.+.sih) (jape r.q.+.sih)]]
==
%+ joba %text
:- %a ^- (list jval)
- ?+ -.fav ~|(-.fav !!)
- %tell (turn p.fav |=(a=@t [%s a]))
- %text [%s (crip p.fav)]~
- %talk (turn (~(win re p.fav) [0 80]) |=(a=tape [%s (crip a)]))
- %warn [%s (crip '!' p.fav)]~
+ ?+ -.+.sih ~|(-.+.sih !!)
+ %tell (turn p.+.sih |=(a=@t [%s a]))
+ %text [%s (crip p.+.sih)]~
+ %talk (turn (~(win re p.+.sih) [0 80]) |=(a=tape [%s (crip a)]))
+ %warn [%s (crip '!' p.+.sih)]~
==
=+ ^= yov ^- (list ,@ud)
=+ yov=(~(get by voy.cal) ono.cal)
@@ -853,6 +1004,16 @@
=. cow (~(put by cow) con cal)
?~(yov +>.$ (dove ~[%a (jone ono.cal) (jone ino.cal) jon] yov))
::
+ ++ iota :: fun change response
+ |= [num=@ud rot=riot]
+ ^+ +>
+ =+ pup=(~(get by q.rey) num)
+ ?~ pup
+ ~& [%iota-lost ses num rot]
+ +>.$
+ ?> ?=(%way pez.u.pup)
+ +>.$(q.rey (~(put by q.rey) num u.pup(pez [%haz rot])))
+ ::
++ dove :: console waiting
|= [jon=json yov=(list ,@ud)]
^+ +>
@@ -864,12 +1025,103 @@
?> ?=(%way pez.u.pup)
$(yov t.yov, q.rey (~(put by q.rey) i.yov u.pup(pez noz)))
::
- ++ fapp :: dispatch app
- |= [fur=(unit term) paw=path]
+ ++ duty :: reload script
+ ;script
+ ; var tries = 0;
+ ; var cnt = 0;
+ ; var next = "/gie/"+user+"/"+appl+"/"+port+"/0/"+(cnt + 1);
+ ; call = function() {
+ ; xhr = new XMLHttpRequest();
+ ; xhr.open('GET', next, true);
+ ; xhr.addEventListener('load', function() {
+ ; if ( this.status >= 500 ) {
+ ; return delay();
+ ; }
+ ; cnt++;
+ ; if ( this.status >= 400 ) {
+ ; document.alert("neighbor, please.");
+ ; }
+ ; document.location.reload();
+ ; });
+ ; xhr.addEventListener('error', delay);
+ ; xhr.addEventListener('abort', delay);
+ ; xhr.send();
+ ; }
+ ; delay = function() {
+ ; setTimeout(call,1000*tries);
+ ; tries++;
+ ; }
+ ; call();
+ ==
+ ::
+ ++ fape :: dispatch %ape
+ |= [fur=(unit term) you=@p paw=path]
^- (unit seam)
- ?> ?=(^ fur)
+ ?> ?=(~ fur)
+ ?> ?=([@ @ @ @ ~] paw)
+ :- ~
+ :* %ape
+ (need ((sand %tas) i.paw))
+ you
+ (slav %ui (cat 3 '0i' i.t.paw))
+ (slav %ui (cat 3 '0i' i.t.t.paw))
+ (slav %ui (cat 3 '0i' i.t.t.t.paw))
+ ==
+ ::
+ ++ fapg :: dispatch %apg
+ |= [fur=(unit term) you=@p paw=path]
+ ^- (unit seam)
+ =+ for=?^(fur u.fur %html)
?> ?=(^ paw)
- `[%apg u.fur i.paw t.paw]
+ :- ~
+ :* %apg
+ (need ((sand %tas) i.paw))
+ you
+ for
+ (turn t.paw |=(a=@ `@ta`(need ((sand %ta) a))))
+ ==
+ ::
+ ++ fapm :: dispatch %apm
+ |= [fur=(unit term) you=@p paw=path moh=moth]
+ ^- (unit seam)
+ ?> ?=(~ fur)
+ ?> ?=([@ @ @ ~] paw)
+ :- ~
+ :* %apm
+ (need ((sand %tas) i.paw))
+ you
+ (slav %ui (cat 3 '0i' i.t.paw))
+ (slav %ui (cat 3 '0i' i.t.t.paw))
+ (need (ecci orx.ced moh))
+ ==
+ ::
+ ++ faps :: dispatch %aps
+ |= [fur=(unit term) you=@p paw=path moh=moth]
+ ^- (unit seam)
+ ?> ?=(~ fur)
+ ?> ?=([@ @ @ *] paw)
+ ?> !=(~ (ecci orx.ced moh))
+ :- ~
+ :* %aps
+ (need ((sand %tas) i.paw))
+ you
+ (slav %ui (cat 3 '0i' i.t.paw))
+ (slav %ui (cat 3 '0i' i.t.t.paw))
+ (turn t.t.t.paw |=(a=@ `@ta`(need ((sand %ta) a))))
+ ==
+ ::
+ ++ fapu :: dispatch %apu
+ |= [fur=(unit term) you=@p paw=path]
+ ^- (unit seam)
+ ?> ?=(~ fur)
+ ?> ?=([@ @ @ ~] paw)
+ :- ~
+ :* %apu
+ (need ((sand %tas) i.paw))
+ you
+ (slav %ui (cat 3 '0i' i.t.paw))
+ (slav %ui (cat 3 '0i' i.t.t.paw))
+ ==
::
++ flea :: permissive decimal
|= txt=@t
@@ -1054,9 +1306,12 @@
++ holy :: structured request
|= [pul=purl moh=moth]
^- (unit seam)
+ ?: &(=(%get p.moh) ?=([~ [@ ~]] q.pul)) :: app shortcut
+ :: XX use credential to figure out gog/gig
+ $(q.pul [`%html [%gog i.q.q.pul ~]])
?~ q.q.pul ~
=* nep i.q.q.pul
- =* paw t.q.q.pul
+ =+ paw=t.q.q.pul
=+ [one=(end 3 1 nep) two=(cut 3 [1 1] nep) tri=(cut 3 [2 1] nep)]
?. ?& ?- p.moh
%conn | :: connect
@@ -1076,13 +1331,18 @@
%o p.p.pul :: identified
==
::
- ?= $? %p :: application
+ ?= $? %g :: app get
%c :: console
+ %e :: app update
%f :: functional
- %v :: version
+ %v :: functional version
%l :: local login
- %m :: remote login
+ %m :: app message
+ %r :: app response
+ %s :: app subscribe
%n :: now
+ %u :: app unsubscribe
+ %z :: app version
==
tri
::
@@ -1090,10 +1350,17 @@
=(3 (met 3 nep))
==
~
- ?: &(=(%i two) =(~ aut.ced))
- (holt ~ pul)
- ?: &(=(%o two) !(~(has ju aut.ced) %$ (scot %p our)))
- (holt [~ our] pul)
+ =^ yun paw
+ ?+ two ~
+ ?(%e %u) [`@`(shaf %fake ses) paw]
+ %i ?~ paw ~
+ [(slav %p (cat 3 '~' i.paw)) t.paw]
+ %o [our paw]
+ ==
+ :: ?: &(=(%i two) =(~ aut.ced))
+ :: (holt ~ pul)
+ :: ?: &(=(%o two) !(~(has ju aut.ced) %$ (scot %p our)))
+ :: (holt [~ our] pul)
?+ one ~
%g
?+ tri ~
@@ -1101,17 +1368,24 @@
%v (foin p.q.pul paw r.pul)
%c (flub paw ~)
%l (fool r.pul)
- %p (fapp p.q.pul paw)
+ %g (fapg p.q.pul yun paw)
+ %e (fape p.q.pul yun paw)
==
::
%p
?+ tri ~
%l (foom moh)
+ %m (fapm p.q.pul yun paw moh)
+ %s (faps p.q.pul yun paw moh)
+ %u (fapu p.q.pul yun paw)
==
::
%t
?+ tri ~
%c (flub paw [~ moh])
+ %m (fapm p.q.pul yun paw moh)
+ %s (faps p.q.pul yun paw moh)
+ %u (fapu p.q.pul yun paw)
==
==
::
@@ -1128,8 +1402,34 @@
+>.$(..ya (hone our num ses))
+>.$
::
+ ++ bush :: error response
+ |= [cod=@ud msg=@t num=@ud]
+ ^+ +>
+ =+ pup=(~(get by q.rey) num)
+ ?~ pup +>.$
+ %= +>.$
+ q.rey
+ %+ ~(put by q.rey) num
+ %= u.pup
+ pez
+ `pest`[%fin %raw cod ~[content-type/'text/plain'] `(taco msg)]
+ ==
+ ==
+ ::
+ ++ bust :: no-content response
+ |= [cod=@ud num=@ud]
+ ^+ +>
+ =+ pup=(~(get by q.rey) num)
+ ?~ pup +>.$
+ :: ?> ?=(%way pez.u.pup)
+ %= +>.$
+ q.rey
+ %+ ~(put by q.rey) num
+ u.pup(pez [%fin %raw cod *mess `*octs])
+ ==
+ ::
++ inch :: function built
- |= [num=@ud mez=(each beet (list tank))]
+ |= [num=@ud mez=(each bead (list tank))]
^+ +>
=+ pup=(~(get by q.rey) num)
?~ pup
@@ -1149,9 +1449,12 @@
%+ ~(put by q.rey) num
^- pimp
:* !?=(%head p.moh)
+ p.q.pul
hen
*seam
`pest`[%raw pul moh]
+ ~
+ ~
==
==
::
@@ -1165,296 +1468,22 @@
?> ?=(%way pez.u.pup)
+>.$(q.rey (~(put by q.rey) num u.pup(pez [%haz rot])))
::
- ++ lace :: load and execute
- |= [pax=path sam=vase]
- ^- [gank _+>]
- =^ hum +>.$ (lack pax)
- :_ +>.$
- =+ mud=(need hum)
- ?: ?=(| -.mud) mud
- =+ typ=(~(play ut [%cell p.p.mud p.sam]) [%cncl [~ 2] [~ 3]])
- =+ ton=(mong [q.p.mud q.sam] sky)
- ?- -.ton
- %0 [%& typ p.ton]
- %1 [%| (turn p.ton |=(a=* (smyt (path a))))]
- %2 [%| p.ton]
- ==
- ::
- ++ lack :: probe/load
- |= pax=path
- ^- [(unit gank) _+>]
- =+ ans=(sky %cz pax)
- ?~ ans [~ +>.$]
- =+ ank=((hard ankh) u.ans)
- ?~ q.ank [~ +>.$]
- =+ huc=(~(get by cah.sef) p.u.q.ank)
- ?^ huc
- [[~ %& u.huc] +>.$]
- =+ mud=(much pax q.u.q.ank)
- :- [~ mud]
- ?: ?=(| -.mud) +>.$
- +>.$(cah.sef (~(put by cah.sef) p.u.q.ank p.mud))
- ::
++ lass :: load secret
^- @ta
%^ rsh 3 1
(scot %p (,@ (need (sky %a (scot %p our) %code (scot %da now) ~))))
::
- ++ lend :: load directory node
- |= pax=path
- ^- arch
- ((hard arch) (need (sky %cy pax)))
- ::
- ++ liar :: load file as vase
- |= pax=path
- ^- vase
- =+ fil=(lick pax)
- :_(fil ?^(fil [%cell %noun %noun] [%atom %$]))
- ::
- ++ lich :: simple directory
- |= pax=path
- ^- (list ,@tas)
- (turn (~(tap by r:(lend pax)) ~) |=([a=@tas b=~] a))
- ::
- ++ lick :: load file
- |= pax=path
- (need (sky %cx pax))
- ::
- ++ lily :: translation targets
- |= [pre=path for=@tas]
- ^- (list ,@tas)
- (lich :(weld pre `path`/tan `path`/[for]))
- ::
- ++ lion :: translation graph
- |= [too=@tas pre=path fro=(list ,@tas)]
- ^- (unit (list ,@tas))
- =| war=(set ,@tas)
- =< -:(apex fro)
- |%
- ++ apex
- |= rof=(list ,@tas)
- ^- [(unit (list ,@tas)) _+>]
- ?~ rof
- [~ +>]
- =^ orf +> (apse i.rof)
- ?^(orf [orf +>.$] $(rof t.rof))
- ::
- ++ apse
- |= for=@tas
- ^- [(unit (list ,@tas)) _+>]
- ?: =(for too) [[~ [too ~]] +>]
- ?: (~(has in war) for) [~ +>]
- =. war (~(put in war) for)
- =^ orf +>.$ (apex (lily pre for))
- :_ +>.$
- ?~(orf ~ [~ [for u.orf]])
- --
- ::
- ++ link :: translate
- |= [too=@tas pre=path for=@tas vax=vase]
- ^- [(unit gank) _+>]
- ?: =(for too) [[~ %& vax] +>.$]
- =+ wuy=(lion too pre [for ~])
- ?~ wuy [~ +>.$]
- ?> ?=(^ u.wuy)
- ?> =(for i.u.wuy)
- |- ^- [(unit gank) _+>.^$]
- ?~ t.u.wuy [[~ %& vax] +>.^$]
- =^ mud +>.^$ (lite i.t.u.wuy pre for vax)
- ?: ?=(| -.mud) [[~ mud] +>.^$]
- $(t.u.wuy t.t.u.wuy, for i.t.u.wuy, vax p.mud)
- ::
- ++ lino :: translate
- |= [too=@tas pre=path for=@tas vax=vase]
- ^- [gank _+>]
- =^ gun +>.$ (link too pre for vax)
- :_ +>.$
- ?^ gun u.gun
- [%| [[%leaf "can't make {} from {}"] ~]]
- ::
- ++ lite :: step translate
- |= [too=@tas pre=path for=@tas vax=vase]
- ^- [gank _+>]
- (lace :(weld pre `path`/tan `path`/[for] `path`/[too] `path`/hoon) vax)
- ::
- ++ loan :: normalize vase
- |= [for=@tas pre=path vax=vase]
- ^- [gank _+>]
- =^ mof +>.$ (lack :(weld pre `path`/nor `path`/[for] `path`/hoon))
- :_ +>.$
- ?~ mof [%& vax]
- ?: ?=(| -.u.mof) u.mof
- =+ pud=(mule |.((~(play ut `type`p.p.u.mof) [%cnzy %$])))
- ?: ?=(| -.pud) pud
- ?: (~(nest ut `type`p.pud) | p.vax)
- [%& vax]
- (mule |.((slam `vase`p.u.mof vax)))
- ::
- ++ lobo :: vase to love
- |= [for=logo pre=path vax=vase]
- ^- [(each love (list tank)) _+>]
- =^ mud +>.$ (lino %mime pre for vax)
- :_ +>.$
- ?: ?=(| -.mud) mud
- [%& %mid (mite -.q.p.mud) (octs +.q.p.mud)]
- ::
- ++ loch :: validate vase
- |= [for=@tas pre=path vax=vase]
- ^- [gank _+>]
- =^ wav +>.$ (lack :(weld pre `path`/val `path`/[for] `path`/hoon))
- :_ +>.$
- ?~ wav [%& vax]
- ?: ?=(| -.u.wav) u.wav
- (mule |.((slam `vase`p.u.wav vax)))
- ::
- ++ loot :: load extension tree
- |= [pax=path one=(unit logo)]
- ^- (list path)
- =| [tex=path all=(list path)]
- |- ^- (list path)
- ?^ one
- =+ don=`path`[u.one ~]
- =+ arc=(lend (weld pax don))
- ?~(q.arc ~ [[u.one tex] ~])
- =+ arc=(lend pax)
- =+ ryx=(~(tap by r.arc) ~)
- =- ?~(q.arc orz [tex orz])
- ^= orz
- |- ^- (list path)
- ?~ ryx all
- %= ^$
- one [~ %hoon]
- pax (weld pax `path`[p.i.ryx ~])
- tex [p.i.ryx tex]
- all $(ryx t.ryx)
- ==
- ::
- ++ lope :: normalize/validate
- |= [for=@tas pre=path vax=vase]
- ^- [gank _+>]
- =^ mud +>.$ (loan for pre vax)
- ?: ?=(| -.mud) [mud +>.$]
- (loch for pre p.mud)
- ::
- ++ loth :: direct hard
- |= [for=logo pre=path pax=path]
- ^- [gank _+>]
- (lope for pre (liar pax))
- ::
- ++ loti :: translated soft
- |= [too=logo for=logo pre=path pax=path sam=vase]
- ^- [gank _+>]
- =^ mud +>.$ (loto for pre pax sam)
- ?: ?=(| -.mud) [mud +>.$]
- (lino too pre for p.mud)
- ::
- ++ loto :: direct soft
- |= [for=logo pre=path pax=path sam=vase]
- ^- [gank _+>]
- =^ mud +>.$ (lace pax sam)
- ?: ?=(| -.mud) [mud +>.$]
- (lope for pre p.mud)
- ::
- ++ lots :: translated hard
- |= [too=logo for=logo pre=path pax=path]
- ^- [gank _+>]
- =^ mud +>.$ (lope for pre (liar pax))
- ?: ?=(| -.mud) [mud +>.$]
- (lino too pre for p.mud)
- ::
- ++ loud :: synthesis search
- |= [syn=? for=logo pre=path mid=path]
- ^- (list ,[p=path q=path r=loco])
- =| suf=path
- |- ^- (list ,[p=path q=path r=loco])
- =+ pax=(weld pre (flop mid))
- =+ lot=(loot pax ?:(syn ~ [~ for]))
- =- ?^ tol tol
- ?~ mid ~
- $(mid t.mid, suf [i.mid suf])
- ^= tol
- |- ^- (list ,[p=path q=path r=loco])
- ?~ lot ~
- =+ mor=$(lot t.lot)
- ?~ i.lot mor
- =+ axp=(weld pax `path`(flop i.lot))
- ?: &(syn ?=([%hoon @ ~] i.lot))
- :_(mor [mid suf | ?:(=(for i.t.i.lot) ~ [~ i.t.i.lot]) axp])
- ?: ?=([@ ~] i.lot)
- :_(mor [mid suf & ?:(=(for i.i.lot) ~ [~ i.i.lot]) axp])
- mor
- ::
- ++ loup :: weak synthesis
- |= [for=logo pre=path mid=path]
- ^- [(unit gank) _+>]
- =+ syt=(weld pre `path`[%syn ~])
- =+ ^= luc ^- (list ,[p=path q=path r=loco])
- =+ luc=(loud | for pre mid)
- ?. ?=(~ luc) luc
- (loud & for syt mid)
- ?: =(~ luc) [~ +>.$]
- =+ ^= waz
- |- ^- $: p=(list ,[p=path q=path r=path])
- q=(list ,[p=path q=path r=path])
- r=(list ,[p=path q=path r=[p=@tas q=path]])
- s=(list ,[p=path q=path r=[p=@tas q=path]])
- ==
- ?~ luc [~ ~ ~ ~]
- =+ mor=$(luc t.luc)
- ?- -.r.i.luc
- & ?~ q.r.i.luc
- [[[p.i.luc q.i.luc r.r.i.luc] p.mor] q.mor r.mor s.mor]
- :+ p.mor q.mor
- [[[p.i.luc q.i.luc u.q.r.i.luc r.r.i.luc] r.mor] s.mor]
- | ?~ q.r.i.luc
- [p.mor [[p.i.luc q.i.luc r.r.i.luc] q.mor] r.mor s.mor]
- :+ p.mor q.mor
- [r.mor [[p.i.luc q.i.luc u.q.r.i.luc r.r.i.luc] s.mor]]
- ==
- =^ mud +>.$
- ?^ p.waz :: direct hard
- (loth for pre r.i.p.waz)
- ?^ q.waz :: direct soft
- %- loto
- :* for
- pre
- r.i.q.waz
- !>([for pre p.i.q.waz q.i.q.waz])
- ==
- ?^ r.waz :: translated hard
- (lots for p.r.i.r.waz pre q.r.i.r.waz)
- ?^ s.waz :: translated soft
- %- loti
- :* for
- p.r.i.s.waz
- pre
- q.r.i.s.waz
- !>([for pre p.i.s.waz q.i.s.waz])
- ==
- !!
- [[~ mud] +>.$]
- ::
- ++ lude :: functional synth
- |= [for=logo toe=tube]
- ^- [(unit (each love (list tank))) _+>]
- =+ [pre mid]=[`path`[p.toe q.toe r.toe ~] `path`(flop s.toe)]
- =^ gun +>.$ (loup for pre mid)
- ?~ gun [~ +>.$]
- ?: ?=(| -.u.gun) :_(+>.$ [~ %| p.u.gun])
- =^ mun +>.$ (lobo for pre p.u.gun)
- [[~ mun] +>.$]
- ::
++ step :: step in work
|- ^+ +
=^ zib +.$
=+ yub=q.rey
|- ^- [(list ,[p=@ud q=pimp]) _+.^$]
?~ yub [~ +.^$]
- =^ sin +.^$ $(yub l.yub)
+ =^ sid +.^$ $(yub l.yub)
=^ dex +.^$ $(yub r.yub)
=^ top +.^$ (wink n.yub)
=+ pot=`(list ,[p=@ud q=pimp])`?~(top ~ [[p.n.yub u.top] ~])
- [:(weld pot dex sin) +.^$]
+ [:(weld pot dex sid) +.^$]
+.$(q.rey (~(gas by `_q.rey`~) zib))
::
++ wink :: advance request
@@ -1464,15 +1493,45 @@
%way [[~ pip] +>.$]
%new
?- -.som.pip
- %apg :: XX a mere stub
- ~& [%wink-apg p.som.pip r.som.pip]
+ %ape :: stream update
+ :: ~& :~ %eyre-ape
+ :: [%owner our]
+ :: [%requester num]
+ :: [%app p.som.pip]
+ :: [%user q.som.pip]
+ :: [%instance r.som.pip]
+ :: [%stream s.som.pip]
+ :: [%request t.som.pip]
+ :: ==
:- [~ pip(pez %way)]
- +>.$(..ya (hoth our num ses q.som.pip %& r.som.pip))
+ (yoke num +.som.pip)
::
- %apl !!
- %apm !!
- %aps !!
- %apu !!
+ %apg :: simple get
+ :: ~& :~ %eyre-apg
+ :: [%owner our]
+ :: [%requester num]
+ :: [%app p.som.pip]
+ :: [%user q.som.pip]
+ :: [%logo r.som.pip]
+ :: [%path s.som.pip]
+ :: ==
+ :- [~ pip(pez %way)]
+ (yokg num p.som.pip q.som.pip s.som.pip)
+ ::
+ %apm :: message
+ :: ~& [%wink-apm +.som.pip]
+ :- [~ pip(pez %way)]
+ (yokm num +.som.pip)
+ ::
+ %aps :: subscribe
+ :: ~& [%wink-aps +.som.pip]
+ :- [~ pip(pez %way)]
+ (yoks num +.som.pip)
+ ::
+ %apu :: unsubscribe
+ :: ~& [%wink-apu +.som.pip]
+ :- [~ pip(pez %way)]
+ (yoku num +.som.pip)
::
%con
:_ +>.$
@@ -1680,10 +1739,10 @@
==
==
;body
- ;div@output;
- ;div@input
- ;div/prompt;
- ;input/line(type "text");
+ ;div#output;
+ ;div#input
+ ;div.prompt;
+ ;input.line(type "text");
==
;+ [-.sac `marl`[sez +.sac]]
==
@@ -1715,14 +1774,14 @@
=. cow (~(put by cow) p.som.pip cal)
:_ +>.$
[~ pip(pez [%err 500 [%leaf "cop: {}, {}."]~])]
- =+ ^= fuv ^- (unit card)
+ =+ ^= fuv ^- (unit note)
?. ?=(%o -.r.som.pip) ~
=+ lin=(~(get by p.r.som.pip) %line)
- ?^ lin ?.(?=(%s -.u.lin) ~ [~ %line p.u.lin])
+ ?^ lin ?.(?=(%s -.u.lin) ~ [~ %b %line p.u.lin])
=+ syc=(~(get by p.r.som.pip) %hail)
- ?^ syc [~ %hail ~]
+ ?^ syc [~ %b %hail ~]
=+ lig=(~(get by p.r.som.pip) %ling)
- ?^ lig [~ %ling ~]
+ ?^ lig [~ %b %ling ~]
~
:_ %_ +>.$
cow (~(put by cow) p.som.pip cal(ino +(ino.cal)))
@@ -1730,8 +1789,7 @@
?~ fuv mow
:_ mow
:- hen
- :^ %toss %b
- [%cons (scot %p our) ses (scot %ud p.som.pip) ~]
+ :+ %pass [%cons (scot %p our) ses (scot %ud p.som.pip) ~]
u.fuv
==
[~ `pimp`pip(pez `pest`[%fin %raw 200 ~ ~])]
@@ -1742,7 +1800,7 @@
::
%fun
:- [~ pip(pez %way)]
- =+ bem=`bead`(need (tome q.som.pip))
+ =+ bem=`beam`(need (tome q.som.pip))
=+ bek=`beak`[p.bem q.bem r.bem]
=+ kas=`silk`[%cast %mime bek `silk`[%boil p.som.pip bem]]
+>.$(..ya (honk our num ses kas))
@@ -1797,6 +1855,10 @@
[%location (crip (earn p.som.pip))]~
~
==
+ ::
+ %sil
+ :- [~ pip(pez %way)]
+ +>.$(..ya (honk our num ses q.som.pip))
==
::
[%err *]
@@ -1812,21 +1874,24 @@
[~ pip(pez [%fin %wan 'Hello, world' ~])]
::
[%fud *]
- ?> ?=(%fun -.som.pip)
+ =+ ^= mog ^- (list manx)
+ ?: ?=(%fun -.som.pip)
+ (weld r.som.pip sip.pip)
+ sip.pip
:_ +>.$
:- ~
%= pip
pez
^- pest
?- -.p.pez.pip
- | =+ mad=(loga "server error" r.som.pip p.p.pez.pip)
+ | =+ mad=(loga "server error" mog p.p.pez.pip)
:- %fin
:- %raw
^- httr
:+ 500
~[content-type/'text/html']
[~ (tact (xmlt | mad ~))]
- & [%fin (lofi r.som.pip (lopo q.p.p.pez.pip))]
+ & [%fin (lofe vaz.pip (lofi mog (lopo q.p.p.pez.pip)))]
==
==
::
@@ -1849,6 +1914,215 @@
=+ sez=step
?: =(rey.sez rey) sez
$(+ sez)
+ ::
+ ++ yoke :: long poll
+ |= [num=@ud app=term you=ship nap=@ud suq=@ud cnt=@ud]
+ ^+ +>
+ =+ yon=(yolk nap)
+ ?~ yon (bust 204 num)
+ abet:(hire:(yule:u.yon suq) cnt num)
+ ::
+ ++ yokg :: main call
+ |= [num=@ud app=term you=ship pax=path]
+ ^+ +>
+ ?< (~(has by sok) num)
+ abet:(~(self yo num app you *sink) pax)
+ ::
+ ++ yokm :: message
+ |= [num=@ud app=term you=ship nap=@ud cnt=@ud jon=json]
+ ^+ +>
+ =+ yon=(yolk nap)
+ ?~ yon (bust 204 num)
+ abet:(post:u.yon cnt num jon)
+ ::
+ ++ yoks :: subscribe
+ |= [num=@ud app=term you=ship nap=@ud suq=@ud pax=path]
+ =+ yon=(yolk nap)
+ ?~ yon (bust 204 num)
+ abet:(scud:u.yon suq num pax)
+ ::
+ ++ yoku :: unsubscribe
+ |= [num=@ud app=term you=ship nap=@ud suq=@ud]
+ !!
+ ::
+ ++ yolk :: yo by instance
+ |= nap=@ud
+ =+ suy=(~(get by sok) nap)
+ ?~ suy ~
+ (some ~(. yo nap u.suy))
+ ::
+ ++ yo :: app instance
+ |_ $: nap=@ud :: instance number
+ app=term :: application name
+ you=ship :: client identity
+ siq=sink :: instance state
+ ==
+ ++ abet :: resolve
+ %_ ..yo
+ sok (~(put by sok) nap [app you siq])
+ ==
+ ::
+ ++ amok :: demolish
+ ^+ ..yo
+ =+ wuh=(~(tap by haw.siq) ~)
+ |- ^+ ..yo
+ ?~ wuh
+ %= ..yo
+ sok (~(del by sok) nap)
+ ==
+ $(wuh t.wuh, ..amok (pass p.i.wuh `note`[%g %nuke our app]))
+ ::
+ ++ hoop :: request path
+ |= suq=@ud
+ ^- path
+ :~ %hoop
+ (scot %p our)
+ ses
+ (scot %ud nap)
+ (scot %ud suq)
+ ==
+ ::
+ ++ pass :: pass
+ |= [suq=@ud noh=note]
+ ^+ +>
+ +>(mow [[hen %pass (hoop suq) noh] mow])
+ ::
+ ++ post :: transmit
+ |= [cnt=@ud num=@ud jon=json]
+ ^+ +>
+ =. +>.$
+ ?. =(cnt meg.siq) +>.$
+ %+ pass(meg.siq +(meg.siq))
+ 1
+ `note`[%g %mess [our app] you [%json !>(jon)]]
+ ?. =(+(cnt) meg.siq)
+ +>.$(..yo (bust 204 num))
+ (hire:(yule 1) cnt num)
+ ::
+ ++ scud :: subscribe
+ |= [suq=@ud num=@ud pax=path]
+ =. +>.$ (pass suq `note`[%g %show [our app] you pax])
+ (hire:(yule suq) 0 num)
+ ::
+ ++ self :: request main
+ |= pax=path
+ ^+ +>
+ (hire:(yule:(pass 0 [%g %show [our app] you pax]) 0) 0 nap)
+ ::
+ ++ yule :: swig state
+ |= suq=@ud
+ ~(. yu suq =+(wig=(~(get by haw.siq) suq) ?~(wig *swig u.wig)))
+ ::
+ ++ yu :: swig state
+ |_ [suq=@ud wig=swig]
+ ++ abet :: resolve
+ %_(..yu haw.siq (~(put by haw.siq) suq wig))
+ ::
+ ++ amok
+ %_(..yu haw.siq (~(del by haw.siq) suq))
+ ::
+ ++ busk :: seam result
+ |= $: num=@ud
+ cnt=@ud
+ huq=(unit (each cage cage))
+ ==
+ ^+ +>
+ =+ pup=(~(get by q.rey) num)
+ ?~ pup +>.$ :: XX a hack
+ =. wig ?. =(toy.wig cnt)
+ ?>(=(toy.wig +(cnt)) wig)
+ %= wig
+ toy +(toy.wig)
+ red
+ ?: =(0 toy.wig) red.wig
+ :: ~& [%busk [%sent cnt] [%lost (dec toy.wig)]]
+ (~(del by red.wig) (dec toy.wig))
+ ==
+
+ :: =+ pip=(need (~(get by q.rey) num))
+ =+ pip=u.pup
+ =+ ^= sip
+ ?. =(%apg -.som.pip) sip.pip
+ [duty sip.pip]
+ ?~ huq +>.$(..yo (bust 404 num))
+ %= +>.$
+ q.rey
+ %+ ~(put by q.rey) num
+ ^- pimp
+ =+ quo=|=(a=cord :(weld "\"" (trip a) "\""))
+ %= pip
+ pez %new
+ vaz :~ [%ship (quo (rsh 3 1 (scot %p our)))]
+ [%appl (quo app)]
+ [%port (trip (rsh 3 2 (scot %ui nap)))]
+ [%auto "true"]
+ [%oryx (quo orx.ced)]
+ [%user (quo (rsh 3 1 (scot %p our)))]
+ ==
+ sip sip
+ som ^- seam
+ :+ %sil
+ ?:(-.u.huq 200 203)
+ =+ bek=`beak`[our %main [%da now]]
+ =+ don=`silk`[%done ~ `cage`p.u.huq]
+ ^- silk
+ :^ %cast %mime bek
+ ?~ fur.pip don
+ `silk`[%cast u.fur.pip bek don]
+ ==
+ ==
+ ::
+ ++ dumb :: reset
+ ^+ ..yu
+ =+ dum=(~(tap by wan.wig) ~)
+ |- ^+ ..yu
+ ?~ dum amok
+ $(dum t.dum, ..yo (bust 404 q.i.dum))
+ ::
+ ++ hear :: produce
+ |= huq=(unit (each cage cage))
+ ^+ ..yu
+ =< abet
+ =+ cnt=cnt.wig
+ =+ dul=(~(get by wan.wig) cnt)
+ :: ~& :~ %yu-hear
+ :: [%instance nap]
+ :: [%produced cnt]
+ :: ?~(dul %unrequested [%requester u.dul])
+ :: ==
+ =: cnt.wig +(cnt.wig)
+ wan.wig ?~(dul wan.wig (~(del by wan.wig) cnt.wig))
+ red.wig (~(put by red.wig) cnt.wig huq)
+ ==
+ ?~(dul +>.$ (busk u.dul cnt huq))
+ ::
+ ++ hire :: consume
+ |= [cnt=@ud num=@ud]
+ ^+ ..yu
+ =< abet
+ :: ~& :~ %yu-hire
+ :: [%instance nap]
+ :: [%produced cnt.wig]
+ :: [%request cnt]
+ :: [%dispatched toy.wig]
+ :: [%requester num]
+ :: ==
+ ?: |((lth +(cnt) toy.wig) (gth cnt toy.wig))
+ ~& [%hire-improper [%request cnt] [%dispatched toy.wig]]
+ +>.$(..yo (bust 204 num))
+ ?: (gte cnt cnt.wig)
+ :: ~& %hire-wait
+ =+ old=(~(get by wan.wig) cnt)
+ =. wan.wig (~(put by wan.wig) cnt num)
+ +>.$(..yo ?~(old ..yo (bust 204 u.old)))
+ =+ rud=(~(get by red.wig) cnt)
+ ?~ rud
+ :: ~& %hire-bust
+ +>.$(..yo (bust 204 num))
+ :: ~& %hire-send
+ (busk num cnt u.rud)
+ --
+ --
--
--
--
@@ -1858,26 +2132,29 @@
|= [now=@da eny=@ ski=sled] :: activate
^? :: opaque core
|% ::
-++ take :: process move
- |= [tea=wire hen=duct hin=(hypo sign)]
+++ call :: handle request
+ |= $: hen=duct
+ hic=(hypo (hobo kiss))
+ ==
+ => %= . :: XX temporary
+ q.hic
+ ^- kiss
+ ?: ?=(%soft -.q.hic)
+ ((hard kiss) p.q.hic)
+ ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
+ ~& [%eyre-call-flub (,@tas `*`-.q.hic)]
+ ((hard kiss) q.hic)
+ ==
^- [p=(list move) q=_..^$]
=+ ska=(slod ski)
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
- ?: ?=(%crud -.q.hin)
- [[[hen %slip %d %flog q.hin] ~] ..^$]
- ?: ?=(%soft -.q.hin)
- $(q.hin ((hard card) p.q.hin))
^- [p=(list move) q=_..^$]
=. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
=^ mos bol
- abet:apex:~(adit ye [[tea hen q.hin] [now eny sky] ~] bol)
+ abet:(apex:~(adit ye [hen [now eny sky] ~] bol) q.hic)
[mos ..^$]
::
-++ call :: process move
- |= [hen=duct hic=(hypo kiss)]
- (take ~ hen hic)
-::
++ doze
|= [now=@da hen=duct]
^- (unit ,@da)
@@ -1890,8 +2167,22 @@
::
++ scry
|= [our=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
- ^- (unit (unit (pair lode ,*)))
+ ^- (unit (unit (pair logo ,*)))
~
::
++ stay `bolo`+>-.$
+++ take :: accept response
+ |= [tea=wire hen=duct hin=(hypo sign)]
+ ^- [p=(list move) q=_..^$]
+ =+ ska=(slod ski)
+ =+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
+ =. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
+ ^- [p=(list move) q=_..^$]
+ =. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
+ =^ mos bol
+ =< abet
+ %^ axon:~(adit ye [hen [now eny sky] ~] bol) tea
+ (~(peek ut p.hin) %free 3)
+ q.hin
+ [mos ..^$]
--
diff --git a/arvo/ford.hoon b/arvo/ford.hoon
index 0dedf9fde..ec282976d 100644
--- a/arvo/ford.hoon
+++ b/arvo/ford.hoon
@@ -1,24 +1,31 @@
-!: :: %ford, new execution control
+:: :: %ford, new execution control
!? 164
::::
|= pit=vase
=> =~
:: structures
|%
+++ bead ,[p=(set beam) q=cage] :: computed result
++ gift :: out result <-$
- $% [%made p=(each beet (list tank))] :: computed result
+ $% [%made p=(each bead (list tank))] :: computed result
== ::
++ kiss :: in request ->$
$% [%exec p=@p q=(unit silk)] :: make / kill
- [%soft p=*] :: typeless kiss
== ::
++ move ,[p=duct q=(mold note gift)] :: local move
++ note :: out request $->
- $% [%warp p=sock q=riff] :: see %clay
- == ::
-++ sign :: in result $-<
- $% [%writ p=riot] :: see %clay
+ $% $: %c :: to %clay
+ $% [%warp p=sock q=riff] ::
+ == == == ::
+++ rave :: see %clay
+ $% [& p=mood] :: single request
+ [| p=moat] :: change range
== ::
+++ riff ,[p=desk q=(unit rave)] :: see %clay
+++ sign :: in result $<-
+ $% $: %c :: by %clay
+ $% [%writ p=riot] ::
+ == == == ::
-- ::
|% :: structures
++ axle :: all %ford state
@@ -34,8 +41,8 @@
|* a=$+(* *) :: product clam
$: p=cafe :: cache
$= q ::
- $% [%0 p=(set bead) q=a] :: depends/product
- [%1 p=(set ,[p=bead q=(list tank)])] :: blocks
+ $% [%0 p=(set beam) q=a] :: depends/product
+ [%1 p=(set ,[p=beam q=(list tank)])] :: blocks
[%2 p=(list tank)] :: error
== ::
== ::
@@ -51,7 +58,7 @@
:: ::
++ calm :: cache metadata
$: laz=@da :: last accessed
- dep=(set bead) :: dependencies
+ dep=(set beam) :: dependencies
== ::
++ calx :: concrete cache line
$% [%comp p=calm q=cage r=twig] :: compile by text
@@ -60,7 +67,7 @@
++ task :: problem in progress
$: nah=duct :: cause
kas=silk :: problem
- kig=[p=@ud q=(map ,@ud bead)] :: blocks
+ kig=[p=@ud q=(map ,@ud beam)] :: blocks
== ::
-- ::
|% ::
@@ -101,7 +108,7 @@
==
::
++ fine |* [a=cafe b=*] :: bolt from data
- [p=`cafe`a q=[%0 p=*(set bead) q=b]] ::
+ [p=`cafe`a q=[%0 p=*(set beam) q=b]] ::
++ flaw |=([a=cafe b=(list tank)] [p=a q=[%2 p=b]]) :: bolt from error
::
++ grom :: merge sets
@@ -147,37 +154,41 @@
~(exec zo [num `task`[hen u.kus 0 ~]])
::
++ axon :: take
- |= [num=@ud tik=@ud sin=sign]
+ |= [num=@ud tik=@ud sih=sign]
^+ +>
- ?- -.sin
+ ?- -.+.sih
%writ
=+ tus=(~(get by q.tad.bay) num)
?~ tus
~& [%ford-lost num]
+>.$
- (~(resp zo [num u.tus]) tik p.sin)
+ (~(resp zo [num u.tus]) tik p.+.sih)
==
::
++ zo
|_ [num=@ud task]
++ abet %_(..zo q.tad.bay (~(put by q.tad.bay) num +<+))
- ++ amok %_(..zo q.tad.bay (~(del by q.tad.bay) num))
+ ++ amok
+ %_ ..zo
+ q.tad.bay (~(del by q.tad.bay) num)
+ dym.bay (~(del by dym.bay) nah)
+ ==
++ camo :: stop requests
^+ .
- =+ kiz=(~(tap by q.kig) *(list ,[p=@ud q=bead]))
+ =+ kiz=(~(tap by q.kig) *(list ,[p=@ud q=beam]))
|- ^+ +>
?~ kiz +>
%= $
kiz t.kiz
mow :_ mow
:- hen
- :^ %toss %c
- [(scot %p our) (scot %ud num) (scot %ud p.i.kiz) ~]
+ :^ %pass [(scot %p our) (scot %ud num) (scot %ud p.i.kiz) ~]
+ %c
[%warp [our p.q.i.kiz] q.q.i.kiz ~]
==
::
++ camp :: request a file
- |= [ren=care bem=bead]
+ |= [ren=care bem=beam]
^+ +>
=+ tik=(scot %ud p.kig)
=: p.kig +(p.kig)
@@ -186,8 +197,8 @@
%= $
mow :_ mow
:- hen
- :^ %toss %c
- [(scot %p our) (scot %ud num) (scot %ud tik) ~]
+ :^ %pass [(scot %p our) (scot %ud num) (scot %ud tik) ~]
+ %c
[%warp [our p.bem] q.bem [~ %& %x r.bem s.bem]]
==
::
@@ -257,13 +268,13 @@
^= q
?- -.ton
%2 [%2 p=p.ton]
- %0 [%0 p=*(set bead) q=(fun p.ton)]
+ %0 [%0 p=*(set beam) q=(fun p.ton)]
%1 =- ?- faw
- & [%1 p=(turn p.faw |=(a=bead [a *(list tank)]))]
+ & [%1 p=(turn p.faw |=(a=beam [a *(list tank)]))]
| [%2 p=p.faw]
==
^= faw
- |- ^- (each (list bead) (list tank))
+ |- ^- (each (list beam) (list tank))
?~ p.ton [%& ~]
=+ nex=$(p.ton t.p.ton)
=+ pax=(path i.p.ton)
@@ -294,7 +305,7 @@
=< abet
|- ^+ ..exec
?~ zuk ..exec
- =+ foo=`_..exec`(camp %x `bead`p.i.zuk)
+ =+ foo=`_..exec`(camp %x `beam`p.i.zuk)
$(zuk t.zuk, ..exec foo)
==
::
@@ -359,7 +370,7 @@
(fine cof p.cay vax)
::
++ krab :: load to twig
- |= [cof=cafe for=logo how=logo rem=spur bem=bead]
+ |= [cof=cafe for=logo how=logo rem=spur bem=beam]
^- (bolt vase)
%+ cope (fade cof %bake how bem)
|= [cof=cafe gen=twig]
@@ -368,7 +379,7 @@
(maul cof gat !>([`beak`[p.bem q.bem r.bem] for +:s.bem rem]))
::
++ lace :: load and check
- |= [cof=cafe for=logo rem=spur bem=bead]
+ |= [cof=cafe for=logo rem=spur bem=beam]
^- (bolt (unit vase))
=+ bek=`beak`[p.bem q.bem r.bem]
%+ cope (lend cof bem)
@@ -403,15 +414,14 @@
(fine cof ~ pro)
::
++ lair :: metaload
- |= [for=logo bem=bead]
+ |= [for=logo bem=beam]
|= [cof=cafe vax=vase]
^- (bolt vase)
?. (~(nest ut -:!>(*silk)) | p.vax)
(flaw cof (smyt (tope bem)) ~)
%+ cope (make cof ((hard silk) q.vax))
|= [cof=cafe cay=cage]
- =+ too=`logo`?@(p.cay p.cay %noun)
- (link cof for too [p.bem q.bem r.bem] q.cay)
+ (link cof for p.cay [p.bem q.bem r.bem] q.cay)
::
++ lane :: type infer
|= [cof=cafe typ=type gen=twig]
@@ -419,14 +429,14 @@
|=(ref=type ref)
::
++ lend :: load arch
- |= [cof=cafe bem=bead]
+ |= [cof=cafe bem=beam]
^- (bolt arch)
=+ von=(ska %cy (tope bem))
?~ von [p=cof q=[%1 [bem ~] ~ ~]]
(fine cof ((hard arch) (need u.von)))
::
++ liar :: load vase
- |= [cof=cafe bem=bead]
+ |= [cof=cafe bem=beam]
^- (bolt vase)
=+ von=(ska %cx (tope bem))
?~ von
@@ -446,7 +456,7 @@
(fine cof ?.(=(%hoon for) all [%hoot all]))
::
++ lima :: load at depth
- |= [cof=cafe for=logo rem=spur bem=bead]
+ |= [cof=cafe for=logo rem=spur bem=beam]
^- (bolt (unit vase))
%+ cope (lend cof bem)
|= [cof=cafe arc=arch]
@@ -468,8 +478,8 @@
|= [cof=cafe vax=vase]
(fine cof ~ vax)
::
- ++ lime :: load bead
- |= [cof=cafe for=logo bem=bead]
+ ++ lime :: load beam
+ |= [cof=cafe for=logo bem=beam]
=+ [mob=bem rem=*path]
|- ^- (bolt vase)
%+ cope (lima cof for rem bem)
@@ -533,7 +543,7 @@
++ make :: reduce silk
|= [cof=cafe kas=silk]
^- (bolt cage)
- ~& [%ford-make kas]
+ :: ~& [%ford-make -.kas]
?- -.kas
^
%. [cof p.kas q.kas]
@@ -544,7 +554,7 @@
==
::
|= [cof=cafe bor=cage heg=cage] ^- (bolt cage)
- [p=cof q=[%0 ~ [[p.bor p.heg] (slop q.bor q.heg)]]]
+ [p=cof q=[%0 ~ [%$ (slop q.bor q.heg)]]]
==
::
%bake
@@ -577,12 +587,20 @@
%cast
%+ cope $(kas r.kas)
|= [cof=cafe cay=cage]
- =+ for=`logo`?@(p.cay p.cay %noun)
- %+ cope (link cof p.kas for q.kas q.cay)
+ %+ cope (link cof p.kas p.cay q.kas q.cay)
|= [cof=cafe vax=vase]
(fine cof [p.kas vax])
::
%done [cof %0 p.kas q.kas]
+ %dude
+ =+ dog=$(kas q.kas)
+ ?. ?=(%2 -.q.dog) dog
+ dog(p.q [p.kas p.q.dog])
+ ::
+ %dune
+ ?~ q.kas [cof [%2 [%leaf "no data"]~]]
+ $(kas [%done p.kas u.q.kas])
+ ::
%mute (kale cof p.kas q.kas)
%pass
%+ cope $(kas p.kas)
@@ -637,13 +655,18 @@
^? :: opaque core
|% ::
++ call :: request
- |= [hen=duct hic=(hypo kiss)]
- ?. (~(nest ut -:!>(q.hic)) | p.hic) :: XX temporary
- ~& [%ford-call-flub -.q.hic]
- !!
+ |= [hen=duct hic=(hypo (hobo kiss))]
+ => %= . :: XX temporary
+ q.hic
+ ^- kiss
+ ?: ?=(%soft -.q.hic)
+ ((hard kiss) p.q.hic)
+ ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
+ ~& [%ford-call-flub (,@tas `*`-.q.hic)]
+ ((hard kiss) q.hic)
+ ==
+ ^- [p=(list move) q=_..^$]
=+ ska=(slod ski)
- ?: ?=(%soft -.q.hic)
- $(q.hic ((hard kiss) p.q.hic))
=+ ^= our ^- @p
?- -.q.hic
%exec p.q.hic
@@ -667,15 +690,12 @@
::
++ scry
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
- ^- (unit (unit (pair lode ,*)))
+ ^- (unit (unit (pair logo ,*)))
~
::
++ stay `axle`+>-.$
++ take :: response
|= [tea=wire hen=duct hin=(hypo sign)]
- ?. (~(nest ut -:!>(q.hin)) | p.hin) :: XX temporary
- ~& [%ford-take-flub -.q.hin]
- !!
^- [p=(list move) q=_..^$]
=+ ska=(slod ski)
?> ?=([@ @ @ ~] tea)
diff --git a/arvo/gall.hoon b/arvo/gall.hoon
index 0f8959444..fa603d0f5 100644
--- a/arvo/gall.hoon
+++ b/arvo/gall.hoon
@@ -1,4 +1,4 @@
-!: :: %gall, user-level applications
+:: :: %gall, user-level applications
!? 164
::::
|= pit=vase
@@ -8,42 +8,53 @@
$: %0 :: state version
pol=(map ship mast) :: apps by ship
== ::
+++ bead ,[p=(set beam) q=cage] :: computed result
++ bone ,@ud :: opaque duct
++ gift :: out result <-$
$% [%back p=?] :: %mess ack good/bad
- [%bust ~] :: reset duct
- [%crud p=@tas q=(list tank)] :: error
- [%rash p=json] :: web reaction
- [%rasp p=cage] :: urbit reaction
- [%rush p=@da q=json] :: web result
- [%rust p=@da q=cage] :: urbit result
+ [%crud p=@tas q=(list tank)] :: physical error
+ [%dumb ~] :: close duct
+ [%rasp ~] :: message failure
[%meta p=vase] :: meta-gift
== ::
+++ hasp ,[p=ship q=term] :: app identity
++ kiss :: in request ->$
- $% [%cuff p=(unit cuff) q=kiss] :: controlled kiss
- [%mesh p=hasp q=path r=json] :: web message (json)
- [%mess p=hasp q=cage] :: urbit message
- [%mush p=hasp q=path r=cage] :: web message (mime)
- [%nuke p=hasp] :: reset this duct
- :: [%puke p=(list tank) q=kiss] :: kiss will fail
- [%shah p=hasp q=(unit hope)] :: web subscribe
- [%show p=hasp q=(unit hope)] :: urbit subscribe
- [%soft p=*] :: soft kiss
+ $% [%init p=ship] :: initialize owner
+ [%show p=hasp q=ship r=path] :: subscribe
+ :: [%cuff p=(unit cuff) q=kiss] :: controlled kiss
+ [%mess p=hasp q=ship r=cage] :: message
+ [%nuke p=hasp] :: clear duct
== ::
++ knob :: pending action
- $% [%boot ~] :: boot/reboot
+ $% [%boot ~] :: begin boot
[%crud p=@tas q=(list tank)] :: error
- [%mess p=cage] :: message
- [%nuke ~] :: reboot
- [%show p=(unit hope)] :: subscription
+ [%load p=cage] :: continue boot
+ [%mess p=ship q=cage] :: message
+ [%show p=ship q=path] :: subscribe
+ [%nuke ~] :: clear duct
[%take p=path q=vase] :: user result
== ::
++ mast :: apps by ship
- $: bum=(map ,@ta seat) :: apps by name
+ $: hun=duct :: control duct
+ bum=(map ,@ta seat) :: apps by name
== ::
++ move ,[p=duct q=(mold note gift)] :: typed move
-++ note curd :: out request $->
+++ note :: out request $->
+ $? $: %c :: to %clay
+ $% [%warp p=sock q=riff] ::
+ == == ::
+ $: %f :: to %ford
+ $% [%exec p=@p q=(unit silk)] ::
+ == == ::
+ $: @tas :: to any
+ $% [%meta p=vase] ::
+ == == == ::
++ rapt |*(a=$+(* *) (qual path path ,@da a)) :: versioned result
+++ rave :: see %clay
+ $% [& p=mood] :: single request
+ [| p=moat] :: change range
+ == ::
+++ riff ,[p=desk q=(unit rave)] :: see %clay
++ scar :: opaque duct system
$: p=@ud :: bone sequence
q=(map duct ,[p=bone q=(unit cuff)]) :: by duct
@@ -51,17 +62,26 @@
== ::
++ seat :: the living app
$: huv=(unit vase) :: application vase
- qic=(unit toil) :: project
- vey=(qeu toil) :: pending calls
- orm=(unit ,@da) :: last buildtime
- ped=(set (pair ship desk)) :: dependencies
+ qic=(unit toil) :: current project
+ onz=(unit (pair duct path)) :: live fords
+ vey=(qeu toil) :: pending projects
+ nuc=(set duct) :: nuked ducts
+ tik=@ud :: build number
+ act=@ud :: action number
+ lat=@da :: last change
+ orm=(unit ,@da) :: build date
+ sup=(map bone (pair ship path)) :: subscribers
+ peq=(map bone ,@uvI) :: peekers
+ ped=(set (pair ship desk)) :: active depends
zam=scar :: opaque ducts
== ::
++ sign :: in result $-<
- $% [%made p=(each beet (list tank))] :: computed result
- [%ruse p=curd] :: user wrapper
- [%writ p=riot] :: version result
- == ::
+ $% $: %c :: by %clay
+ $% [%writ p=riot] ::
+ == == ::
+ $: %f :: by %ford
+ $% [%made p=(each bead (list tank))] ::
+ == == == ::
++ toil (pair duct knob) :: work in progress
-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: functions
@@ -126,10 +146,10 @@
=< ^?
|% :: vane interface
++ call :: handle request
- |= [hen=duct hic=(hypo kiss)]
- ?. (~(nest ut -:!>(q.hic)) | p.hic) :: XX temporary
- ~& [%gall-call-flub -.q.hic]
- $(q.hic ((hard kiss) q.hic))
+ |= [hen=duct hic=(hypo (hobo kiss))]
+ => .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
+ ?: ?=(%init -.q.hic)
+ [p=~ q=..^$(pol.all (~(put by pol.all) p.q.hic hen ~))]
|- ^- [p=(list move) q=_..^^$]
=+ =| law=(unit cuff)
|- ^- $: law=(unit cuff)
@@ -137,22 +157,15 @@
kon=knob
==
?- -.q.hic
- %cuff $(q.hic q.q.hic, law (limp p.q.hic law))
- %mesh !!
- %mess [law p.q.hic %mess q.q.hic]
- %mush !!
- %shah !!
- %show [law p.q.hic %show q.q.hic]
- %soft $(q.hic ((hard kiss) p.q.hic))
+ :: %cuff $(q.hic q.q.hic, law (limp p.q.hic law))
+ %mess [law p.q.hic %mess q.q.hic r.q.hic]
+ %show [law p.q.hic %show q.q.hic r.q.hic]
%nuke [law p.q.hic %nuke ~]
==
abet:work:(quem:(boar:(goat hap) hen law) kon)
::
++ take :: accept response
|= [pax=path hen=duct hin=(hypo sign)] ::
- ?. (~(nest ut -:!>(q.hin)) | p.hin) :: XX temporary
- ~& [%gall-take-flub -.q.hin]
- $(q.hin ((hard sign) q.hin))
^- [p=(list move) q=_..^$]
=+ lum=(lump pax)
=< abet =< work
@@ -166,13 +179,13 @@
lot=coin
tyl=path
==
- ^- (unit (unit (pair lode ,*)))
+ ^- (unit (unit (pair logo ,*)))
=+ ^= vew ^- lens :: XX future scry
%. :- use
:- [who syd ((hard case) p.lot)]
(flop tyl)
|= $: use=(unit (set monk)) :: observers
- bid=bead :: position
+ bid=beam :: position
== ::
(beef:(gaur p.bid q.bid) use r.bid s.bid)
%+ bind
@@ -207,17 +220,17 @@
::
++ goat :: call and go
|= [our=@p app=@tas]
- =+ ^= mat ^- mast
- =+ mat=(~(get by pol.all) our)
- ?~(mat *mast u.mat)
+ =+ mat=(need (~(get by pol.all) our))
=+ ^= sat ^- seat
- =+ sat=(~(get by bum.mat) app)
- ?^ sat u.sat
- *seat
- :: %* . *seat
- :: eny (shax (mix now eny))
- :: lat now
- :: ==
+ =+ syt=(~(get by bum.mat) app)
+ ?^ syt u.syt
+ %* . *seat
+ zam
+ ^- scar
+ :+ 1
+ [[hun.mat 0 ~] ~ ~]
+ [[0 hun.mat] ~ ~]
+ ==
~(. go [our app] mat sat)
::
++ go :: application core
@@ -285,7 +298,7 @@
((hard null) q.vax)
=+ ^= yob
|= vax=vase ^- cage
- [((hard lode) -.q.vax) (slot 3 vax)]
+ [((hard logo) -.q.vax) (slot 3 vax)]
=+ ^= yar
|= vax=vase ^- arch
((hard arch) q.vax)
@@ -309,14 +322,14 @@
mow=(list move) :: actions
==
++ abet [(flop mow) ^abet] :: resolve
- ++ apex
+ ++ apex :: enter
^+ .
- ?. &(=(~ huv.sat) =(~ qic.sat) =(~ vey.sat)) .
+ ?. &(=(~ huv.sat) =(~ qic.sat) =(~ vey.sat) =(~ ped.sat)) .
%_(. vey.sat (~(put to vey.sat) hen [%boot ~]))
::
++ bing :: reset to duct
|= neh=duct
- =+ orf=(need (~(get by q.zam.sat) hen))
+ =+ orf=(need (~(get by q.zam.sat) neh))
%_ +>.$
hen neh
ost p.orf
@@ -329,10 +342,10 @@
[%done ~ %$ vax]
::
++ conf :: configured core
- |= vax=vase
+ |= kas=silk
^- silk
- :+ %mute (core vax)
- :~ [[%$ 6]~ (cave !>([[our app] now eny]))]
+ :+ %mute kas
+ :~ [[%$ 12]~ (cave !>([[our app] sup.sat [act.sat eny now]]))]
==
++ core |=(vax=vase (cove %core vax)) :: core as silk
++ cove :: cage as silk
@@ -340,29 +353,46 @@
^- silk
[%done ~ cay]
::
+ ++ deal :: reboot
+ ^+ .
+ =. tik.sat +(tik.sat)
+ =+ pys=(~(tap by sup.sat) ~)
+ :: ~& [%gall-deal tik.sat pys]
+ |- ^+ +>.$
+ ?~ pys +>.$
+ =. +>.$ $(pys t.pys)
+ %= +>.$
+ vey.sat
+ %- ~(put to vey.sat)
+ :- (need (~(get by r.zam.sat) p.i.pys))
+ [%show q.i.pys]
+ ==
+ ::
++ drug :: set dependencies
|= pen=(set (pair ship desk))
+ :: ~& [%drug %pen pen]
+ :: ~& [%drug %ped ped.sat]
^+ +>
=+ ^= new ^- (list move)
%+ turn
%+ skip (~(tap in pen) ~)
|=(a=(pair ship desk) (~(has in ped.sat) a))
|= a=(pair ship desk)
- :- hen
- :^ %toss %c (away %s %drug (scot %p p.a) q.a ~)
- `card`[%warp [our p.a] q.a ~ %| [%da now] [%da (add now ~d1000)]]
+ :- hun.mat
+ :^ %pass (away %w %drug (scot %p p.a) q.a ~) %c
+ [%warp [our p.a] q.a ~ %| [%da now] [%da (add now ~d1000)]]
=+ ^= old ^- (list move)
%+ turn
%+ skip (~(tap in ped.sat) ~)
|=(a=(pair ship desk) (~(has in pen) a))
|= a=(pair ship desk)
- :- hen
- :^ %toss %c (away %s %drug (scot %p p.a) q.a ~)
- `card`[%warp [our p.a] q.a ~]
+ :- hun.mat
+ :^ %pass (away %w %drug (scot %p p.a) q.a ~) %c
+ [%warp [our p.a] q.a ~]
%_(+>.$ ped.sat pen, mow :(weld new old mow))
::
++ drum :: raw dependencies
- |= dep=(set bead)
+ |= dep=(set beam)
^+ +>
?> ?=(^ orm.sat)
%- drug
@@ -375,90 +405,201 @@
$(mav t.mav)
::
++ ford :: exec to ford
- |= [pan=term kas=silk]
- %_ +>.$
- mow
- :_(mow [hen [%toss %f (away [%s pan ~]) [%exec our `kas]]])
+ |= [pax=path kas=silk]
+ ^+ +>
+ %_ +>
+ mow :_(mow [hen %pass (away pax) %f [%exec our `kas]])
+ onz.sat `[hen pax]
==
::
- ++ gate :: gate as silk
+ ++ give :: give a gift
+ |= gip=gift
+ %_(+> mow [[hen %give gip] mow])
+ ::
+ ++ harm :: arm as silk
|= [arm=term kas=silk]
^- silk
[%pass kas [%1 [%cnzy arm]]]
::
- ++ give :: return card
- |= gip=gift
- %_(+> mow [[hen %give gip] mow])
- ::
- ++ gone %_(. qic.sat ~) :: done work
- ++ game :: invoke core
- |= [[pan=term arm=term] vax=vase sam=vase]
- %+ ford pan
- [%call (gate arm (conf vax)) (cove %$ sam)]
- ::
++ home :: load application
^- silk
:+ %boil %core
- [[our %main [%da now]] %app ~]
+ [[our %main [%da now]] app %app ~]
+ ::
+ ++ mack :: apply standard
+ |= sih=sign
+ ?> ?=(%made -.+.sih)
+ ^- [(unit (list tank)) _+>]
+ ?- -.p.+.sih
+ & :- ~
+ %- obey:(morn (slot 3 q.q.p.p.+.sih))
+ (slot 2 q.q.p.p.+.sih)
+ | [`p.p.+.sih (give %crud %made p.p.+.sih)]
+ ==
+ ::
+ ++ meek :: apply peek
+ |= sih=sign
+ ^- [(unit cage) _+>]
+ ?> ?=(%made -.+.sih)
+ ?- -.p.+.sih
+ & =+ vax=`vase`q.q.p.p.+.sih
+ ?. &(?=(^ q.vax) ?=(@ -.q.vax))
+ [~ (give %crud %peek-lame *(list tank))]
+ :: ~> %slog.[0 (skol p:(slot 3 vax))]
+ :- `[((hard logo) -.q.vax) (slot 3 vax)]
+ +>.$
+ | [~ (give %crud %made p.p.+.sih)]
+ ==
+ ::
+ ++ mick :: apply w/depends
+ |= sih=sign
+ ?> ?=(%made -.+.sih)
+ ^- [(unit (set beam)) _+>]
+ ?- -.p.+.sih
+ & :- `p.p.p.+.sih
+ %- obey:(morn (slot 3 q.q.p.p.+.sih))
+ (slot 2 q.q.p.p.+.sih)
+ | [~ (give %crud %made p.p.+.sih)]
+ ==
+ ::
+ ++ murk :: apply park
+ |= sih=sign
+ ^- [(unit cage) _+>]
+ ?> ?=(%made -.+.sih)
+ ?- -.p.+.sih
+ & [`q.p.p.+.sih +>.$]
+ | [~ (give %crud %made p.p.+.sih)]
+ ==
::
++ more :: accept result
|= $: pax=path :: internal position
- hin=(hypo sign) :: urbit event
+ hin=(hypo sign) :: typed event
==
^+ +>
- ?: ?=([%u *] pax)
- ?. ?=(%ruse -.q.hin)
- ~& [%more-card -.q.hin pax]
- !!
+ ?+ -.pax !!
+ %s :: core operation
+ ?> ?& ?=([@ *] t.pax)
+ !=(~ qic.sat)
+ =(`[hen pax] onz.sat)
+ ==
+ =: onz.sat ~
+ qic.sat ~
+ ==
+ ?+ i.t.pax !!
+ %park
+ =^ gyd +>.$ (murk q.hin)
+ ?~ gyd
+ +>.$
+ (quen %load u.gyd)
+ ::
+ %peek
+ ?> ?=([@ *] t.t.pax)
+ =+ you=(need (slaw %p i.t.t.pax))
+ =^ gyd +>.$ (meek q.hin)
+ ?~ gyd
+ (give [%dumb ~])
+ =+ kee=[you t.t.t.pax]
+ =+ ash=(sham q.q.u.gyd)
+ ?: =(`ash (~(get by peq.sat) ost))
+ +>.$
+ %- %= give
+ peq.sat (~(put by peq.sat) ost ash)
+ sup.sat (~(put by sup.sat) ost kee)
+ ==
+ :- %meta
+ ^- vase
+ :- :+ %cell [%cube %rust %atom %tas]
+ [%cell [%atom %tas] p.q.u.gyd]
+ [%rust p.u.gyd q.q.u.gyd]
+ ::
+ %peer
+ ?> ?=([@ *] t.t.pax)
+ =+ you=(need (slaw %p i.t.t.pax))
+ =^ gud +>.$ (mack q.hin)
+ ?^ gud
+ (give [%dumb ~])
+ +>.$(sup.sat (~(put by sup.sat) ost [you t.t.t.pax]))
+ ::
+ %poke
+ =^ gud +>.$ (mack q.hin)
+ ?^ gud (give %rasp ~)
+ +>.$
+ ::
+ %prep
+ =^ gad +>.$ (mick q.hin)
+ ?~ gad (drum ~)
+ deal:(drum u.gad)
+ ::
+ %pull
+ =^ gud +>.$ (mack q.hin)
+ ?^ gud +>.$
+ +>.$(sup.sat (~(del by sup.sat) ost))
+ ==
+ ::
+ %u :: user request
%_ +>.$
vey.sat
- %- ~(put to vey.sat)
- [hen [%take t.pax (spec (slot 3 hin))]]
- ==
- ?> ?=([%s @ ~] pax)
- ?> !=(~ qic.sat)
- ?+ i.t.pax !!
- %boot
- ~& %more-boot
- ?> ?=([~ * %boot ~] qic.sat)
- ?> ?=(%made -.q.hin)
- ?- -.p.q.hin
- & (drum:(morn:gone q.q.p.p.q.hin) p.p.p.q.hin)
- | (mort p.p.q.hin)
+ (~(put to vey.sat) [hen [%take t.pax hin]])
==
::
- %drug
- ~& %more-drug
- ?> ?=(%writ -.q.hin)
- ?~ p.q.hin +>.$
+ %w :: autoboot
+ ?> ?& ?=([%drug @ @ ~] t.pax)
+ ?=(%writ -.+.q.hin)
+ ==
+ =+ :* our=(need (slaw %p i.t.t.pax))
+ syd=(need ((sand %tas) i.t.t.t.pax))
+ ==
+ =. ped.sat (~(del by ped.sat) [our syd])
+ ?~ p.+.q.hin
+ +>.$
+>.$(vey.sat (~(put to vey.sat) hen %boot ~))
- ::
- %step
- ~& %more-step
- ?> ?=(%made -.q.hin)
- ?- -.p.q.hin
- & %- obey:(morn:gone (slot 3 q.q.p.p.q.hin))
- (slot 2 q.q.p.p.q.hin)
- | (give %crud %made p.p.q.hin)
- ==
==
::
- ++ morn :: successful boot
+ ++ morn :: install core
|= vax=vase
- %_(+> huv.sat `vax)
+ ^+ +>
+ =+ new=?~(huv.sat & !=(+<+.q.vax +<+.q.u.huv.sat))
+ =. huv.sat `vax
+ ?. new +>.$
+ =: act.sat +(act.sat)
+ lat.sat now
+ ==
+ =+ pex=(~(tap by peq.sat) ~)
+ |- ^+ +>.^$
+ ?~ pex +>.^$
+ :: ~& [%morn-peek p.i.pex (need (~(get by sup.sat) p.i.pex))]
+ %= $
+ pex t.pex
+ +>.^$ %- quem(hen (need (~(get by r.zam.sat) p.i.pex)))
+ [%show (need (~(get by sup.sat) p.i.pex))]
+ ==
::
++ mort :: failed boot
|= tan=(list tank)
(give %crud %boot-lost tan)
::
- ++ nile [%done ~ [%$ [%atom %n] ~]] :: null silk
- ++ obey :: process result
+ ++ nile [%done ~ [%$ [%cube 0 [%atom %n]] ~]] :: null silk
+ ++ obey :: process app moves
|= vax=vase
%_(+> mow (weld (flop (said vax)) mow))
::
++ quem :: queue action
|= kon=knob :: content
- %_(+> vey.sat (~(put to vey.sat) hen kon))
+ ^+ +>
+ =. +> ?. ?=(%nuke -.kon) +>
+ ?. &(?=(^ onz.sat) =(hen p.u.onz.sat)) +>
+ %= +>
+ onz.sat ~
+ mow
+ :_(mow [hen %pass (away q.u.onz.sat) %f [%exec our ~]])
+ ==
+ +>.$(vey.sat (~(put to vey.sat) hen kon))
+ ::
+ ++ quen :: push on front
+ |= kon=knob
+ ^+ +>
+ =+ yov=(~(tap by vey.sat) ~) :: XX ++pun
+ +>.$(vey.sat (~(gas to *(qeu toil)) `_yov`[[hen kon] yov]))
::
++ said
|= vud=vase
@@ -467,89 +608,123 @@
[(sump (slot 2 vud)) $(vud (slot 3 vud))]
::
++ show :: subscribe
- |= hup=(unit hope) :: subscription
- ^+ +>
- %_(+> vey.sat (~(put to vey.sat) hen %show hup))
+ |= [you=ship pax=path] :: subscription
+ %_(+> vey.sat (~(put to vey.sat) hen %show you pax))
+ ::
+ ++ nuke :: end
+ %_(. vey.sat (~(put to vey.sat) hen %nuke ~))
+ ::
+ ++ sumo :: standard gift
+ |= vig=vase
+ ^- gift
+ [%meta vig]
::
++ sump
|= wec=vase
^- move
- :- ((hard duct) -.q.wec)
+ :- (need (~(get by r.zam.sat) ((hard bone) -.q.wec)))
=+ caq=(spec (slot 3 wec))
?+ q.caq ~&(%sump-bad !!)
::
- [%toss p=@tas q=* r=[p=@tas q=*]]
- :^ %toss (need ((sand %tas) ((hard ,@) p.q.caq)))
- ((hard path) q.q.caq)
+ [%pass p=* q=@tas r=[p=@tas q=*]]
+ :^ %pass [%u ((hard path) p.q.caq)]
+ (need ((sand %tas) ((hard ,@) q.q.caq)))
[%meta (spec (slot 15 caq))]
::
[%give p=[p=@tas q=*]]
- [%give [%meta (spec (slot 3 caq))]]
- ::
- [%slip p=@tas q=[p=@tas q=*]]
- :+ %slip
- (need ((sand %tas) ((hard ,@) p.q.caq)))
- [%meta (spec (slot 7 caq))]
+ [%give (sumo (spec (slot 3 caq)))]
==
::
+ ++ warm :: vase has arm
+ |= cog=@tas
+ ^- ?
+ ?~ huv.sat |
+ !=(~ q:(~(fino ut p.u.huv.sat) 0 %free cog))
+ ::
++ work :: eat queue
- ^+ .
- ~& %gall-work
- ?: |(?=(^ qic.sat) =(~ vey.sat)) . :: nothing to do
+ |- ^+ +
+ ?: |(?=(^ qic.sat) =(~ vey.sat)) +.$ :: nothing to do
=^ yev vey.sat [p q]:~(get to vey.sat)
+ ?: (~(has in nuc.sat) p.yev) $
work:(yawn:(bing p.yev) q.yev)
::
+ ++ yawl :: invoke core
+ |= [[arm=term pax=path] vax=vase sam=vase]
+ ^+ +>
+ %+ ford [%s arm pax]
+ [%call (harm arm (conf (core vax))) (cove %$ sam)]
+ ::
++ yawn :: start event
|= kon=knob
^+ +>
+ :: ~& [%gall-yawn ost -.kon]
=. qic.sat `[hen kon]
?- -.kon
%boot
- ~& %yawn-boot
=. orm.sat `now
- %+ ford %boot
+ %+ ford /s/park
^- silk
- :+ %call
- (gate %prep home)
+ :- home
?~ huv.sat nile
- [nile (gate %save (conf u.huv.sat))]
+ ?: =(~ q.u.huv.sat) nile
+ :- nile
+ ?. (warm %park)
+ [%done ~ %$ (slot 13 u.huv.sat)]
+ (harm %park (conf (core u.huv.sat)))
+ ::
+ %load
+ =+ [hom=(slot 2 q.p.kon) old=(slot 3 q.p.kon)]
+ %+ ford /s/prep
+ ?. (warm(huv.sat `hom) %prep)
+ :- nile
+ ?: =(~ q.old)
+ (core hom)
+ :+ %mute `silk`(core hom)
+ :~ [[%$ 13]~ (cave (slot 3 old))]
+ ==
+ [%call (harm %prep (conf (core hom))) [nile (cave old)]]
::
%crud
- ~& %yawn-crud
- ?~ huv.sat
- ~& [%crud-none our app]
- gone:(give %crud p.kon q.kon)
- %^ game [%step %pain] u.huv.sat
- !>([ost use p.kon])
- ::
- %mess
- ~& %yawn-mess
- ?~ huv.sat
- ~& [%mess-none our app]
- gone:(give %back |)
- %^ game [%step %poke] u.huv.sat
- :(slop [[%atom %ud] ost] !>((ride use say)) q.p.kon)
+ (give(qic.sat ~) %crud p.kon q.kon)
::
%nuke
- ~& %yawn-mess
- ?~ huv.sat
- ~& [%nuke-none our app]
- gone
- (game [%step %punk] u.huv.sat !>([ost ~]))
+ ?. (warm %pull)
+ +>.$(qic.sat ~)
+ ?> ?=(^ huv.sat)
+ (yawl [%pull ~] u.huv.sat [[%atom %ud] ost])
+ ::
+ %mess
+ =+ ^= cog ^- term
+ ?: =(%$ p.q.kon) %poke
+ =+ goc=(cat 3 'poke-' p.q.kon)
+ ?:((warm goc) goc %poke)
+ ?. (warm cog)
+ (give(qic.sat ~) %rasp ~)
+ ?> ?=(^ huv.sat)
+ =+ sam=:(slop [[%atom %ud] ost] [[%atom %p] p.kon] q.q.kon)
+ :: ~& [%mess-poke cog]
+ %+ ford /s/poke
+ [%call (harm cog (conf (core u.huv.sat))) (cove %$ sam)]
::
%show
- ~& %yawn-show
- ?~ huv.sat
- ~& [%show-none our app]
- gone:(give %bust ~)
- %^ game [%step %peer] u.huv.sat
- !>([ost use p.kon])
+ ?: (warm %peer)
+ =+ sam=!>([ost p.kon q.kon])
+ ?> ?=(^ huv.sat)
+ =. peq.sat (~(del by peq.sat) ost)
+ (yawl [%peer (scot %p p.kon) q.kon] u.huv.sat sam)
+ ?: (warm %peek)
+ =+ sam=!>([p.kon q.kon])
+ ?> ?=(^ huv.sat)
+ (yawl [%peek (scot %p p.kon) q.kon] u.huv.sat sam)
+ (give(qic.sat ~) %dumb ~)
::
%take
- ~& %yawn-take
+ ?. (warm %pour)
+ +>.$(qic.sat ~)
?> ?=(^ huv.sat)
- %^ game [%step %peck] u.huv.sat
- :(slop [[%atom %ud] ost] !>((ride use say)) !>(p.kon) q.kon)
+ =+ sam=(slop !>(p.kon) q.kon)
+ %+ ford /s/take
+ [%call (harm %pour (conf (core u.huv.sat))) (cove %$ sam)]
==
--
--
diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon
index 0b4bded49..1717f339c 100644
--- a/arvo/hoon.hoon
+++ b/arvo/hoon.hoon
@@ -71,6 +71,7 @@
[%oak ~] :: XX not used
[%yew p=(map term foot)] :: XX not used
== ::
+++ gate $+(* *) :: general gate
++ gear |* a=_,* :: XX list generator
$_ ::
=| b=* ::
@@ -91,6 +92,7 @@
++ line ,[p=[%leaf p=odor q=@] q=tile] :: %kelp case
++ list |* a=_,* :: null-term list
$|(~ [i=a t=(list a)]) ::
+++ lone |*(a=$+(* *) ,p=a) :: just one thing
++ mane $|(@tas [@tas @tas]) :: XML name/space
++ mano ,[g=marx c=marl] :: normalized manx
++ manx $|(@tas [t=marx c=marl]) :: XML node
@@ -99,6 +101,7 @@
++ mart (list ,[n=mane v=tape]) :: XML attributes
++ marx $|(@tas [n=mane a=mart]) :: XML tag
++ metl ?(%gold %iron %zinc %lead) :: core variance
+++ noun ,* :: any noun
++ null ,~ :: null, nil, etc
++ odor ,@ta :: atom format
++ tarp ,[d=@ud h=@ud m=@ud s=@ud f=(list ,@ux)] :: parsed time
@@ -178,6 +181,7 @@
[1 p=term q=toga] :: deep toga
[2 p=toga q=toga] :: cell toga
== ::
+++ trap ,_|.(_*) :: makes perfect sense
++ trel |* [a=$+(* *) b=$+(* *) c=$+(* *)] :: just a triple
,[p=a q=b r=c] ::
++ tuna :: tagflow
@@ -246,6 +250,7 @@
[%ktbr p=twig] :: %gold core to %iron
[%ktdt p=twig q=twig] :: cast q to type (p q)
[%ktls p=twig q=twig] :: cast q to p, verify
+ [%kthx p=twig q=twig] :: cast q to p, verify
[%kthp p=tile q=twig] :: cast q to icon of p
[%ktpm p=twig] :: %gold core to %zinc
[%ktsg p=twig] :: p as static constant
@@ -407,8 +412,7 @@
[%tree p=term q=wine] ::
[%unit p=term q=wine] ::
== ::
-++ woof (list $|(@ud [p=@ud q=@ud])) :: udon transform
-++ wonk |*(veq=edge ?@(q.veq !! p.u.q.veq)) ::
+++ wonk |*(veq=edge ?~(q.veq !! p.u.q.veq)) ::
:: ::
:: ::
++ map |* [a=_,* b=_,*] :: associative array
@@ -585,11 +589,17 @@
(b u.a)
::
++ bind :: argue
- |* [a=(unit) b=_,*]
+ |* [a=(unit) b=gate]
?~ a
~
[~ u=(b u.a)]
::
+++ bond :: replace
+ |* a=trap
+ |* b=(unit)
+ ?~ b $:a
+ u.b
+::
++ clap :: combine
|* [a=(unit) b=(unit) c=_|=(^ +<-)]
?~ a
@@ -618,7 +628,7 @@
::
++ need :: demand
|* a=(unit)
- ?@ a
+ ?~ a
!!
u.a
::
@@ -635,7 +645,7 @@
^+ a
=+ b=`_a`~
|-
- ?@ a
+ ?~ a
b
$(a t.a, b [i.a b])
::
@@ -649,7 +659,7 @@
++ limo :: listify
|* a=*
^+ =< $
- |% +- $ ?@(a ~ ?:(_? [i=-.a t=$] $(a +.a)))
+ |% +- $ ?~(a ~ ?:(_? [i=-.a t=$] $(a +.a)))
--
a
::
@@ -659,13 +669,13 @@
^- @
=+ b=0
|-
- ?@(a b $(a t.a, b +(b)))
+ ?~(a b $(a t.a, b +(b)))
::
++ levy
~/ %levy :: all of
|* [a=(list) b=_|=(p=* .?(p))]
|- ^- ?
- ?@ a
+ ?~ a
&
?: (b i.a)
$(a t.a)
@@ -683,7 +693,7 @@
~/ %reel
|* [a=(list) b=_=|([p=* q=*] |.(q))]
|- ^+ q.b
- ?@ a
+ ?~ a
q.b
(b i.a $(a t.a))
::
@@ -692,7 +702,7 @@
|* [a=(list) b=_=|([p=* q=*] |.(q))]
|-
^+ q.b
- ?@ a
+ ?~ a
q.b
$(a t.a, b b(q (b i.a q.b)))
::
@@ -708,7 +718,7 @@
|* [a=(list) b=_|=(p=* .?(p))]
|-
^+ a
- ?@ a
+ ?~ a
~
?:((b i.a) [i.a $(a t.a)] $(a t.a))
::
@@ -717,7 +727,7 @@
|* [a=(list) b=_|=(p=* .?(p))]
|-
^+ a
- ?@ a
+ ?~ a
~
?:((b i.a) $(a t.a) [i.a $(a t.a)])
::
@@ -735,7 +745,7 @@
|- ^+ b
?: =(0 a)
b
- ?@ b
+ ?~ b
~
$(b t.b, a (dec a))
::
@@ -768,7 +778,7 @@
~/ %turn
|* [a=(list) b=_,*]
|-
- ?@ a
+ ?~ a
~
[i=(b i.a) t=$(a t.a)]
::
@@ -872,7 +882,7 @@
~/ %rap
|= [a=bloq b=(list ,@)]
^- @
- ?@ b
+ ?~ b
0
(cat a i.b $(b t.b))
::
@@ -882,7 +892,7 @@
^- @
=+ c=0
|-
- ?@ b
+ ?~ b
0
(con (lsh a c (end a 1 i.b)) $(c +(c), b t.b))
::
@@ -1174,8 +1184,6 @@
++ ryls |=([syn=? hol=@ zer=@ fac=@] ~|(%real-nyet ^-(@rs !!)))
:: Floating point operations for general floating points.
-:: Not really needed, since the actual floating point operations
-:: for IEEE types will be jetted directly from their bit-representations.
:: [s=sign, e=unbiased exponent, f=fraction a=ari]
:: Value of floating point = (-1)^s * 2^h * (1.f) = (-1)^s * 2^h * a
++ fl !:
@@ -1183,7 +1191,7 @@
:: ari, or arithmetic form = 1 + mantissa
:: passing around this is convenient because it preserves
:: the number of zeros
- ::
+ ::
:: more sophisticated people call this the significand, but that starts
:: with s, and sign already starts with s, so the variables wouldn't be
:: named very nicely
@@ -1192,14 +1200,14 @@
++ ari |= [p=@u m=@u] ^- @
:: (lia p (mix (lsh 0 (met 0 m) 1) m))
(mix (lsh 0 p 1) m)
-
+ ::
:: bex base a to power p (call w/ b=0 c=1). very naive (need to replace)
:: or jet
++ bey |= [a=@u p=@u b=@u c=@u] ^- @u
?: =(b p)
c
$(c (^mul c a), b (^add b 1))
-
+ ::
:: convert from sign/whole/frac -> sign/exp/ari w/ precision p, bias b
++ cof |= [p=@u b=@u s=? h=@u z=@ f=@u] ^- [s=? e=@s a=@u]
?: &(=(0 h) =(0 f))
@@ -1212,7 +1220,7 @@
=+ a=(mix c (lsh 0 p h))
=+ e=(dif:si (sun:si (met 0 a)) (sun:si +(p)))
[s=s e=e a=(lia p a)]
-
+ ::
:: convert from sign/exp/ari -> sign/whole/frac w/ precision q
++ cog |= [q=@u s=? e=@s a=@u] ^- [s=? h=@u f=@u]
::?: =(e -0)
@@ -1222,13 +1230,13 @@
::?: =((mod `@u`s 2)
::=+ (^mul ari (bex e))
!!
-
+ ::
:: Decimal length of number, for use in ++den
++ dcl |= [f=@u] ^- @u
?: =(f 0)
0
(^add 1 $(f (^div f 10)))
-
+ ::
:: Denominator of fraction, f is base 10
++ den |= [f=@u z=@u] ^- @u
(bey 10 (^add z (dcl f)) 0 1)
@@ -1236,29 +1244,29 @@
:: Binary fraction of precision p (ex, for doubles, p=52)
++ fra |= [p=@u z=@u f=@u] ^- @u
(^div (lsh 0 p f) (den f z))
-
+ ::
:: Decimal fraction of precision q [for printing only]
++ fre |= [q=@u a=@u] ^- @u
=+ d=(bex (^sub (met 0 a) 1))
(^div (^mul a (bey 10 q 0 1)) d)
-
+ ::
++ hol |= [p=@u n=[s=? e=@s a=@u]] ^- @u
?: =((mod `@`e.n 2) 0)
?: (^gte (abs:si e.n) p)
(lsh 0 (^sub (abs:si e.n) p) a.n)
(rsh 0 (^sub p (abs:si e.n)) a.n)
0
-
+ ::
:: reverse ari, ari -> mantissa
++ ira |= a=@u ^- @u
(mix (lsh 0 (dec (met 0 a)) 1) a)
-
+ ::
:: limit ari to precision p. Rounds if over, lsh if under.
++ lia |= [p=@u a=@u] ^- @u
?: (^lte (met 0 a) (^add p 1))
(lsh 0 (^sub (^add p 1) (met 0 a)) a)
(rnd p a)
-
+ ::
:: round to nearest or even based on r (which has length n)
:: n should be the actual length of r, as it exists within a
:: The result is either (rhs 0 n a) or +(rsh 0 n a)
@@ -1268,7 +1276,7 @@
=+ n=(^sub (met 0 a) (^add p 1))
=+ r=(end 0 n a)
(rne p a r n)
-
+ ::
:: the real rnd
++ rne |= [p=@u a=@u r=@u n=@u] ^- @u
=+ b=(rsh 0 n a)
@@ -1306,10 +1314,10 @@
$(n m, m n)
=+ dif=(abs:si (dif:si e.n e.m))
=+ a2=(lsh 0 dif a.n) :: p+1+dif bits
- =+ a3=(^sub a2 a.m) :: assume m is negative for now
+ =+ a3=(^sub a2 a.m) :: assume m < 0 for now
=+ dif2=(^sub (met 0 a2) (met 0 a3)) :: (met 0 a2) > (met 0 a3)
[s=s.n e=(dif:si e.n (sun:si dif2)) a=(rnd p a3)] :: n > m => s=s.n
-
+
++ mul |= [p=@u n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] ^- [s=? e=@ a=@]
=+ a2=(^mul a.n a.m)
:: =+ a3=(mix (lsh 0 (^mul p 2) 1) (end 0 (^mul p 2) a2))
@@ -1318,7 +1326,7 @@
=+ a4=(rnd p (rsh 0 e2 a2))
=+ s2=|(s.n s.m)
[s=s2 e=:(sum:si e.n e.m (sun:si e2)) a=a4]
-
+
++ div |= [p=@u n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] ^- [s=? e=@ a=@]
=+ b=(rnd p (^div (lsh 0 (^mul p 2) a.n) a.m))
?: (^gte a.n a.m)
@@ -1355,7 +1363,8 @@
=+ a2=(lia:fl 52 a.a)
=+ b=(ira:fl a2)
::=+ c=(lsh 0 (^sub 52 (met 0 b)) b)
- (can 0 [[52 b] [[11 (abs:si (sum:si (sun:si 1.023) e.a))] [[1 `@`s.a] ~]]])
+ %+ can 0
+ [[52 b] [[11 (abs:si (sum:si (sun:si 1.023) e.a))] [[1 `@`s.a] ~]]]
:: Sign of an @rd
++ sig |= [a=@rd] ^- ?
=(0 (rsh 0 63 a))
@@ -1371,7 +1380,7 @@
:: Convert to sign/exp/ari form
++ sea |= a=@rd ^- [s=? e=@s a=@u]
[s=(sig a) e=(exp a) a=(ari:fl 52 (end 0 52 a))]
-
+
::::::::::::
++ sun ~/ %sun
|= a=@u ^- @rd
@@ -1388,11 +1397,11 @@
++ mul ~/ %mul
|= [a=@rd b=@rd] ^- @rd
(bit (mul:fl 52 (sea a) (sea b)))
-
+
++ div ~/ %div
|= [a=@rd b=@rd] ^- @rd
(bit (div:fl 52 (sea a) (sea b)))
-
+
++ lte ~/ %lte
|= [a=@rd b=@rd] ^- ?
(lte:fl (sea a) (sea b))
@@ -1408,7 +1417,7 @@
++ gth ~/ %gth
|= [a=@rd b=@rd] ^- ?
(gth:fl (sea a) (sea b))
-
+
++ max |= [a=@rd b=@rd] ^- @rd
?: (gth a b)
a
@@ -1418,7 +1427,7 @@
?: (lth a b)
a
b
-
+
++ bex |= a=@s ^- @rd
(bit [s=%.y e=a a=(ari:fl 52 0)])
--
@@ -1568,10 +1577,10 @@
::
++ apt :: set invariant
|= a=(tree)
- ?@ a
+ ?~ a
&
- ?& ?@(l.a & ?&((vor n.a n.l.a) (hor n.l.a n.a)))
- ?@(r.a & ?&((vor n.a n.r.a) (hor n.a n.r.a)))
+ ?& ?~(l.a & ?&((vor n.a n.l.a) (hor n.l.a n.a)))
+ ?~(r.a & ?&((vor n.a n.r.a) (hor n.a n.r.a)))
==
::
++ in :: set engine
@@ -1581,7 +1590,7 @@
~/ %all
|* b=$+(* ?)
|- ^- ?
- ?@ a
+ ?~ a
&
?&((b n.a) $(a l.a) $(a r.a))
::
@@ -1589,7 +1598,7 @@
~/ %any
|* b=$+(* ?)
|- ^- ?
- ?@ a
+ ?~ a
|
?|((b n.a) $(a l.a) $(a r.a))
::
@@ -1624,7 +1633,7 @@
~/ %gas
|= b=(list ,_?>(?=(^ a) n.a))
|- ^+ a
- ?@ b
+ ?~ b
a
$(b t.b, a (put(+< a) i.b))
::
@@ -1632,7 +1641,7 @@
~/ %has
|* b=*
|- ^- ?
- ?@ a
+ ?~ a
|
?: =(b n.a)
&
@@ -1656,11 +1665,27 @@
$(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
$(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
::
+ +- int :: intersection
+ ~/ %int
+ |* b=_a
+ |- ^+ a
+ ?~ b
+ ~
+ ?~ a
+ ~
+ ?. (vor n.a n.b)
+ $(a b, b a)
+ ?: =(n.b n.a)
+ [n.a $(a l.a, b l.b) $(a r.a, b r.b)]
+ ?: (hor n.b n.a)
+ %- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
+ %- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
+ ::
+- put :: puts b in a, sorted
~/ %put
|* b=*
|- ^+ a
- ?@ a
+ ?~ a
[b ~ ~]
?: =(b n.a)
a
@@ -1686,10 +1711,30 @@
~/ %tap
|= b=(list ,_?>(?=(^ a) n.a))
^+ b
- ?@ a
+ ?~ a
b
$(a r.a, b [n.a $(a l.a)])
::
+ +- uni :: union
+ ~/ %uni
+ |* b=_a
+ |- ^+ a
+ ?~ b
+ a
+ ?~ a
+ b
+ ?: (vor n.a n.b)
+ ?: =(n.b n.a)
+ [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
+ ?: (hor n.b n.a)
+ $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
+ $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
+ ?: =(n.a n.b)
+ [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
+ ?: (hor n.a n.b)
+ $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
+ $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
+ ::
+- wyt :: depth of set
.+
|- ^- @
@@ -1700,10 +1745,10 @@
::
++ ept :: map invariant
|= a=(tree ,[p=* q=*])
- ?@ a
+ ?~ a
&
- ?& ?@(l.a & ?&((vor p.n.a p.n.l.a) (hor p.n.l.a p.n.a)))
- ?@(r.a & ?&((vor p.n.a p.n.r.a) (hor p.n.a p.n.r.a)))
+ ?& ?~(l.a & ?&((vor p.n.a p.n.l.a) (hor p.n.l.a p.n.a)))
+ ?~(r.a & ?&((vor p.n.a p.n.r.a) (hor p.n.a p.n.r.a)))
==
::
++ ja :: jar engine
@@ -1731,7 +1776,7 @@
^- ?
(~(has in (get(+< a) b)) c)
::
- +- put :: adds key-set pair
+ +- put :: add key-set pair
|* [b=* c=*]
^+ a
=+ d=(get(+< a) b)
@@ -1745,7 +1790,7 @@
~/ %all
|* b=$+(* ?)
|- ^- ?
- ?@ a
+ ?~ a
&
?&((b q.n.a) $(a l.a) $(a r.a))
::
@@ -1753,7 +1798,7 @@
~/ %any
|* b=$+(* ?)
|- ^- ?
- ?@ a
+ ?~ a
|
?|((b q.n.a) $(a l.a) $(a r.a))
::
@@ -1789,7 +1834,7 @@
|* b=(list ,[p=* q=*])
=> .(b `(list ,_?>(?=(^ a) n.a))`b)
|- ^+ a
- ?@ b
+ ?~ b
a
$(b t.b, a (put(+< a) p.i.b q.i.b))
::
@@ -1797,7 +1842,7 @@
~/ %get
|* b=*
|- ^- ?(~ [~ u=_?>(?=(^ a) q.n.a)])
- ?@ a
+ ?~ a
~
?: =(b p.n.a)
[~ u=q.n.a]
@@ -1810,6 +1855,26 @@
|* b=*
!=(~ (get(+< a) b))
::
+ +- int :: intersection
+ ~/ %int
+ |* b=_a
+ |- ^+ a
+ ?~ b
+ ~
+ ?~ a
+ ~
+ ?: (vor p.n.a p.n.b)
+ ?: =(p.n.b p.n.a)
+ [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
+ ?: (hor p.n.b p.n.a)
+ %- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
+ %- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
+ ?: =(p.n.a p.n.b)
+ [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
+ ?: (hor p.n.a p.n.b)
+ %- uni(+< $(b l.b, a [n.a l.a ~])) $(a r.a)
+ %- uni(+< $(b r.b, a [n.a ~ r.a])) $(a l.a)
+ ::
+- mar :: add with validation
|* [b=_?>(?=(^ a) p.n.a) c=(unit ,_?>(?=(^ a) q.n.a))]
?~ c
@@ -1820,7 +1885,7 @@
~/ %put
|* [b=* c=*]
|- ^+ a
- ?@ a
+ ?~ a
[[b c] ~ ~]
?: =(b p.n.a)
?: =(c q.n.a)
@@ -1864,7 +1929,7 @@
~/ %tap
|= b=(list ,_?>(?=(^ a) n.a))
^+ b
- ?@ a
+ ?~ a
b
$(a r.a, b [n.a $(a l.a)])
::
@@ -1876,12 +1941,29 @@
::
+- uni :: union, merge
~/ %uni
- |= b=_a
- ?@ b a
- %= $
- a (~(put by a) p.n.b q.n.b)
- b (~(uni by l.b) r.b)
- ==
+ |* b=_a
+ |- ^+ a
+ ?~ b
+ a
+ ?~ a
+ b
+ ?: (vor p.n.a p.n.b)
+ ?: =(p.n.b p.n.a)
+ [n.b $(a l.a, b l.b) $(a r.a, b r.b)]
+ ?: (hor p.n.b p.n.a)
+ $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
+ $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
+ ?: =(p.n.a p.n.b)
+ [n.b $(b l.b, a l.a) $(b r.b, a r.a)]
+ ?: (hor p.n.a p.n.b)
+ $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
+ $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
+ ::
+ +- urn :: turn
+ |* b=$+([* *] *)
+ |-
+ ?~ a ~
+ [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
::
+- wyt :: depth of map
.+
@@ -1930,7 +2012,7 @@
=+ b=get(+< l.a)
bal(+< ^+(a [p.b q.b r.a]))
::
- +- put :: insert new head
+ +- put :: insert new tail
|* b=*
|- ^+ a
?~ a
@@ -2004,7 +2086,7 @@
=< q
|- ^- [p=@ q=@ r=_m]
=+ c=(~(get by m) a)
- ?@ c
+ ?~ c
=> .(m (~(put by m) a b))
?: ?=(@ a)
=+ d=(mat a)
@@ -2066,7 +2148,7 @@
~/ %fun
|= tub=nail
=+ vex=(sef tub)
- ?@ q.vex
+ ?~ q.vex
vex
[p=p.vex q=[~ u=[p=cus q=q.u.q.vex]]]
::
@@ -2076,7 +2158,7 @@
~/ %fun
|= tub=nail
=+ vex=(sef tub)
- ?@ q.vex
+ ?~ q.vex
vex
[p=p.vex q=[~ u=[p=(poq p.u.q.vex) q=q.u.q.vex]]]
::
@@ -2093,7 +2175,7 @@
|* sef=_rule
|= tub=nail
=+ vex=(sef tub)
- ?@(q.vex vex ?:(=(~ q.q.u.q.vex) vex [p=p.vex q=~]))
+ ?~(q.vex vex ?:(=(~ q.q.u.q.vex) vex [p=p.vex q=~]))
::
++ funk :: add to tape first
|* [pre=tape sef=_rule]
@@ -2106,7 +2188,7 @@
~/ %fun
|= tub=nail
=+ vex=(sef tub)
- ?@ q.vex
+ ?~ q.vex
vex
[p=p.vex q=[~ u=[p=(hez [p.tub p.q.u.q.vex] p.u.q.vex) q=q.u.q.vex]]]
::
@@ -2127,7 +2209,7 @@
~/ %fun
|= tub=nail
^- (like char)
- ?@ q.tub
+ ?~ q.tub
(fail tub)
?. =(daf i.q.tub)
(fail tub)
@@ -2145,7 +2227,7 @@
~/ %fun
|= tub=nail
^- (like char)
- ?@ q.tub
+ ?~ q.tub
(fail tub)
?. (lien bud |=(a=char =(i.q.tub a)))
(fail tub)
@@ -2154,21 +2236,21 @@
++ next :: consume a char
|= tub=nail
^- (like char)
- ?@ q.tub
+ ?~ q.tub
(fail tub)
=+ zac=(lust i.q.tub p.tub)
[zac [~ i.q.tub [zac t.q.tub]]]
::
-++ sear :: conditional cook
+++ sear :: conditional cook
~/ %sear
|* [pyq=_|=(* *(unit)) sef=_rule]
~/ %fun
|= tub=nail
=+ vex=(sef tub)
- ?@ q.vex
+ ?~ q.vex
vex
=+ gey=(pyq p.u.q.vex)
- ?@ gey
+ ?~ gey
[p=p.vex q=~]
[p=p.vex q=[~ u=[p=u.gey q=q.u.q.vex]]]
::
@@ -2178,7 +2260,7 @@
~/ %fun
|= tub=nail
^- (like char)
- ?@ q.tub
+ ?~ q.tub
(fail tub)
?. ?&((gte i.q.tub les) (lte i.q.tub mos))
(fail tub)
@@ -2190,7 +2272,7 @@
~/ %fun
|= tub=nail
=+ vex=(sef tub)
- ?@ q.vex
+ ?~ q.vex
vex
[p=p.vex q=[~ u=[p=[gob p.u.q.vex] q=q.u.q.vex]]]
::
@@ -2231,10 +2313,10 @@
[n.nuc [n.yal l.yal l.nuc] r.nuc]
~% %fun ..^$ ~
|= tub=nail
- ?@ q.tub
+ ?~ q.tub
(fail tub)
|-
- ?@ hel
+ ?~ hel
(fail tub)
?: ?@ p.n.hel
=(p.n.hel i.q.tub)
@@ -2252,7 +2334,7 @@
|= tub=nail
^- (like ,_rud)
=+ vex=(fel tub)
- ?@ q.vex
+ ?~ q.vex
[p.vex [~ rud tub]]
=+ wag=$(tub q.u.q.vex)
?> ?=(^ q.wag)
@@ -2267,7 +2349,7 @@
?: =(0 mos)
[p.tub [~ ~ tub]]
=+ vex=(fel tub)
- ?@ q.vex
+ ?~ q.vex
?: =(0 les)
[p.vex [~ ~ tub]]
vex
@@ -2276,22 +2358,22 @@
mos ?:(=(0 mos) 0 (dec mos))
tub q.u.q.vex
==
- ?@ q.wag
+ ?~ q.wag
wag
[p.wag [~ [p.u.q.vex p.u.q.wag] q.u.q.wag]]
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eD, parsing (combinators) ::
::
-++ bend :: conditional comp
+++ bend :: conditional comp
~/ %bend
|* raq=_|*([a=* b=*] [~ u=[a b]])
~/ %fun
|* [vex=edge sab=_rule]
- ?@ q.vex
+ ?~ q.vex
vex
=+ yit=(sab q.u.q.vex)
=+ yur=(last p.vex p.yit)
- ?@ q.yit
+ ?~ q.yit
[p=yur q=q.vex]
=+ vux=(raq p.u.q.vex p.u.q.yit)
?~ vux
@@ -2303,11 +2385,11 @@
|* raq=_|*([a=* b=*] [a b]) :: arbitrary compose
~/ %fun
|* [vex=edge sab=_rule]
- ?@ q.vex
+ ?~ q.vex
vex
=+ yit=(sab q.u.q.vex)
=+ yur=(last p.vex p.yit)
- ?@ q.yit
+ ?~ q.yit
[p=yur q=q.yit]
[p=yur q=[~ u=[p=(raq p.u.q.vex p.u.q.yit) q=q.u.q.yit]]]
::
@@ -2325,18 +2407,18 @@
++ plug :: first then second
~/ %plug
|* [vex=edge sab=_rule]
- ?@ q.vex
+ ?~ q.vex
vex
=+ yit=(sab q.u.q.vex)
=+ yur=(last p.vex p.yit)
- ?@ q.yit
+ ?~ q.yit
[p=yur q=q.yit]
[p=yur q=[~ u=[p=[p.u.q.vex p.u.q.yit] q=q.u.q.yit]]]
::
++ pose :: first or second
~/ %pose
|* [vex=edge sab=_rule]
- ?@ q.vex
+ ?~ q.vex
=+ roq=(sab)
[p=(last p.vex p.roq) q=q.roq]
vex
@@ -2426,17 +2508,17 @@
:: section 2eG, parsing (whitespace) ::
::
++ dog ;~(plug dot gay) ::
-++ doh ;~(plug ;~(plug hep hep) gay) ::
+++ doh ;~(plug ;~(plug hep hep) gay) ::
++ dun (cold ~ ;~(plug hep hep)) :: -- (phep) to ~
++ duz (cold ~ ;~(plug tis tis)) :: == (stet) to ~
++ gah (mask [`@`10 ' ' ~]) :: newline or ace
-++ gap (cold ~ ;~(plug gaq (star ;~(pose vul gah)))) ::
-++ gaq ;~ pose :: end of line
- (just `@`10)
- ;~(plug gah ;~(pose gah vul))
+++ gap (cold ~ ;~(plug gaq (star ;~(pose vul gah)))) ::
+++ gaq ;~ pose :: end of line
+ (just `@`10)
+ ;~(plug gah ;~(pose gah vul))
vul
==
-++ gay ;~(pose gap (easy ~)) ::
+++ gay ;~(pose gap (easy ~)) ::
++ vul %- cold :- ~ :: comments
;~ plug col col
(star ;~(pose (shim 32 126) (shim 128 255)))
@@ -2449,10 +2531,10 @@
++ aln ;~(pose low hig nud) :: alphanumeric
++ alp ;~(pose low hig nud hep) :: alphanumeric and -
++ bet ;~(pose (cold 2 hep) (cold 3 lus)) :: axis syntax - +
-++ bin (bass 2 (most gon but)) :: binary to atom
+++ bin (bass 2 (most gon but)) :: binary to atom
++ but (cook |=(a=@ (sub a '0')) (shim '0' '1')) :: binary digit
++ cit (cook |=(a=@ (sub a '0')) (shim '0' '7')) :: octal digit
-++ dem (bass 10 (most gon dit)) :: decimal to atom
+++ dem (bass 10 (most gon dit)) :: decimal to atom
++ dit (cook |=(a=@ (sub a '0')) (shim '0' '9')) :: decimal digit
++ gul ;~(pose (cold 2 gal) (cold 3 gar)) :: axis syntax < >
++ gon ;~(pose ;~(plug bas gay fas) (easy ~)) :: long numbers \ /
@@ -2467,14 +2549,14 @@
++ mes %+ cook :: hexbyte
|=([a=@ b=@] (add (mul 16 a) b))
;~(plug hit hit)
-++ nix (boss 256 (star ;~(pose aln cab))) ::
+++ nix (boss 256 (star ;~(pose aln cab))) ::
++ nud (shim '0' '9') :: numeric
++ poy ;~(pfix bas ;~(pose bas soq mes)) :: escape chars
++ qit ;~ pose :: chars in a cord
- (shim 32 38)
- (shim 40 91)
- (shim 93 126)
- (shim 128 255)
+ (shim 32 38)
+ (shim 40 91)
+ (shim 93 126)
+ (shim 128 255)
poy
==
++ qut (ifix [soq soq] (boss 256 (more gon qit))) :: cord
@@ -2489,7 +2571,7 @@
|= tub=nail
^- (like axis)
=+ vex=?:(hom (bet tub) (gul tub))
- ?@ q.vex
+ ?~ q.vex
[p.tub [~ 1 tub]]
=+ wag=$(p.tub p.vex, hom !hom, tub q.u.q.vex)
?> ?=(^ q.wag)
@@ -2506,14 +2588,14 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eI, parsing (external) ::
::
-++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) ::
+++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) ::
++ rush |*([naf=@ sab=_rule] (rust (trip naf) sab))
++ rust |* [los=tape sab=_rule]
=+ vex=((full sab) [[1 1] los])
?~(q.vex ~ [~ u=p.u.q.vex])
++ scan |* [los=tape sab=_rule]
=+ vex=((full sab) [[1 1] los])
- ?@ q.vex
+ ?~ q.vex
~_ (show [%m '{%d %d}'] p.p.vex q.p.vex ~)
~|('syntax-error' !!)
p.u.q.vex
@@ -2536,7 +2618,7 @@
++ mesc :: ctrl code escape
|= vib=tape
^- tape
- ?@ vib
+ ?~ vib
~
?: =('\\' i.vib)
['\\' '\\' $(vib t.vib)]
@@ -2595,7 +2677,7 @@
++ trim :: tape split
|= [a=@ b=tape]
^- [p=tape q=tape]
- ?@ b
+ ?~ b
[~ ~]
?: =(0 a)
[~ b]
@@ -2777,10 +2859,10 @@
%+ weld
q.p.tac
|- ^- tape
- ?@ q.tac
+ ?~ q.tac
r.p.tac
=+ voz=$(q.tac t.q.tac)
- (weld ram(tac i.q.tac) ?@(t.q.tac voz (weld p.p.tac voz)))
+ (weld ram(tac i.q.tac) ?~(t.q.tac voz (weld p.p.tac voz)))
==
::
++ win
@@ -2792,15 +2874,15 @@
%palm
?: fit
(rig ram)
- ?@ q.tac
+ ?~ q.tac
(rig q.p.tac)
- ?@ t.q.tac
+ ?~ t.q.tac
(rig(tab (add 2 tab), lug $(tac i.q.tac)) q.p.tac)
=> .(q.tac `(list tank)`q.tac)
=+ lyn=(mul 2 (lent q.tac))
=+ ^= qyr
|- ^- wall
- ?@ q.tac
+ ?~ q.tac
lug
%= ^$
tac i.q.tac
@@ -2814,7 +2896,7 @@
(rig ram)
=+ ^= gyl
|- ^- wall
- ?@ q.tac
+ ?~ q.tac
?:(=(%$ r.p.tac) lug (rig r.p.tac))
^$(tac i.q.tac, lug $(q.tac t.q.tac), tab din)
?: =(%$ q.p.tac)
@@ -2834,7 +2916,7 @@
:- (runt [(sub tab 2) ' '] ['\\' '/' (weld p.mut `_hom`['\\' '/' ~])])
=> .(hom q.mut)
|-
- ?@ hom
+ ?~ hom
:- %+ runt
[(sub tab 2) ' ']
['\\' '/' (runt [(sub edg tab) ' '] ['\\' '/' ~])]
@@ -2845,15 +2927,15 @@
++ wig
|= hom=tape
^- wall
- ?@ lug
+ ?~ lug
(rig hom)
=+ lin=(lent hom)
=+ wug=:(add 1 tab lin)
?. =+ mir=i.lug
- |- ?@ mir
+ |- ?~ mir
|
?|(=(0 wug) ?&(=(' ' i.mir) $(mir t.mir, wug (dec wug))))
- (rig hom)
+ (rig hom) :: ^ XX regular form?
[(runt [tab ' '] (weld hom `tape`[' ' (slag wug i.lug)])) t.lug]
--
--
@@ -3292,7 +3374,7 @@
++ slay
|= txt=@ta ^- (unit coin)
=+ vex=((full nuck:so) [[1 1] (trip txt)])
- ?@ q.vex
+ ?~ q.vex
~
[~ p.u.q.vex]
::
@@ -3308,7 +3390,7 @@
|= [a=tape] :: parse tape to rege
^- (unit rege)
=+ foo=((full anns) [[1 1] a])
- ?@ q.foo
+ ?~ q.foo
~
[~ p.u.q.foo]
::
@@ -3902,15 +3984,16 @@
[%2 tax]
?: ?=(^ -.fol)
=+ hed=$(fol -.fol)
- ?: ?=(2 -.hed)
+ ?: ?=(%2 -.hed)
hed
=+ tal=$(fol +.fol)
?- -.tal
- 0 ?-(-.hed 0 [%0 p.hed p.tal], 1 hed)
- 1 ?-(-.hed 0 tal, 1 [%1 (weld p.hed p.tal)])
- 2 tal
+ %0 ?-(-.hed %0 [%0 p.hed p.tal], %1 hed)
+ %1 ?-(-.hed %0 tal, %1 [%1 (weld p.hed p.tal)])
+ %2 tal
==
- ?- fol
+ ?+ fol
+ [%2 tax]
::
[0 b=@]
?: =(0 b.fol) [%2 tax]
@@ -3922,25 +4005,26 @@
[1 b=*]
[%0 b.fol]
::
- [2 b=^ c=*]
- =+ ben=$(fol [b.fol c.fol])
- ?. ?=(0 -.ben) ben
+ [2 b=[^ *]]
+ =+ ben=$(fol b.fol)
+ ?. ?=(%0 -.ben) ben
?>(?=(^ p.ben) $(sub -.p.ben, fol +.p.ben))
+:: ?>(?=(^ p.ben) $([sub fol] p.ben)
::
[3 b=*]
=+ ben=$(fol b.fol)
- ?. ?=(0 -.ben) ben
+ ?. ?=(%0 -.ben) ben
[%0 .?(p.ben)]
::
[4 b=*]
=+ ben=$(fol b.fol)
- ?. ?=(0 -.ben) ben
+ ?. ?=(%0 -.ben) ben
?. ?=(@ p.ben) [%2 tax]
[%0 .+(p.ben)]
::
[5 b=*]
=+ ben=$(fol b.fol)
- ?. ?=(0 -.ben) ben
+ ?. ?=(%0 -.ben) ben
?. ?=(^ p.ben) [%2 tax]
[%0 =(-.p.ben +.p.ben)]
::
@@ -3951,21 +4035,19 @@
[8 b=* c=*] $(fol =>(fol [7 [[0 1] b] c]))
[9 b=* c=*] $(fol =>(fol [7 c 0 b]))
[10 @ c=*] $(fol c.fol)
- [10 [* c=*] d=*]
+ [10 [b=* c=*] d=*]
=+ ben=$(fol c.fol)
- ?. ?=(0 -.ben) ben
- ?: ?=(?(%hunk %lose %mean %spot) +<-.fol)
- $(fol d.fol, tax [[+<-.fol p.ben] tax])
+ ?. ?=(%0 -.ben) ben
+ ?: ?=(?(%hunk %lose %mean %spot) b.fol)
+ $(fol d.fol, tax [[b.fol p.ben] tax])
$(fol d.fol)
::
[11 b=*]
=+ ben=$(fol b.fol)
- ?. ?=(0 -.ben) ben
+ ?. ?=(%0 -.ben) ben
=+ val=(sky p.ben)
- ?@(val [%1 p.ben ~] [%0 +.val])
+ ?~(val [%1 p.ben ~] [%0 u.val])
::
- *
- [%2 tax]
==
::
++ mock
@@ -4172,7 +4254,7 @@
!!
$(lub res, tez [(end 3 meg lub) tez])
::
-++ role :: line list to atom
+++ roly :: line list to atom
|= tez=(list ,@t)
(rap 3 (turn tez |=(a=@t (cat 3 a 10))))
::
@@ -4189,7 +4271,7 @@
::
%c
=+ dst=(lore ((hard ,@) src))
- %- role
+ %- roly
?+ -.q.don ~|(%unsupported !!)
%a ((hard (list ,@t)) q.q.don)
%c (lurk dst p.q.don)
@@ -4227,7 +4309,7 @@
?+ pum ~|(%unsupported !!)
%a dst
%b (jam dst)
- %c (role ((hard (list ,@)) dst))
+ %c (roly ((hard (list ,@)) dst))
==
::
++ lurk :: apply list patch
@@ -5050,6 +5132,10 @@
=+ c=(raw (met 0 b))
?:((lth c b) c $(a +(a)))
::
+ ++ rads :: random continuation
+ |= b=@
+ =+ r=(rad b)
+ [+>.$(a (shas %og-s r)) r]
++ raw :: random bits
~/ %raw
|= b=@ ^- @
@@ -5063,6 +5149,10 @@
?: (lth b 256)
[[b (end 0 b d)] ~]
[[256 d] $(c d, b (sub b 256))]
+ ++ raws :: random bits continuation
+ |= b=@
+ =+ r=(raw b)
+ [+>.$(a (shas %og-s r)) r]
--
++ shaz :: sha-512
|= ruz=@ ^- @
@@ -5737,6 +5827,7 @@
::
++ slit
|= [gat=type sam=type]
+ ?> (~(nest ut (~(peek ut gat) %free 6)) & sam)
(~(play ut [%cell gat sam]) [%cncl [~ 2] [~ 3]])
::
++ slym
@@ -5758,23 +5849,27 @@
~(duck ut typ)
::
++ spat |=(pax=path (rap 3 (spud pax)))
-++ spuc
+++ spec :: reconstruct type
|= vax=vase
^- vase
:_ q.vax
- ~& %spec-in
- =- ~& %spec-out
- foo
- ^= foo ^- type
?@ q.vax (~(fuse ut p.vax) [%atom %$])
- ?@ -.q.vax (~(fuse ut p.vax) [%cell [%cube -.q.vax [%atom %$]] %noun])
+ ?@ -.q.vax
+ ^= typ
+ %- ~(play ut p.vax)
+ [%wtgr [%wtts [%leaf %tas -.q.vax] [%$ 2]~] [%$ 1]]
(~(fuse ut p.vax) [%cell %noun %noun])
::
-++ spec
- |= vax=vase
- vax
-::
++ spud |=(pax=path ~(ram re (dish:ut [~ %path] pax)))
+++ slew
+ |= [axe=@ vax=vase] ^- (unit vase)
+ ?. |- ^- ?
+ ?: =(1 axe) &
+ ?. ?=(^ q.vax) |
+ $(axe (mas axe), q.vax .*(q.vax [0 (cap axe)]))
+ ~
+ `[(~(peek ut p.vax) %free axe) .*(q.vax [0 axe])]
+::
++ slot
|= [axe=@ vax=vase] ^- vase
[(~(peek ut p.vax) %free axe) .*(q.vax [0 axe])]
@@ -5859,7 +5954,7 @@
::
[%fern *]
|- ^- twig
- ?@ t.p.sec
+ ?~ t.p.sec
^$(sec i.p.sec)
[%wtcl [%bczp %bean] ^$(sec i.p.sec) $(p.sec t.p.sec)]
::
@@ -5868,7 +5963,7 @@
::
[%kelp *]
|- ^- twig
- ?@ t.p.sec
+ ?~ t.p.sec
^$(sec i.p.sec)
[%wtcl [%bczp %bean] ^$(sec i.p.sec) $(p.sec t.p.sec)]
::
@@ -5952,7 +6047,7 @@
::
[%fern *]
|- ^- twig
- ?@ t.p.sec
+ ?~ t.p.sec
^$(sec i.p.sec)
:+ %tsls
^$(sec i.p.sec)
@@ -5968,7 +6063,7 @@
[%kelp *]
%- tun |= gon=* => .(nag gon)
|- ^- twig
- ?@ t.p.sec
+ ?~ t.p.sec
:- [%dtzz +.p.i.p.sec]
^^$(axe (peg axe 3), sec q.i.p.sec, nag &)
:^ %wtcl
@@ -6118,7 +6213,7 @@
:- %clsg
=+ nob=`(list twig)`~
|- ^- (list twig)
- ?@ r.gen
+ ?~ r.gen
nob
[[[%dtzz %$ p.i.r.gen] [%zpts q.i.r.gen]] $(r.gen t.r.gen)]
s.gen
@@ -6261,7 +6356,7 @@
::
[%wtbr *]
|-
- ?@(p.gen [%dtzz %f 1] [%wtcl i.p.gen [%dtzz %f 0] $(p.gen t.p.gen)])
+ ?~(p.gen [%dtzz %f 1] [%wtcl i.p.gen [%dtzz %f 0] $(p.gen t.p.gen)])
::
[%wtdt *] [%wtcl p.gen r.gen q.gen]
[%wtgl *] [%wtcl p.gen [%zpzp ~] q.gen]
@@ -6269,7 +6364,7 @@
[%wtkt *] [%wtcl [%wtts [%axil %atom %$] p.gen] r.gen q.gen]
[%wthp *]
|-
- ?@ q.gen
+ ?~ q.gen
[%zpfs [%cnzz p.gen]]
:^ %wtcl
[%wtts p.i.q.gen p.gen]
@@ -6279,7 +6374,7 @@
[%wtls *] [%wthp p.gen (weld r.gen `_r.gen`[[[%axil %noun] q.gen] ~])]
[%wtpm *]
|-
- ?@(p.gen [%dtzz %f 0] [%wtcl i.p.gen $(p.gen t.p.gen) [%dtzz %f 1]])
+ ?~(p.gen [%dtzz %f 0] [%wtcl i.p.gen $(p.gen t.p.gen) [%dtzz %f 1]])
::
[%wtpt *] [%wtcl [%wtts [%axil %atom %$] p.gen] q.gen r.gen]
[%wtsg *] [%wtcl [%wtts [%axil %null] p.gen] q.gen r.gen]
@@ -6632,8 +6727,8 @@
:+ %rose
[['/' ~] ['/' ~] ~]
|- ^- (list tank)
- ?@ lum
- ?>(?=(~ lum) ~)
+ ?~ lum ~
+ ?@ lum !!
?> ?=(@ -.lum)
[[%leaf (rip 3 -.lum)] $(lum +.lum)]
::
@@ -6646,8 +6741,8 @@
:+ %rose
[[' ' ~] ['<' '|' ~] ['|' '>' ~]]
|- ^- (list tank)
- ?@ lum
- ?>(?=(~ lum) ~)
+ ?~ lum ~
+ ?@ lum !!
[[%leaf (trip ((hard ,@) -.lum))] $(lum +.lum)]
::
%wool
@@ -6655,8 +6750,8 @@
:+ %rose
[[' ' ~] ['<' '<' ~] ['>' '>' ~]]
|- ^- (list tank)
- ?@ lum
- ?>(?=(~ lum) ~)
+ ?~ lum ~
+ ?@ lum !!
[(need ^$(q.ham %yarn, lum -.lum)) $(lum +.lum)]
::
%yarn
@@ -7174,7 +7269,7 @@
=+ goy=(~(tap by rud) ~)
=+ waf=dab
|- ^+ dab
- ?@ goy
+ ?~ goy
waf
~| [%hang-on p.i.goy]
=+ yeq=(~(get by dab) p.i.goy)
@@ -7323,8 +7418,12 @@
::
[%dtwt *] [(nice bool) [%3 q:$(gen p.gen, gol %noun)]]
[%ktbr *] =+(vat=$(gen p.gen) [(wrap(sut p.vat) %iron) q.vat])
+ ::
[%ktls *]
=+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)])
+ ::
+ [%kthx *]
+ =+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)])
::
[%ktpm *] =+(vat=$(gen p.gen) [(wrap(sut p.vat) %zinc) q.vat])
[%ktsg *]
@@ -7463,7 +7562,7 @@
=- [(nice (fire p.yom)) (fire(vet |) q.yom)]
^= yom
|- ^- [p=(list ,[p=type q=foot]) q=(list ,[p=type q=foot])]
- ?@ mew
+ ?~ mew
[q.q.lar q.q.vug]
=+ zil=^$(gen q.i.mew, gol %noun)
=+ cuf=(tock p.i.mew p.zil q.q.lar)
@@ -7489,6 +7588,10 @@
[%ktls *]
=+ hif=[p=(nice (play p.gen)) q=(play(sut dox) p.gen)]
=+($(gen q.gen, gol p.hif) hif)
+ ::
+ [%kthx *]
+ =+ hif=[p=(nice (play p.gen)) q=(play(sut dox) p.gen)]
+ =+($(gen q.gen, gol p.hif) hif)
::
[%ktpm *]
=+(vat=$(gen p.gen) [(wrap(sut p.vat) %zinc) (wrap(sut q.vat) %zinc)])
@@ -7827,7 +7930,7 @@
=+ rag=q.q.lar
%- fire
|- ^- (list ,[p=type q=foot])
- ?@ mew
+ ?~ mew
rag
$(mew t.mew, rag q:(tock p.i.mew ^$(gen q.i.mew) rag))
[%dtkt *] %noun
@@ -7838,6 +7941,7 @@
[%dtts *] bool
[%dtwt *] bool
[%ktbr *] (wrap(sut $(gen p.gen)) %iron)
+ [%kthx *] $(gen p.gen)
[%ktls *] $(gen p.gen)
[%ktpm *] (wrap(sut $(gen p.gen)) %zinc)
[%ktsg *] $(gen p.gen)
@@ -7979,7 +8083,7 @@
=- [(need p.wib) q.wib]
^= wib
|- ^- [p=(unit axis) q=(list ,[p=type q=foot])]
- ?@ men
+ ?~ men
[*(unit axis) ~]
=+ geq=(tack(sut p.i.men) peh mur)
=+ mox=$(men t.men)
@@ -8221,9 +8325,9 @@
[a e]
;~ plug
fry
- ;~(pose (stag ~ ;~(pfix fas sym)) (easy ~))
- ;~(pose (stag ~ ;~(pfix pat sym)) (easy ~))
- ;~(pose (stag ~ ;~(pfix dot (stag %smdq soil))) (easy ~))
+ ;~(pose (stag ~ ;~(pfix dot sym)) (easy ~))
+ ;~(pose (stag ~ ;~(pfix hax sym)) (easy ~))
+ ;~(pose (stag ~ ;~(pfix fas (stag %smdq soil))) (easy ~))
;~ pose
%+ ifix [pel per]
%+ more ;~(plug com ace)
@@ -8687,6 +8791,7 @@
['.' (rune dot %ktdt expb)]
['-' (rune hep %kthp expo)]
['+' (rune lus %ktls expb)]
+ ['#' (rune hax %kthx expb)]
['&' (rune pam %ktpm expa)]
['~' (rune sig %ktsg expa)]
['=' (rune tis %ktts expg)]
@@ -9098,9 +9203,13 @@
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::: :::::: volume 3, Arvo models and skeleton ::::::
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
+!:
|%
++ arch ,[p=@uvI q=(unit ,@uvI) r=(map ,@ta ,~)] :: fundamental node
-++ bead ,[[p=ship q=desk r=case] s=path] :: global name
+++ arvo (mold ,[p=term q=mill] mill) :: arvo card
+++ beam ,[[p=ship q=desk r=case] s=path] :: global name
+++ beak ,[p=ship q=desk r=case] :: garnish with beak
+++ bone ,@ud :: opaque duct
++ care ?(%$ %u %v %w %x %y %z) :: namespace mode
++ case :: version
$% [%da p=@da] :: date
@@ -9108,9 +9217,10 @@
[%ud p=@ud] :: sequence
== ::
++ desk ,@tas :: ship desk case spur
-++ cage ,[p=lode q=vase] :: structured data
+++ cage (cask vase) :: global metadata
+++ cask |*(a=$+(* *) (pair logo a)) :: global data
++ cuff :: permissions
- $: p=(unit (set monk)) :: readers
+ $: p=kirk :: readers
q=(set monk) :: authors
== ::
++ curd ,[p=@tas q=*] :: typeless card
@@ -9127,15 +9237,30 @@
[%se p=gene] :: set
[%sy p=@tas q=gene r=gene] :: symbolic declare
[%un p=gene] :: unit
- [%va p=@tas] :: symbolic reference
+ [%va p=@tas] :: symbolic reference
== ::
++ glob ,[p=logo q=ship r=mark] :: global brand
++ herd (hypo curd) :: typed card
+++ hide :: standard app state
+ $: $: our=ship :: owner/operator
+ app=@tas :: app identity
+ == ::
+ sup=(map bone (pair ship path)) :: subscription set
+ $: act=@ud :: change number
+ eny=@uvI :: entropy
+ lat=@da :: date of last tick
+ == == ::
++ hilt ?(0 1 2) :: lead iron gold
++ hypo |*(a=$+(* *) (pair type a)) :: type associated
+++ hobo |* a=$+(* *) :: kiss wrapper
+ $? $% [%soft p=*] ::
+ == ::
+ a ::
+ == ::
+++ kirk (unit (set monk)) :: audience
++ khan ,[p=@tas q=path] :: foreign identity
++ lens :: observation core
- $_ ^? ::
+ $_ ^? ::
|% ++ u *(unit (unit ,~)) :: existence
++ v *(unit (unit cage)) :: full history
++ w *(unit (unit (unit cage))) :: latest diff
@@ -9144,32 +9269,31 @@
++ z *(unit (unit cage)) :: current subtree
-- ::
++ logo ,@tas :: content type
-++ lode $|(@tas [p=lode q=lode]) :: constructed logos
++ mark ,@uvH :: type by core hash
++ mill (each vase milt) :: vase/metavase
++ milt ,[p=* q=*] :: metavase
++ monk (each ship khan) :: general identity
-++ mold :: general action
- |* [a=$+(* *) b=$+(* *)] :: new move
- $% [%toss p=term q=path r=a] :: advance
- [%slip p=term q=a] :: lateral
+++ mold :: new kernel action
+ |* [a=$+(* *) b=$+(* *)] :: forward/reverse
+ $% [%pass p=path q=a] :: advance
+ [%slip p=a] :: lateral
[%sick p=b] :: lame refactoring
[%give p=b] :: retreat
== ::
-++ muse ,[p=@tas q=duct r=(mold mill mill)] :: sourced move
-++ mosh ,[p=duct q=(mold curd curd)] :: vane move
-++ move ,[p=duct q=(mold mill mill)] :: arvo move
+++ muse ,[p=@tas q=duct r=arvo] :: sourced move
+++ move ,[p=duct q=arvo] :: arvo move
++ ovum ,[p=wire q=curd] :: typeless ovum
++ pane (list ,[p=@tas q=vase]) :: kernel modules
++ pone (list ,[p=@tas q=vise]) :: kernel modules, old
++ ship ,@p :: network identity
-++ sled $+ [(unit (set monk)) term bead] :: namespace function
+++ sled $+ [(unit (set monk)) term beam] :: namespace function
(unit (unit cage)) ::
++ slut $+(* (unit (unit))) :: old namespace
++ vile :: reflexive constants
$: typ=type :: -:!>(*type)
+ duc=type :: -:!>(*duct)
+ pah=type :: -:!>(*path)
mev=type :: -:!>([%meta *vase])
- moh=type :: -:!>(*(list mosh))
== ::
++ wire path :: event pretext
::::: hacks
@@ -9200,7 +9324,7 @@
++ slub !:
|= sul=slut
^- sled
- |= [fur=(unit (set monk)) ron=term bed=bead]
+ |= [fur=(unit (set monk)) ron=term bed=beam]
^- (unit (unit cage))
=+ ^= pax ^- path
:* ron
@@ -9216,8 +9340,8 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 3bE, Arvo core ::
::
-++ vent :: vane core
- |= [vil=vile bud=vase ves=vase]
+++ vent !: :: vane core
+ |= [lal=@tas vil=vile bud=vase ves=vase]
|%
++ ruck :: update vase
|= [pax=path txt=@ta]
@@ -9230,7 +9354,6 @@
::
++ wink :: deploy
|= [now=@da eny=@ ski=sled]
- :: =+ rig=(slym ves [now eny (slub sky)]) :: activate vane
=+ rig=(slym ves +<) :: activate vane
|%
++ doze
@@ -9241,85 +9364,124 @@
++ sike :: check metatype
|= [sub=type ref=*]
^- ?
- ?: =(~ ~) &
+ :: ?: =(~ ~) &
=+ gat=|=([a=type b=type] (~(nest ut a) | b))
(,? .*(gat(+< [sub ref]) -.gat))
::
+ ++ slid
+ |= [hed=mill tal=mill]
+ ^- mill
+ ?: &(?=(& -.hed) ?=(& -.tal))
+ [%& (slop p.hed p.tal)]
+ [%| [%cell p.p.hed p.p.tal] [q.p.hed q.p.tal]]
+ ::
+ ++ slix
+ |= hil=mill
+ ^- mill
+ ?- -.hil
+ & [%& (slop [typ.vil p.p.hil] p.hil)]
+ | [%| [%cell typ.vil p.p.hil] p.hil]
+ ==
+ ::
+ ++ slur
+ |= [gat=vase hil=mill]
+ ^- (unit vase)
+ =+ sam=(slot 6 gat)
+ ?. ?- -.hil
+ & (souk p.sam p.p.hil)
+ | (sike p.sam p.p.hil)
+ == ~
+ `(slym gat +>.hil)
+ ::
++ souk :: check type
|= [sub=type ref=type]
- ?: =(~ ~) &
+ :: ?: =(~ ~) &
(~(nest ut sub) | ref)
::
++ sunk :: type is cell
|= ref=type
- ?: =(~ ~) &
+ :: ?: =(~ ~) &
(souk [%cell %noun %noun] ref)
::
++ song :: reduce metacard
|= mex=vase :: mex: vase of card
- ^- mill ::
- ?. (sunk p.mex) :: a card is a cell
- ~& %song-a !!
- ?. ?=(%meta -.q.mex) [%& mex] :: ordinary card
+ ^- (unit mill) ::
+ ?. (sunk p.mex) ~ :: a card is a cell
+ ?. ?=(%meta -.q.mex) `[%& mex] :: ordinary card
=+ tiv=(slot 3 mex) :: tiv: vase of vase
- ?. (sunk p.tiv) :: a vase is a cell
- ~& %song-b !! ::
- ?. (souk typ.vil p:(slot 2 tiv)) :: vase head is type
- ~& %song-c !! ::
- =+ mut=(,[p=* q=*] q.tiv) :: card type, value
- :- %| :: metacard
- |- ^- [p=* q=*] ::
- ?. ?=([%meta p=* q=[p=* q=*]] q.mut) mut :: ordinary metacard
- ?. (sike mev.vil p.mut) :: meta-metacard
- ~& %song-d !! ::
+ ?. (sunk p.tiv) ~ :: a vase is a cell
+ ?. (souk typ.vil p:(slot 2 tiv)) ~ :: vase head is type
+ %- biff :_ |=(a=milt `[%| a]) :: milt to mill
+ =+ mut=(milt q.tiv) :: card type, value
+ |- ^- (unit milt) ::
+ ?. ?=([%meta p=* q=milt] q.mut) `mut :: ordinary metacard
+ ?. (sike mev.vil p.mut) ~ :: meta-metacard
$(mut q.mut) :: descend into meta
::
- ++ spuc
- |= vax=vase
- vax
- ::
- ++ sump
+ ++ sump :: vase to move
|= wec=vase
- ^- move
- :- ((hard duct) -.q.wec)
+ ^- (unit move)
+ %+ biff ((soft duct) -.q.wec)
+ |= a=duct
+ %- bind :_ |=(b=arvo `move`[a b])
+ =- ?- -.har
+ | ~& [%dead-card p.har] ~ :: XX properly log?
+ & (some p.har)
+ ==
+ ^= har ^- (each arvo term)
=+ caq=(spec (slot 3 wec))
- ?+ q.caq ~&(%sump-bad !!)
+ ?+ q.caq [%| (cat 3 %funk (,@tas q.caq))]
::
- [%toss p=@tas q=* r=[p=@tas q=*]]
- :^ %toss (need ((sand %tas) ((hard ,@) p.q.caq)))
- ((hard path) q.q.caq)
- (song (spec (slot 15 caq)))
+ [%pass p=* q=@tas r=[p=@tas q=*]]
+ %- (bond |.([%| p.r.q.caq]))
+ %+ biff ((soft ,@) q.q.caq)
+ |= lal=@tas
+ ?. ((sane %tas) lal) ~
+ %+ biff ((soft path) p.q.caq)
+ |= pax=path
+ %+ bind (song (spec (slot 15 caq)))
+ |= hil=mill
+ [%& %pass pax lal hil]
::
[%give p=[p=@tas q=*]]
- [%give (song (spec (slot 3 caq)))]
+ %- (bond |.([%| p.p.q.caq]))
+ %+ bind (song (spec (slot 3 caq)))
+ |= hil=mill
+ [%& %give hil]
::
[%sick p=[p=@tas q=*]]
- [%sick (song (slot 3 caq))]
+ %- (bond |.([%| p.p.q.caq]))
+ %+ bind (song (spec (slot 3 caq)))
+ |= hil=mill
+ [%& %sick hil]
::
[%slip p=@tas q=[p=@tas q=*]]
- :+ %slip
- (need ((sand %tas) ((hard ,@) p.q.caq)))
- (song (spec (slot 7 caq)))
+ %- (bond |.([%| p.q.q.caq]))
+ %+ biff ((soft ,@) p.q.caq)
+ |= lal=@tas
+ ?. ((sane %tas) lal) ~
+ %+ bind (song (spec (slot 7 caq)))
+ |= hil=mill
+ [%& %slip lal hil]
==
::
- ++ said
+ ++ said :: vase to (list move)
|= vud=vase
- :: ?. (~(nest ut moh.vil) | p.vud) !!
|- ^- (list move)
?: =(~ q.vud) ~
- [(sump (slot 2 vud)) $(vud (slot 3 vud))]
+ [(need (sump (slot 2 vud))) $(vud (slot 3 vud))]
::
- ++ scry
+ ++ scry :: read namespace
|= $: fur=(unit (set monk))
ren=care
- bed=bead
+ bed=beam
==
^- (unit (unit cage))
=+ ^= old
:* fur
ren
p.bed
- q.bed
+ q.bed
`coin`[%$ r.bed]
(flop s.bed)
==
@@ -9328,41 +9490,53 @@
?~ q.pro ~
?~ +.q.pro [~ ~]
=+ dat=(slot 7 pro)
- [~ ~ (lode q.dat) (slot 3 dat)]
+ [~ ~ (logo q.dat) (slot 3 dat)]
::
- ++ soar :: postprocess vane
+ ++ soar :: scrub vane
|= sev=vase
^- vase
?: &(=(-.q.ves -.q.sev) =(+>.q.ves +>.q.sev))
- ves
- sev(+<.q [_@da _@ =>(~ |+(* ~))]) :: cure memory leak
+ ves :: unchanged, use old
+ sev(+<.q [_@da _@ =>(~ |+(* ~))]) :: clear to stop leak
::
++ swim
- |= $: pux=(unit wire)
+ |= $: org=@tas
+ pux=(unit wire)
hen=duct
hil=mill
==
^- [p=(list move) q=vase]
- =+ ^= pro
+ =+ ^= pru
?~ pux
- (slym (slap rig [%cnzy %call]) [hen +.hil])
- (slym (slap rig [%cnzy %take]) [u.pux hen +.hil])
+ %+ slur (slap rig [%cnzy %call])
+ (slid [%& duc.vil hen] (slix hil))
+ %+ slur (slap rig [%cnzy %take])
+ ;: slid
+ [%& pah.vil u.pux]
+ [%& duc.vil hen]
+ (slix (slid [%& [%cube org %atom %tas] org] hil))
+ ==
+ ?~ pru
+ ~& [%swim-lost lal (,@tas +>-.hil)]
+ [~ ves]
+ =+ pro=(need pru)
:- (said (slap pro [%cnzy %p]))
(soar (slap pro [%cnzy %q]))
--
--
::
++ vint :: create vane
- |= [vil=vile bud=vase pax=path txt=@ta] ::
- (vent vil bud (slym (slap bud (rain pax txt)) bud))
+ |= [lal=@tas vil=vile bud=vase pax=path txt=@ta] ::
+ (vent lal vil bud (slym (slap bud (rain pax txt)) bud))
::
++ viol :: vane tools
|= but=type
^- vile
=+ pal=|=(a=@t ^-(type (~(play ut but) (vice a))))
:* typ=(pal '_type')
+ duc=(pal '_duct')
+ pah=(pal '_path')
mev=(pal '_[%meta vase]')
- moh=(pal '_(list mosh)')
==
::
++ is :: operate in time
@@ -9370,15 +9544,15 @@
|_ now=@da
++ beck
^- sled
- |= [fur=(unit (set monk)) ron=term bed=bead]
+ |= [fur=(unit (set monk)) ron=term bed=beam]
^- (unit (unit cage))
=> .(fur ?^(fur fur `[[%& p.bed] ~ ~])) :: XX heinous
- =+ dis=(end 3 1 ron)
+ =+ lal=(end 3 1 ron)
=+ ren=(care (rsh 3 1 ron))
|- ^- (unit (unit cage))
?~ fan ~
- ?. =(dis p.i.fan) $(fan t.fan)
- %- scry:(wink:(vent vil bud q.i.fan) now (shax now) ..^$)
+ ?. =(lal p.i.fan) $(fan t.fan)
+ %- scry:(wink:(vent lal vil bud q.i.fan) now (shax now) ..^$)
[fur ren bed]
::
++ dink :: vase by char
@@ -9398,23 +9572,34 @@
::
++ doos :: sleep until
|= hap=path ^- (unit ,@da)
- (doze:(wink:(vent vil bud (dink (dint hap))) now 0 beck) now [hap ~])
+ =+ lal=(dint hap)
+ (doze:(wink:(vent lal vil bud (dink lal)) now 0 beck) now [hap ~])
::
++ hurl :: start loop
- |= ovo=ovum
+ |= [lac=? ovo=ovum]
+ ~? &(!lac !=(%belt -.q.ovo)) [%unix -.q.ovo p.ovo]
^- [p=(list ovum) q=(list ,[p=@tas q=vase])]
?> ?=(^ p.ovo)
- (kick [i.p.ovo ~ [%toss (dint p.ovo) t.p.ovo [%& %noun q.ovo]]]~)
+ %+ kick lac
+ :~ :* i.p.ovo
+ ~
+ :^ %pass t.p.ovo
+ (dint p.ovo)
+ :+ %&
+ [%cell [%cube %soft [%atom %tas]] %noun]
+ [%soft q.ovo]
+ ==
+ ==
::
++ race :: take
- |= [pux=(unit wire) hen=duct hil=mill ves=vase]
+ |= [org=@tas lal=@tas pux=(unit wire) hen=duct hil=mill ves=vase]
^- [p=(list move) q=vase]
- =+ ven=(vent vil bud ves)
+ =+ ven=(vent lal vil bud ves)
=+ win=(wink:ven now (shax now) beck)
- (swim:win pux hen hil)
+ (swim:win org pux hen hil)
::
++ fire :: execute
- |= [lal=term pux=(unit wire) hen=duct hil=mill]
+ |= [org=term lal=term pux=(unit wire) hen=duct hil=mill]
?: &(?=(^ pux) ?=(~ hen))
[[[[lal u.pux] (curd +>.hil)]~ ~] fan]
=+ naf=fan
@@ -9423,43 +9608,46 @@
?. =(lal p.i.naf)
=+ tuh=$(naf t.naf)
[-.tuh [i.naf +.tuh]]
- =+ fiq=(race pux hen hil q.i.naf)
+ =+ fiq=(race org lal pux hen hil q.i.naf)
[[~ (turn p.fiq |=(a=move [lal a]))] [[p.i.naf q.fiq] t.naf]]
::
++ jack :: dispatch card
- |= gum=muse
+ |= [lac=? gum=muse]
^- [[p=(list ovum) q=(list muse)] _fan]
- %- fire
+ %+ fire
+ p.gum
?- -.r.gum
- %toss
- :: ~& [%toss (,@tas +>-.r.r.gum)]
- [p.r.gum ~ [[p.gum q.r.gum] q.gum] r.r.gum]
+ %pass
+ ~? &(!lac !=(%$ p.gum))
+ :^ %pass [p.gum p.q.r.gum]
+ p.r.gum
+ q.gum
+ [p.q.r.gum ~ [[p.gum p.r.gum] q.gum] q.q.r.gum]
::
%give
?> ?=(^ q.gum)
?> ?=(^ i.q.gum)
- :: ~& [%give (,@tas +>-.p.r.gum)]
+ ~? &(!lac |(!=(%blit +>-.p.r.gum) !=(%d p.gum)))
+ [%give p.gum (,@tas +>-.p.r.gum) `duct`q.gum]
[i.i.q.gum [~ t.i.q.gum] t.q.gum p.r.gum]
::
%slip
- :: ~& [%slip (,@tas +>-.q.r.gum)]
- [p.r.gum ~ q.gum q.r.gum]
+ ~? !lac [%slip p.gum (,@tas +>-.q.p.r.gum) q.gum]
+ [p.p.r.gum ~ q.gum q.p.r.gum]
::
%sick
?> ?=(^ q.gum)
?> ?=(^ i.q.gum)
- :: ~& [%sick (,@tas +>-.p.r.gum)]
+ ~? !lac [%sick p.gum (,@tas +>-.p.r.gum) `duct`q.gum]
[i.i.q.gum ?~(t.i.q.gum ~ [~ t.i.q.gum]) t.q.gum p.r.gum]
==
::
++ kick :: new main loop
- |= mor=(list muse)
+ |= [lac=? mor=(list muse)]
=| ova=(list ovum)
- :: ~& %kick
|- ^- [p=(list ovum) q=(list ,[p=@tas q=vase])]
- :: ~& %kick-loop
?~ mor [(flop ova) fan]
- =^ nyx fan (jack i.mor)
+ =^ nyx fan (jack lac i.mor)
$(ova (weld p.nyx ova), mor (weld q.nyx t.mor))
--
--
@@ -9469,10 +9657,10 @@
=+ pit=`vase`!>(.) ::
=+ bud=pit :: becomes tang
=+ vil=(viol p.bud) :: cached reflexives
-=| eny=@ :: entropy
-=| fan=(list ,[p=@tas q=vase]) ::
-=| hom=path :: source path
-=| haz=@uw :: hash
+=| $: lac=? :: laconic bit
+ eny=@ :: entropy
+ fan=(list ,[p=@tas q=vase]) :: modules
+ == ::
=< |%
++ come |= [@ (list ovum) pone] :: 11
^- [(list ovum) _+>]
@@ -9489,12 +9677,16 @@
++ poke |= * :: 42
^- [(list ovum) *]
=> .(+< ((hard ,[now=@da ovo=ovum]) +<))
+ ?: =(%verb -.q.ovo)
+ [~ +>.$(lac !lac)]
?: ?=(%veer -.q.ovo)
[~ +>.$(+ (veer now q.ovo))]
=^ ova +>+ (^poke now ovo)
|- ^- [(list ovum) *]
?~ ova
[~ +>.^$]
+ ?: ?=(%verb -.q.i.ova)
+ $(ova t.ova, lac !lac)
?: ?=(%veer -.q.i.ova)
$(ova t.ova, +>+.^$ (veer now q.i.ova))
?: ?=(%vega -.q.i.ova)
@@ -9522,6 +9714,8 @@
|- ^+ [ova +>.^$]
?~ ova
[~ +>.^$]
+ ?: ?=(%verb -.q.i.ova)
+ $(ova t.ova, lac !lac)
?: ?=(%veer -.q.i.ova)
$(ova t.ova, +>.^$ (veer _@da q.i.ova))
=+(avo=$(ova t.ova) [[i.ova -.avo] +.avo])
@@ -9541,7 +9735,7 @@
:: ~& [%poke -.q.ovo]
^- [(list ovum) _+>]
=^ zef fan
- (~(hurl (is vil eny bud fan) now) ovo)
+ (~(hurl (is vil eny bud fan) now) lac ovo)
[zef +>.$]
::
++ vega :: reboot kernel
@@ -9577,11 +9771,11 @@
|- ^+ fan
?~ fan
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
- [[lal.fav ves:(vint vil bud pax.fav txt.fav)] fan]
+ [[lal.fav ves:(vint lal.fav vil bud pax.fav txt.fav)] fan]
?. =(lal.fav p.i.fan)
[i.fan $(fan t.fan)]
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
- [[p.i.fan ves:(ruck:(vent vil bud q.i.fan) pax.fav txt.fav)] t.fan]
+ [[p.i.fan ves:(ruck:(vent lal.fav vil bud q.i.fan) pax.fav txt.fav)] t.fan]
==
::
++ wish :: external compute
diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon
index bd7dee9bc..e9133a1e9 100644
--- a/arvo/zuse.hoon
+++ b/arvo/zuse.hoon
@@ -811,16 +811,17 @@
(weld (turn q.i.puy |=(a=miso [p.i.puy a])) $(puy t.puy))
::
++ alto :: alto:ze
- |= $: wek=(map path woof)
+ |= $: wek=waks
yop=(map path (list miso)) :: yop before peq
peq=(map path (list miso))
==
- =+ puy=(~(tap by yop) ~)
+ =+ puy=(~(tap by (~(gas by yop) (~(tap by peq) ~))) ~)
|- ^+ [wek peq]
?~ puy [wek peq]
=+ wof=(~(get by wek) p.i.puy)
+ =+ yoq=(~(get by yop) p.i.puy)
=+ peb=(~(get by peq) p.i.puy)
- =+ lyr=(lyre wof q.i.puy ?~(peb ~ u.peb))
+ =+ lyr=(lyre wof ?~(yoq ~ u.yoq) ?~(peb ~ u.peb))
%= $
wek ?~(-.lyr wek (~(put by wek) p.i.puy u.-.lyr))
puy t.puy
@@ -832,6 +833,12 @@
|* wig=(urge)
|= dog=woof
^+ [p=dog q=wig]
+ ?@ dog
+ !!
+ =+ dog=+.dog
+ =- [[%chan -.res] +.res]
+ ^= res
+ |- ^+ [p=dog q=wig]
?~ wig :: no more urges
=+ woo=(wode dog) :: dimensions
?> =(p.woo 0) :: line
@@ -870,6 +877,14 @@
++ lide :: merge dogs
|= [wig=woof dog=woof]
^- woof
+ ?@ dog
+ %know
+ ?@ wig
+ %know
+ =+ dog=`(list $|(@ud [p=@ud q=@ud]))`+.dog
+ =+ wig=`(list $|(@ud [p=@ud q=@ud]))`+.dog
+ :- %chan
+ |- ^- (list $|(@ud [p=@ud q=@ud]))
?~ dog wig
?~ wig dog
?^ i.dog
@@ -907,7 +922,7 @@
==
:: :: woof dimensions
++ wode
- |= dog=woof
+ |= dog=(list $|(@ud [p=@ud q=@ud]))
^- [p=@ q=@]
=+ woo=[q=0 q=0]
|- ^- [p=@ q=@]
@@ -923,6 +938,8 @@
++ lith :: initial merge points
|= wig=(urge)
^- woof
+ :- %chan
+ |- ^- (list $|(@ud [p=@ud q=@ud]))
?~ wig ~
?- -.i.wig
& [p.i.wig $(wig t.wig)]
@@ -933,19 +950,28 @@
|= [wof=woof mad=(list miso)]
^- [woof (list miso)]
?~ mad [wof ~]
- ?. &(?=(%mut -.i.mad) ?=(%c -.q.p.i.mad))
- =+ rec=$(mad t.mad)
+ ?: &(?=(%mut -.i.mad) ?=(%c -.q.p.i.mad))
+ =+ wug=((lisp p.q.p.i.mad) wof)
+ =+ rec=$(mad t.mad, wof p.wug)
+ [-.rec [[%mut [p.p.i.mad [%c q.wug]]] +.rec]]
+ ?: ?=(%mut -.i.mad)
+ ~| "Cannot generate merge with non textfile changes"
+ !!
+ ?: ?=(%del -.i.mad)
+ =+ rec=$(wof %know, mad t.mad)
[-.rec [i.mad +.rec]]
- =+ wug=((lisp p.q.p.i.mad) wof)
- =+ rec=$(mad t.mad, wof p.wug)
- [-.rec [[%mut [p.p.i.mad [%c q.wug]]] +.rec]]
+ =+ rec=$(wof %know, mad t.mad)
+ [-.rec [i.mad +.rec]]
::
++ lobo :: update woof, miso
|= [wof=woof don=miso]
^- woof
- ?. &(?=(%mut -.don) ?=(%c -.q.p.don))
- wof
- (lide wof (lith p.q.p.don))
+ ?: &(?=(%mut -.don) ?=(%c -.q.p.don))
+ (lide wof (lith p.q.p.don))
+ ?: ?=(%mut -.don)
+ ~| "Cannot generate merge with non textfile changes"
+ !!
+ %know
::
++ lyre :: put yeb before zeq
|= [wof=(unit woof) yeb=(list miso) zeq=(list miso)]
@@ -957,7 +983,10 @@
?~ wof
?: &(?=(%mut -.i.yeb) ?=(%c -.q.p.i.yeb))
$(wof (some (lith p.q.p.i.yeb)), yeb t.yeb)
- $(yeb t.yeb)
+ ?: ?=(%mut -.i.yeb)
+ ~| "Cannot generate merge with non textfile changes"
+ !!
+ $(yeb t.yeb, wof (some %know))
$(wof (some (lobo u.wof i.yeb)), yeb t.yeb)
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -997,8 +1026,8 @@
++ arum :: arum:ze
|= [wak=waks tak=(list tako) kat=(list tako)] :: hard merge
^- [waks (list tako)]
- =+ alt=(alto (awba wak) (alda tak) (alda kat))
- [(awoe -.alt) (alot +.alt)]
+ =+ alt=(alto wak (alda tak) (alda kat))
+ [-.alt (alot +.alt)]
::
++ clen
|= [shp=ship des=desk]
@@ -1040,8 +1069,7 @@
%+ turn (scag (sub let p.viq) hit) :: remove excess
|=(a=frog q.a)
?: &(?=(%fine gem) |(!=(tak ~) !=(r.viq ~)))
- ~| "Changes to local desk, to attempt automatic merge, use %mate"
- !!
+ ~
?- gem
%fine
[~ ~ lem]
@@ -1049,13 +1077,17 @@
=+ tig=(mang [arum r.viq tak kat] |=(* *(unit))) :: moves
?@ tig ~
=+ res=((hard ,[waks (list tako)]) u.tig)
- [~ ~ lem(q.q +.res)] ::, t.u.p -.res)] :: update takos, woof
+ [~ ~ lem(q.q +.res, t.u.p -.res)] :: update takos, woof
%that
+ =+ tig=(mang [arum r.viq ~ kat] |=(* *(unit)))
+ ?~ tig !!
[~ ~ lem(q.q (weld (acid p.viq) q.q.lem))]
%this
=+ tig=(need (mang [arum r.viq tak ~] |=(* *(unit))))
=+ typ=((hard ,[waks (list tako)]) tig)
- [~ ~ lem(q.q ~)] ::, t.u.p -.typ)]
+ [~ ~ lem(q.q ~, t.u.p -.typ)]
+ %conf
+ !!
==
::
++ auto :: auto:ze
@@ -1092,21 +1124,6 @@
:: ~& [%avon p.u.mys q.u.mys [%haz ted] [%too r.u.mys] [%fro s.u.mys]]
+>.$(ang ?:(=([0 0 ~] det) (~(del by ang) yek) (~(put by ang) yek det)))
::
- ++ awba :: awba:ze
- |= hoe=(list wako) :: deconstruct
- |- ^- (map path woof)
- ?~ hoe ~
- =+ hom=$(hoe t.hoe)
- (~(put by hom) p.i.hoe q.i.hoe)
- ::
- ++ awoe :: awoe:ze
- |= yop=(map path woof) :: reconstruct
- ^- (list wako)
- =+ puy=(~(tap by yop) ~)
- |- ^- (list wako)
- ?~ puy ~
- [[p.i.puy q.i.puy] $(puy t.puy)]
- ::
++ axel :: axel:ze
|= [wen=@da lem=nori] :: edit
^+ +>
@@ -1210,7 +1227,7 @@
^+ +>
?^ pax
dosh:(dose:$(pax t.pax, +> (dent i.pax)) i.pax ank)
- ~| "Failed to apply clay affect"
+ ~| %clay-fail
?- -.mis
%del
?> &(?=(^ q.ank) =(q.u.q.ank p.mis))
@@ -1951,7 +1968,7 @@
::
++ tome :: parse path
|= pax=path
- ^- (unit bead)
+ ^- (unit beam)
?. ?=([* * * *] pax) ~
%+ biff (slaw %p i.pax)
|= who=ship
@@ -1960,10 +1977,10 @@
%+ biff (slay i.t.t.pax)
|= cis=coin
?. ?=([%$ case] cis) ~
- `(unit bead)`[~ [who dex `case`p.cis] (flop t.t.t.pax)]
+ `(unit beam)`[~ [who dex `case`p.cis] (flop t.t.t.pax)]
::
-++ tope :: bead to path
- |= bem=bead
+++ tope :: beam to path
+ |= bem=beam
^- path
[(scot %p p.bem) q.bem (scot r.bem) (flop s.bem)]
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -1992,7 +2009,7 @@
++ com |=(a=@ ^?(..nu)) :: from naked pass
--
--
-++ agon (map ,[p=ship q=desk] ,[p=@ud q=@ud r=(list wako)]) :: mergepts
+++ agon (map ,[p=ship q=desk] ,[p=@ud q=@ud r=waks]) :: mergepts
++ ankh :: fs node (new)
$: p=cash :: recursive hash
q=(unit ,[p=cash q=*]) :: file
@@ -2006,31 +2023,8 @@
raz=(map path race) :: statements inbound
ryl=(map path rill) :: statements outbound
== ::
-++ bein :: terminal control
- $: $: bul=@ud :: buffer length
- bus=@ud :: cursor in buffer
- but=(list ,@c) :: buffer text
- 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
- == ::
- $: pol=@ud :: length of prompt
- pot=tape :: prompt text
- == ::
- == ::
-++ beau ,[p=(unit ,@ud) q=(map wire goal) r=boor] :: next/want/thread
+++ beam ,[[p=ship q=desk r=case] s=path] :: global name
++ beak ,[p=ship q=desk r=case] :: garnish with beak
-++ bear ,[p=(map path goal) q=boar] :: thread with slips
-++ beef :: raw product
- $: p=(list gilt) :: actions
- q=(list slip) :: requests
- r=boar :: state
- == ::
-++ beet ,[p=(set bead) q=cage] :: computed result
++ bird :: packet in travel
$: gom=soap :: message identity
mup=@ud :: pktno in msg
@@ -2038,41 +2032,6 @@
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
- [%ret ~] :: return
- [%txt p=(list ,@c)] :: utf32 text
- == ::
-++ 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
- == ::
-++ blur ,[p=@ud q=(unit bein) r=blot] :: columns, prompt
-++ 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
- 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
@@ -2083,17 +2042,6 @@
[%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
- cwd=@tas :: working desk
- 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
@@ -2102,102 +2050,6 @@
$? %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
- [%exec p=@p q=(unit silk)] :: make / kill
- [%file p=@tas q=@] :: apply atomic file
- [%fail p=tape] :: report failure
- [%grab ~] :: collect grabage
- [%hail ~] :: refresh
- [%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
- [%info p=@p q=@tas r=nori] :: internal edit
- [%ingo p=@p q=@tas r=nori] :: internal noun edit
- [%init p=@p] :: report install
- [%into p=@p q=@tas r=nori] :: external edit
- [%invo p=@p q=@tas r=nori] :: external noun 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
- [%made p=(each beet (list tank))] :: computed result
- [%nuke p=hasp] :: reset this duct
- [%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
- [%logo p=@] :: logout
- [%loot p=@tas q=path] :: request directory
- [%make p=(unit ,@t) q=@ud r=@] :: wild license
- [%mean p=ship q=term r=cuff s=vase] :: application event
- [%meta p=vase] :: meta-card
- [%meat p=ship q=card] :: concrete app action
- [%mess p=hasp q=(disk)] :: urbit message
- [%mine p=@ud q=@t] :: query matched line
- [%noop ~] :: no operation
- [%note p=@tD q=tank] :: debug message
- [%nuke p=~] :: kill all processes
- [%pace p=@ud] :: compute background
- [%pipe p=(unit ,[p=tutu q=(list)])] :: pipeline data
- [%pour p=path q=dram] :: write directory
- [%pull p=ship q=desk r=(list desk)] :: pull remote desk
- [%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
- [%show p=hasp q=(unit hope)] :: urbit subscribe
- [%sith p=@p q=@uw] :: imperial generator
- [%soft p=*] :: untyped card
- [%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
- :: [%thee p=@ud q=scab r=cred s=moth] :: cooked htreq
- [%them p=(unit hiss)] :: internal client req
- [%they p=@ud q=httr] :: response to %them
- [%this p=? q=clip r=httq] :: secure/src/req
- [%thou p=httr] :: raw http response
- [%thud ~] :: cancel http request
- [%thug p=@p q=@p] :: sign in client
- [%thus p=@ud q=(unit hiss)] :: http request/cancel
- [%tory p=(list ,@t)] :: history dump
- [%veer p=@ta q=path r=@t] :: install vane
- [%vega p=path] :: reboot by path
- [%volt p=*] :: current kernel
- [%wait p=@da q=path] :: timer wait
- [%wake ~] :: timer activate
- [%waft p=sock q=*] :: response message
- [%want p=sock q=path r=*] :: send message
- [%warn p=tape] :: syslog
- [%warp p=sock q=riff] :: file request
- [%wart p=sock q=@tas r=path s=*] :: service request
- [%went p=ship q=cape] :: reaction message
- [%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
++ case :: ship desk case spur
@@ -2206,7 +2058,7 @@
[%ud p=@ud] :: number
== ::
++ cash ,@uvH :: ankh hash
-++ cask :: symmetric record
+++ clot :: symmetric record
$: yed=(unit ,[p=hand q=code]) :: outbound
heg=(map hand code) :: proposed
qim=(map hand code) :: inbound
@@ -2235,12 +2087,11 @@
cip=(each ,@if ,@is) :: client IP
cum=(map ,@tas ,*) :: custom dirt
== ::
-++ cult (map duct rave) :: subscriptions
++ cuff :: permissions
$: p=(unit (set monk)) :: readers
q=(set monk) :: authors
== ::
-++ deed ,[p=@ q=step] :: signature, stage
+++ deed ,[p=@ q=step r=?] :: sig, stage, fake?
++ dome :: project state
$: ang=agon :: pedigree
ank=ankh :: state
@@ -2248,11 +2099,10 @@
hit=(list frog) :: changes in reverse
lab=(map ,@tas ,@ud) :: labels
== ::
-++ dojo ,[p=cult q=dome] :: domestic desk state
++ door :: foreign contact
$: wod=road :: connection to
wyl=will :: inferred mirror
- caq=cask :: symmetric key state
+ caq=clot :: symmetric key state
== ::
++ dove ,[p=@ud q=(map ,@ud ,@)] :: count hash 13-blocks
++ epic :: FCGI parameters
@@ -2303,12 +2153,12 @@
[%th p=@ud q=love] :: http response
[%tq p=path q=hiss] :: http request
[%va p=@tas q=(unit vase)] :: set/clear variable
- [%xx p=card] :: return card
- [%xy p=path q=card] :: push card
+ [%xx p=curd] :: return card
+ [%xy p=path q=curd] :: push card
== ::
++ gilt ,[@tas *] :: presumed gift
++ gens ,[p=lang q=gcos] :: general identity
-++ germ ?(%fine %that %this %mate) :: merge style
+++ germ ?(%fine %that %this %mate %conf) :: merge style
++ gcos :: id description
$% [%czar ~] :: 8-bit ship
[%duke p=what] :: 32-bit ship
@@ -2342,21 +2192,16 @@
[%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
++ hart ,[p=? q=(unit ,@ud) r=host] :: http sec/port/host
-++ hasp ,[p=ship q=term] :: app identity
++ hate ,[p=purl q=@p r=moth] :: semi-cooked request
++ heir ,[p=@ud q=mess r=(unit love)] :: status/headers/data
++ hiss ,[p=purl q=moth] :: outbound request
++ hist ,[p=@ud q=(list ,@t)] :: depth texts
++ hole ,@t :: session identity
-++ hope (pair ,? path) :: view/subscribe
++ hook path :: request origin
-++ hoot ,[p=? q=? r=(unit ,@ud) s=host] :: secure/mapped/host
+++ hoot ,[p=? q=(unit ,@ud) r=host] :: secure/mapped/host
++ hort ,[p=(unit ,@ud) q=host] :: http port/host
-++ hose ,[p=(list tank) q=(unit vase) r=seam s=heir] :: http environment
++ host $%([& p=(list ,@t)] [| p=@if]) :: http host
++ httq :: raw http request
$: p=meth :: method
@@ -2371,24 +2216,25 @@
r=httq ::
== ::
++ kite ,[p=care q=case r=ship s=desk t=spur] :: parsed global name
-++ json :: json top level
- $% [%a p=(list jval)] :: array
- [%o p=(map ,@t jval)] :: object
+++ json :: normal json value
+ $| ~ ::
+ $% [%a p=(list json)] :: array
+ [%b p=?] :: boolean
+ [%o p=(map ,@t json)] :: object
+ [%n p=@ta] :: number
+ [%s p=@ta] :: string
== ::
-++ jval :: json value
- $| ~ :: null
- $? json ::
- $% [%b p=?] :: boolean
- [%n p=@ta] :: number
- [%s p=@ta] :: string
- == ::
+++ jsot :: strict JSON top
+ $% [%a p=(list json)] :: array
+ [%o p=(map ,@t json)] :: object
== ::
+++ jval json :: XX compatibility
++ lamb :: short path
$% [& p=@tas] :: auto
[| p=twig] :: manual
== ::
++ lane :: packet route
- $% [%if p=@ud q=@if] :: IP4/public UDP/addr
+ $% [%if p=@da q=@ud r=@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
== ::
@@ -2447,7 +2293,6 @@
++ 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
-++ move ,[p=duct q=(mold card card)] :: new move
++ 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
@@ -2500,10 +2345,6 @@
bum=(map ,@ud ,%dead) ::
mis=(map ,@ud ,[p=cape q=flap r=(unit)]) :: misordered
== ::
-++ raft :: filesystem
- $: fat=(map ship room) :: domestic
- hoy=(map ship rung) :: foreign
- == ::
++ rank ?(%czar %king %duke %earl %pawn) :: ship width class
++ rant :: namespace binding
$: p=[p=care q=case r=@tas] :: clade release book
@@ -2514,40 +2355,19 @@
$% [& p=mood] :: single request
[| p=moat] :: change range
== ::
-++ rede :: universal project
- $: lim=@da :: complete to
- qyx=cult :: subscribers
- ref=(unit rind) :: outgoing requests
- dom=dome :: revision state
- == ::
-++ riff ,[p=desk q=(unit rave)] :: request/desist
++ 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
- fod=(map duct ,@ud) :: current requests
- haw=(map mood (unit)) :: simple cache
- == ::
++ riot (unit rant) :: response/complete
++ road :: secured oneway route
$: exp=@da :: expiration date
lun=(unit lane) :: route to friend
lew=will :: will of friend
== ::
-++ room :: fs per ship (new)
- $: hun=duct :: terminal duct
- hez=(unit duct) :: sync duct
- dos=(map desk dojo) :: native desk
- == ::
++ 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
-++ rung $: rus=(map desk rede) :: neighbor desks
- == ::
-++ sash (pair term (unit hope)) :: web subscribe
++ saba ,[p=ship q=@tas r=moar s=(list nori)] :: patch/merge
++ sufi :: domestic host
$: hoy=(list ship) :: hierarchy
@@ -2564,20 +2384,6 @@
foy=(unit ,[p=ship q=hole]) :: partner to notify
pus=(unit ,@ta) :: password
== ::
-++ seam :: logical request
- $% [%apg p=term q=logo r=path] :: app get
- [%apl p=term q=@ud r=term] :: app poll
- [%apm p=term q=json] :: app message
- [%aps p=term q=term r=(unit path)] :: app subscribe
- [%apu p=term q=logo r=octs] :: app upload
- [%cog p=@ud q=@ud] :: console get
- [%con p=@ud] :: console face
- [%cop p=@ud q=@ud r=json] :: console put
- [%det p=desk q=moat] :: load changes
- [%fun p=term q=tube r=(list manx)] :: functional
- [%lon p=seal] :: authentication flow
- [%red p=purl] :: redirect
- == ::
++ sect ?(%black %blue %red %orange %white) :: banner
++ shed :: packet flow
$: $: rtt=@dr :: smoothed rtt
@@ -2598,11 +2404,13 @@
== ::
++ silk :: construction layer
$& [p=silk q=silk] :: cons
- $% [%bake p=logo q=bead] :: local synthesis
- [%boil p=logo q=bead] :: general synthesis
+ $% [%bake p=logo q=beam] :: local synthesis
+ [%boil p=logo q=beam] :: general synthesis
[%call p=silk q=silk] :: slam
[%cast p=logo q=beak r=silk] :: translate
- [%done p=(set bead) q=cage] :: literal
+ [%done p=(set beam) q=cage] :: literal
+ [%dude p=tank q=silk] :: error wrap
+ [%dune p=(set beam) q=(unit cage)] :: unit literal
[%mute p=silk q=(list (pair wing silk))] :: mutant
[%pass p=silk q=sill] :: twig construction
[%reef ~] :: kernel reef
@@ -2610,13 +2418,10 @@
++ sill :: code construction
$% [%0 p=@] :: direct text
[%1 p=twig] :: direct twig
- [%2 p=bead] :: bead over %hoon
+ [%2 p=beam] :: beam over %hoon
[%3 p=silk] :: build a %hoot
== ::
++ 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
++ slip ,[p=path q=goal] :: traceable request
++ snow ,[p=@ud q=@ud r=(set ,@ud)] :: window exceptions
@@ -2635,10 +2440,6 @@
++ step ,[p=bray q=gens r=pass] :: identity stage
++ tako ,[p=path q=miso] :: change detail
++ tart $+([@da path note] bowl) :: process core
-++ task ::
- $: paq=(qeu gyro) :: prompt queue
- wip=[p=@ud q=(map ,@ud beau)] :: processes
- == ::
++ taxi ,[p=lane q=rock] :: routed packet
++ tick ,@ud :: process id
++ toro ,[p=@ta q=nori] :: general change
@@ -2646,51 +2447,12 @@
$: lit=@ud :: imperial modulus
any=@ :: entropy
urb=(map ship sufi) :: all keys and routes
+ fak=?
== ::
++ tube ,[p=@ta q=@ta r=@ta s=path] :: canonical path
++ tutu ,* :: presumed type
-++ vane $_ :: kernel actor
- |+ $: now=@da ::
- eny=@ ::
- ska=$+(* (unit (unit))) :: activate
- == ::
- ^? |% ::
- ++ call :: update
- |= $: hen=duct :: channel
- typ=type :: event type
- fav=card :: event
- == ::
- :- p=*(list move) :: actions
- q=*vane :: consequence
- ++ doze :: next wakeup
- |= [now=@da hen=duct] :: channel
- *(unit ,@da) :: alarm if any
- ++ load :: load state, fresh
- |= old=vase ::
- *vane ::
- ++ scry :: inspect
- |= $: fur=(unit (set monk)) :: observers
- ren=@tas :: submode
- who=ship :: target
- syd=@tas :: project
- lot=coin :: version
- tyl=path :: location
- == ::
- *(unit (unit)) :: record
- ++ 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
- -- ::
++ view ?(%u %v %w %x %y %z) :: view mode
-++ wund (list ,[p=life q=ring r=acru]) :: mace in action
-++ wako ,[p=path q=woof] :: merge file state
-++ waks (list wako) :: list file states
+++ waks (map path woof) :: list file states
++ what :: logical identity
$% [%anon ~] :: anonymous
[%lady p=whom] :: female person ()
@@ -2698,11 +2460,9 @@
[%punk p=sect q=@t] :: opaque handle ""
== ::
++ whom ,[p=@ud q=govt r=sect s=name] :: year/govt/id
+++ woof $| %know :: udon transform
+ [%chan (list $|(@ud [p=@ud q=@ud]))] ::
+++ wund (list ,[p=life q=ring r=acru]) :: mace in action
++ will (list deed) :: certificate
++ worm ,* :: vase of tart
-++ yard :: terminal state
- $: p=? :: verbose
- q=blur :: display state
- r=(map path hist) :: history
- == ::
--
diff --git a/main/app/appbug-2/core.hoon b/main/app/appbug-2/core.hoon
new file mode 100644
index 000000000..c0aca363c
--- /dev/null
+++ b/main/app/appbug-2/core.hoon
@@ -0,0 +1,37 @@
+!: |= *
+::::::::: Foobug: a simple application.
+::
+|_ [hid=hide vat=[%0 p=@ud]]
+++ poke
+ |= [ost=bone *]
+ :_ +>(p.vat +(p.vat))
+ :~ [ost %give %rasp ~ %json *json]
+ ==
+::
+++ peek
+ |= [you=ship pax=path]
+ :- %hymn
+ ^- manx
+ ;html
+ ;head
+ ;title: Foobug!
+ ==
+ ;body
+ ;p: Dude, a better answer is {}.
+ ;button(onclick "bump()"): (bump.)
+ ;script
+ ; var mess = 0;
+ ;
+ ; function bump() {
+ ; xhr = new XMLHttpRequest();
+ ; xhr.onload = function() { mess++; }
+ ; xhr.open("PUT", "/tim/"+user+"/"+appl+"/"+port+"/"+mess);
+ ; xhr.setRequestHeader("content-type", "text/json");
+ ; xhr.send(JSON.stringify({oryx: oryx, xyro: {}}));
+ ; }
+ ==
+ ==
+ ==
+--
+
+
diff --git a/main/app/foobug/core.hoon b/main/app/foobug/core.hoon
new file mode 100644
index 000000000..278bc5e95
--- /dev/null
+++ b/main/app/foobug/core.hoon
@@ -0,0 +1,104 @@
+!:
+=> |%
+ ++ axle
+ $% [%0 p=@ud]
+ ==
+ ++ gult
+ $% [%json p=json]
+ :: [%hymn p=manx]
+ ==
+ ++ gilt
+ $% :: [%json p=json]
+ [%hymn p=manx]
+ ==
+ ++ gift
+ $% [%rust gilt]
+ [%rasp gult]
+ ==
+ ++ move ,[p=bone q=[%give p=gift]]
+ --
+|= *
+|_ [hid=hide vat=axle]
+++ page
+ ^- manx
+ ;html
+ ;head
+ ;title: Foobug!
+ ==
+ ;body
+ ;p: Word: {}.
+ ;button(onclick "goof()"): Goof!
+ ;script
+ ; var c = 0;
+ ; var d = 1;
+ ; var x = 0;
+ ;
+ ; function pickup() {
+ ; xhr = new XMLHttpRequest();
+ ;
+ ; console.log("WTF???");
+ ; xhr.open("GET", "/zod/goe/foobug/"+port+"/frog/"+d);
+ ; xhr.onload = function() {
+ ; console.log("pickup");
+ ; console.log(this)
+ ; change(JSON.parse(this.responseText))
+ ; update();
+ ; d++;
+ ; pickup();
+ ; }
+ ; xhr.send();
+ ; }
+ ;
+ ; function dude() {
+ ; xhr = new XMLHttpRequest();
+ ;
+ ; xhr.open("POST", "/zod/pos/foobug/"+port+"/frog/goof");
+ ; xhr.setRequestHeader("content-type", "text/json")
+ ; xhr.onload = function() {
+ ; console.log("dude");
+ ; console.log(this)
+ ; change(JSON.parse(this.responseText))
+ ; update();
+ ; pickup();
+ ; }
+ ; xhr.send("{\"a\":1}")
+ ; }
+ ; dude();
+ ;
+ ; function change(jon) {
+ ; x = jon.x;
+ ; }
+ ;
+ ; function update() {
+ ; document.getElementsByTagName("p")[0].innerHTML = "WORD: " + x;
+ ; }
+ ;
+ ; function goof() {
+ ; xhr = new XMLHttpRequest();
+ ; xhr.onload = function() {
+ ; console.log("hi");
+ ; console.log(arguments)
+ ; c++
+ ; }
+ ; xhr.open("POST",
+ ; "/zod/pom/foobug/"+port+"/"+c)
+ ; xhr.setRequestHeader("content-type", "text/json")
+ ; xhr.send("{\"a\":1}")
+ ; }
+ ==
+ ==
+ ==
+::
+++ peer
+ |= [ost=bone you=ship pax=path]
+ ^- [(list move) _+>]
+ [[ost %give %rust %hymn page]~ +>]
+::
+++ poke-json
+ |= [ost=bone you=ship jon=json]
+ ^- [(list move) _+>]
+ ~& [%poke [%state p.vat] ost you jon]
+ :_ +>(p.vat +(p.vat))
+ :~ [ost %give %rasp %json jon]
+ ==
+--
diff --git a/main/app/philbug/app.js b/main/app/philbug/app.js
new file mode 100644
index 000000000..f98e63997
--- /dev/null
+++ b/main/app/philbug/app.js
@@ -0,0 +1,45 @@
+
+window.onload = function() {
+ var data = {}
+
+ change = function(_data) {
+ for(i in _data) {
+ data[i] = _data[i]
+ }
+ }
+
+ update = function() {
+ for (var i in data) {
+ if ($('#'+i).length < 1) {
+ var e = document.createElement('tr')
+ e.id = i
+ $('#cont tbody').append(e)
+ }
+ $('#'+i).html("~"+i+" | "+data[i]+" | ")
+ }
+ $('#cont tbody').append([].sort.call($('#cont tr'), function (a, b) {
+ return parseInt(b.childNodes[1].innerText) -
+ parseInt(a.childNodes[1].innerText)
+ }))
+ }
+
+ goof = function(e) {
+ d = $.map($(".sel"), function(el) {return el.id})
+ window.urb.send(d)
+ }
+
+ window.urb.send(null);
+ window.urb.subscribe("frog","goof", function(err,res) {
+ if(err)
+ return console.log('cannot connect to frog/goof')
+ change(res.data)
+ update()
+
+ return true
+ })
+
+ $('#cont').on('click', 'tr', function (e) {
+ if (!e.ctrlKey) { $('.sel').removeClass('sel') }
+ $(this).addClass('sel')
+ })
+}
diff --git a/main/app/philbug/core.hoon b/main/app/philbug/core.hoon
new file mode 100644
index 000000000..633afad1d
--- /dev/null
+++ b/main/app/philbug/core.hoon
@@ -0,0 +1,117 @@
+!:
+=> |%
+ ++ axle
+ $% [%0 p=(map ,@p ,@ud)]
+ ==
+ ++ gilt
+ $% [%json p=json]
+ [%hymn p=manx]
+ ==
+ ++ gift
+ $% [%rust gilt]
+ [%rasp gilt]
+ ==
+ ++ move ,[p=bone q=[%give p=gift]]
+ ++ phil
+ $% [%new ~]
+ [%add p=(list ,@p)]
+ ==
+ --
+|= *
+|_ [hid=hide vat=axle]
+++ incl
+ |= wal=wall
+ %+ turn wal
+ |= tape ;script(type "text/javascript", src +<);
+::
+++ root
+ /(scot %p our.hid)/main/(scot %da lat.hid)/app/[app.hid]
+::
+++ respond :: respond to message
+ |= ost=bone
+ `move`[ost %give %rasp %json *json]
+::
+++ update :: update subscribers
+ ^- (list move)
+ %+ turn
+ ^- (list bone)
+ %+ ~(rep by sup.hid) *(list bone)
+ |= [p=[p=bone q=[ship path]] q=(list bone)] ^- (list bone)
+ ?. =(/goof +.q.p) q
+ [p.p q]
+ send-vat
+::
+++ render
+ ^- manx
+ ;html
+ ;head
+ ;title: Foobug!
+ ;style
+ ; .sel {background: lightgray}
+ ; #cont {border-collapse: collapse}
+ ==
+ ;* %- incl :~
+ "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"
+ ==
+ ;script ;- (trip ;;(,@ .^(%cx (welp root /urb/js))))
+ ==
+ ;script ;- (trip ;;(,@ .^(%cx (welp root /app/js))))
+ ==
+ ==
+ ;body
+ ;p: Yo.
+ ;table#cont:tbody;
+ ;p: Select a ship
+ ;button(onclick "goof()"): Give 5 points
+ ==
+ ==
+::
+++ peer
+ |= [ost=bone you=ship pax=path]
+ ^- [(list move) _+>]
+ :_ +>
+ ?: =(/ pax)
+ [ost %give %rust %hymn render]~
+ [(send-vat ost) ~]
+::
+++ poke-phil
+ |= [ost=bone you=ship pil=phil]
+ =. p.vat
+ ?- -.pil
+ %new (~(put by p.vat) you (fall (~(get by p.vat) you) _@ud))
+ %add %- ~(urn by p.vat)
+ |= [u=@p n=@ud]
+ ?. (lien p.pil |=(a=@p =(a u)))
+ n
+ (add 5 n)
+ ==
+ [[(respond ost) update] +>.$]
+::
+++ poke-json
+ |= [ost=bone you=ship jon=json]
+ ~& [%poke-json jon]
+ %^ poke-phil ost you
+ ^- phil
+ ?+ -.jon !!
+ %o [%new ~]
+ %a :- %add
+ %+ turn p.jon
+ |= a=json
+ ?> ?=([%s *] a)
+ (slav %p (cat 3 '~' p.a))
+ ==
+::
+++ send-vat
+ |= ost=bone
+ =+ luz=(~(tap by p.vat) ~)
+ ^- move
+ :* ost %give %rust %json %o
+ ^- (map ,@t jval)
+ %- mo
+ %+ turn luz
+ |= [a=@p b=@ud]
+ :- (rsh 3 1 (scot %p a))
+ :- %n
+ (rsh 3 2 (scot %ui b))
+ ==
+--
diff --git a/main/app/philbug/urb.js b/main/app/philbug/urb.js
new file mode 100644
index 000000000..d4d8017b4
--- /dev/null
+++ b/main/app/philbug/urb.js
@@ -0,0 +1,111 @@
+window.urb = {
+ ship: ship,
+ port: port,
+ auto: auto,
+ oryx: oryx,
+ user: user,
+ appn: appn,
+ seqn: 0,
+ seqp: 1,
+ dely: 0,
+
+ req: function(method,url,data,json,cb) {
+ var xhr = new XMLHttpRequest()
+ xhr.open(method.toUpperCase(), url)
+ if(json)
+ xhr.setRequestHeader("content-type", "text/json")
+ if(data)
+ xhr.send(JSON.stringify(data))
+ else
+ xhr.send()
+ if(cb) {
+ xhr.onload = function() {
+ cb(null,{
+ "status":this.status,
+ "data":JSON.parse(this.responseText)
+ })
+ }
+ xhr.onerror = function() {
+ cb({
+ "status":this.status,
+ "data":this.responseText
+ })
+ }
+ }
+ },
+
+ subscribe: function(stream,path,cb) {
+ if(!cb)
+ throw new Error("You must supply a callback to urb.subscribe.")
+
+ var method, perm, url, $this
+
+ method = "post"
+ perm = "pis"
+ url = [this.ship,perm,this.user,this.appn,this.port]
+ if(stream) {
+ url.push(stream)
+ if(path)
+ url.push(path)
+ }
+ url = "/"+url.join("/")
+
+
+ $this = this
+ this.req(method,url,{},true,function(err,data) {
+ cb.apply(this,arguments)
+ if(!err) { $this.poll(stream,cb); }
+ })
+ },
+
+ send: function(data,cb) {
+ if(!data) { data = {}; }
+ if(!cb) { cb = function() {}; }
+
+ var method, perm, url, $this
+
+ method = "post"
+ perm = "pim"
+ url = [this.ship,perm,this.user,this.appn,this.port,this.seqn]
+ url = "/"+url.join("/")
+
+ this.seqn++
+
+ $this = this
+ this.req(method,url,data,true,function(err,data) {
+ if(err) { $this.seqn--; }
+ cb.apply(this,arguments)
+ })
+ },
+
+ poll: function(stream,cb) {
+ if(!stream)
+ throw new Error("You must supply a stream to urb.poll.")
+ if(!cb)
+ throw new Error("You must supply a callback to urb.poll.")
+
+ var method, perm, url, $this
+
+ method = "get"
+ perm = "gie"
+ if(!stream) { return false; }
+ url = [this.ship,perm,this.user,this.appn,this.port,stream,this.seqp]
+ url = "/"+url.join("/")
+
+ $this = this
+ this.req(method,url,null,false,function(err,data) {
+ if(cb.apply(this,arguments) === false) { return; }
+
+ if(err)
+ $this.dely += 1000
+ else {
+ $this.dely = 0
+ $this.seqp++
+ }
+
+ setTimeout(function() {
+ $this.poll(stream,cb)
+ },$this.dely)
+ })
+ }
+}
diff --git a/main/bin/begin.hoon b/main/bin/begin.hoon
index 6e2f9aac7..8bef13c0d 100644
--- a/main/bin/begin.hoon
+++ b/main/bin/begin.hoon
@@ -188,6 +188,6 @@
:~ [%la %leaf "request rejected - invalid ticket"]
==
:~ [%la %leaf "request approved"]
- [%xy /a `card`[%cash mig mac u.wil]]
+ [%xy /a [%cash mig mac u.wil]]
==
--
diff --git a/main/bin/tach.hoon b/main/bin/tach.hoon
deleted file mode 100644
index 14397e529..000000000
--- a/main/bin/tach.hoon
+++ /dev/null
@@ -1,8 +0,0 @@
-::
-:: /=main=/bin/tach/hoon
-::
-|= *
-|= ~
-^- bowl
-:_ ~ :_ ~
-[%la %leaf "you probably meant to run :chat."]
diff --git a/main/bin/update.hoon b/main/bin/update.hoon
index d0b8d10be..09732076c 100644
--- a/main/bin/update.hoon
+++ b/main/bin/update.hoon
@@ -15,7 +15,7 @@
?~ lum
^- gift
:+ %la %leaf
- "{(trip des)} failed to merge, please rerun with a merge option"
+ "{(trip des)} failed to apply, please rerun with a merge option"
?~ u.lum
`gift`[%la %leaf "{(trip des)} is up to date"]
`gift`[%ok des u.u.lum]
diff --git a/main/bin/verb.hoon b/main/bin/verb.hoon
new file mode 100644
index 000000000..cabd92523
--- /dev/null
+++ b/main/bin/verb.hoon
@@ -0,0 +1,8 @@
+!:
+:: /=main=/bin/verb/hoon
+::
+=> .(-< `who=@p`-<)
+|= [est=time *]
+|= ~
+^- bowl
+[[%xx %verb ~]~ ~]
diff --git a/main/sys/hoon/ref/gate.hoon b/main/sys/hoon/ref/gate.hoon
new file mode 100644
index 000000000..772a81e76
--- /dev/null
+++ b/main/sys/hoon/ref/gate.hoon
@@ -0,0 +1,3 @@
+|= rem=spur
+~& [%html rem]
+,@
diff --git a/main/sys/html/ref/gate.hoon b/main/sys/html/ref/gate.hoon
new file mode 100644
index 000000000..353a9ccf3
--- /dev/null
+++ b/main/sys/html/ref/gate.hoon
@@ -0,0 +1,2 @@
+|= *
+,@
diff --git a/main/sys/html/tan/mime/gate.hoon b/main/sys/html/tan/mime/gate.hoon
new file mode 100644
index 000000000..c834dd4f0
--- /dev/null
+++ b/main/sys/html/tan/mime/gate.hoon
@@ -0,0 +1,4 @@
+!:
+|= *
+|= htm=@
+[/text/html (met 3 htm) htm]
diff --git a/main/sys/hymn/ref/gate.hoon b/main/sys/hymn/ref/gate.hoon
new file mode 100644
index 000000000..387ae5ca6
--- /dev/null
+++ b/main/sys/hymn/ref/gate.hoon
@@ -0,0 +1 @@
+manx
diff --git a/main/sys/hymn/tan/html/gate.hoon b/main/sys/hymn/tan/html/gate.hoon
new file mode 100644
index 000000000..d2b732a8a
--- /dev/null
+++ b/main/sys/hymn/tan/html/gate.hoon
@@ -0,0 +1,4 @@
+!:
+|= *
+|= man=manx
+(crip (xmlt | man ~))
diff --git a/main/sys/hymn/tan/mime/gate.hoon b/main/sys/hymn/tan/mime/gate.hoon
new file mode 100644
index 000000000..bd93a3196
--- /dev/null
+++ b/main/sys/hymn/tan/mime/gate.hoon
@@ -0,0 +1,4 @@
+|= *
+|= man=manx
+=+ htm=(crip (xmlt | man ~))
+[/text/html (met 3 htm) htm]
diff --git a/main/sys/json/ref/gate.hoon b/main/sys/json/ref/gate.hoon
new file mode 100644
index 000000000..3c840093b
--- /dev/null
+++ b/main/sys/json/ref/gate.hoon
@@ -0,0 +1 @@
+json
diff --git a/main/sys/json/tan/mime/gate.hoon b/main/sys/json/tan/mime/gate.hoon
new file mode 100644
index 000000000..90349f916
--- /dev/null
+++ b/main/sys/json/tan/mime/gate.hoon
@@ -0,0 +1,4 @@
+|= *
+|= jon=json
+=+ txt=(crip (pojo jon))
+[/text/json (met 3 txt) txt]
diff --git a/main/sys/md/ref/gate.hoon b/main/sys/md/ref/gate.hoon
new file mode 100644
index 000000000..00f1dfa93
--- /dev/null
+++ b/main/sys/md/ref/gate.hoon
@@ -0,0 +1 @@
+|=(* ,@)
diff --git a/main/sys/md/tan/html/gate.hoon b/main/sys/md/tan/html/gate.hoon
new file mode 100644
index 000000000..8e6b4de54
--- /dev/null
+++ b/main/sys/md/tan/html/gate.hoon
@@ -0,0 +1,342 @@
+!:
+|= *
+=> %= .
+ +
+ => +
+ =>
+ |%
+ ++ down
+ $& [p=down q=down]
+ $% [%$ p=tape]
+ [%code p=tape]
+ [%inco p=tape]
+ [%head p=haxe q=down]
+ [%link p=tape q=tape r=(unit tape)]
+ [%lord p=(list down)]
+ [%lund p=(list down)]
+ [%parg p=down]
+ [%quot p=down]
+ [%rong p=down]
+ [%emph p=down]
+ [%hrul ~]
+ [%html p=tape]
+ ==
+ ++ haxe
+ |= a=*
+ ?@ a
+ ?:(&(!=(0 a) (lth a 6)) a 6)
+ 6
+ --
+ |%
+ ++ cott
+ ;~ pose
+ (shim 0 8)
+ (shim 11 37)
+ (shim 39 59)
+ (just `@`61)
+ (shim 63 95)
+ (shim 97 255)
+ ==
+ ++ copt
+ ;~ pose
+ (shim 0 9)
+ (shim 11 37)
+ (shim 39 39)
+ (shim 43 59)
+ (just `@`61)
+ (shim 63 90)
+ (shim 94 94)
+ (shim 97 255)
+ ==
+ ++ urlc ;~(pose (shim 0 9) (shim 11 31) (shim 33 39) (shim 42 255))
+ ++ uctt ;~(pose (shim 0 9) (shim 11 91) (shim 94 255))
+ ++ uctc ;~(pose (shim 0 9) (shim 11 33) (shim 35 39) (shim 42 255))
+ ++ htmc ;~(pose (shim 0 9) (shim 11 255))
+ ++ escp (mask "\\`*_\{}[]()#+-.!")
+ ++ escd ;~(pfix bas escp)
+ ++ whit (mask (tape 9 32 ~))
+ ++ dent ;~(pose (jest ' ') (just `@`9))
+ ++ blan (cold ~ ;~(plug (star whit) (just `@`10)))
+ ++ mcat (bend |=([a=tape b=tape] (some (weld a b))))
+ ++ wcat |*(a=_rule (cook |=([a=tape b=tape] (weld a b)) a))
+ ++ codt
+ %+ knee *tape |. ~+
+ ;~ pose
+ (wcat ;~(plug (plus cott) codt))
+ (cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose codt (easy ~))))
+ (cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose codt (easy ~))))
+ (cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose codt (easy ~))))
+ (plus cott)
+ ==
+ ++ inlt
+ %+ knee *tape |. ~+
+ ;~ pose
+ ;~(mcat (plus copt) inlt)
+ ;~(mcat (plus escd) inlt)
+ ;~ mcat
+ %- wcat
+ ;~ plug
+ ;~(plug gal (cook trip inle))
+ ;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar)
+ ==
+ inlt
+ ==
+ ;~ mcat
+ %- wcat
+ ;~ plug
+ ;~(plug gal fas (cook trip inle))
+ ;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar)
+ ==
+ inlt
+ ==
+ ;~ mcat
+ (wcat ;~(plug ;~(plug pam hax ;~(sfix (plus nud) sem)) (easy ";")))
+ inlt
+ ==
+ ;~ mcat
+ (wcat ;~(plug ;~(plug pam ;~(sfix (plus alf) sem)) (easy ";")))
+ inlt
+ ==
+ (cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose inlt (easy ~))))
+ (cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose inlt (easy ~))))
+ (cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose inlt (easy ~))))
+ ==
+ ++ kite
+ |= bud=(list ,@t)
+ |= tub=nail
+ |- ^- (like ,@t)
+ ?@ bud
+ (fail tub)
+ =+ foo=((jest i.bud) tub)
+ ?~ q.foo
+ $(bud t.bud)
+ foo
+ ++ bloc
+ %+ knee *@t |. ~+
+ %- kite
+ :~ '' '' '