From 01465717d300f68ccdcf582a47b83a0ec8eba778 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 3 Jun 2014 14:01:40 -0700 Subject: [PATCH 01/87] IPv4 lanes now have a timestamp. --- arvo/ames.hoon | 8 +++----- arvo/zuse.hoon | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/arvo/ames.hoon b/arvo/ames.hoon index f0fb4aa05..c03bea847 100644 --- a/arvo/ames.hoon +++ b/arvo/ames.hoon @@ -523,9 +523,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,7 +645,7 @@ ++ gur :: default door |= her=ship ^- door - =+ def=?.((lth her 256) ~ [~ %if 0 (mix her .0.0.1.0)]) + =+ def=?.((lth her 256) ~ [~ %if ~2000.1.1 0 (mix her .0.0.1.0)]) [[~2100.1.1 def ~] ~ *cask] :: ++ myx :: door by ship @@ -1262,7 +1260,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) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index bd7dee9bc..764636586 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -2388,7 +2388,7 @@ [| 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 == :: From ec273c2b0cafd382bd9d615cbfdb015cc48baf82 Mon Sep 17 00:00:00 2001 From: ~hatteb-mitlyd Date: Tue, 3 Jun 2014 16:39:28 -0700 Subject: [PATCH 02/87] beginning stages of fake-net hackery --- arvo/ames.hoon | 28 ++++++++++++++++------------ arvo/zuse.hoon | 7 ++++--- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/arvo/ames.hoon b/arvo/ames.hoon index c03bea847..1b48fb425 100644 --- a/arvo/ames.hoon +++ b/arvo/ames.hoon @@ -78,11 +78,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,7 +446,7 @@ ?. =(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] @@ -696,7 +697,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) @@ -705,6 +706,7 @@ ?> =(wil (grip wil ~)) ?> (real mac wil) %_ ton + fak r.i.wil urb %+ ~(put by urb.ton) our @@ -965,7 +967,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 @@ -977,20 +979,22 @@ %^ ~(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] ~] == :: - ++ 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] :: @@ -1639,11 +1643,11 @@ (~(kick am [now fox(hop p.fav)]) hen) :: %make - =+ vun=(~(come am [now fox]) p.fav (bex q.fav) r.fav) + =+ vun=(~(come am [now fox]) p.fav (bex q.fav) r.fav s.fav) [[[%beer p.vun] ~] q.vun] :: %sith - (~(czar am [now fox]) p.fav q.fav) + (~(czar am [now fox]) p.fav q.fav r.fav) :: %want (~(wise am [now fox]) p.fav hen q.fav r.fav) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 764636586..5323f1311 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -2146,7 +2146,7 @@ [%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 + [%make p=(unit ,@t) q=@ud r=@ s=?] :: 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 @@ -2167,7 +2167,7 @@ [%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 + [%sith p=@p q=@uw r=?] :: imperial generator [%soft p=*] :: untyped card [%sync ~] :: reset soft state [%talk p=tank] :: show on console @@ -2240,7 +2240,7 @@ $: 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 @@ -2646,6 +2646,7 @@ $: 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 From 85ce8d970b191f95ec01c02b936ce4f0817ad1da Mon Sep 17 00:00:00 2001 From: ~hatteb-mitlyd Date: Tue, 3 Jun 2014 18:11:30 -0700 Subject: [PATCH 03/87] prevent non-fakes from joining fake net --- arvo/ames.hoon | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arvo/ames.hoon b/arvo/ames.hoon index 1b48fb425..c15350b30 100644 --- a/arvo/ames.hoon +++ b/arvo/ames.hoon @@ -54,7 +54,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))) == @@ -457,6 +458,7 @@ ++ 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) @@ -980,6 +982,8 @@ our `mace`[[0 rig] ~] `will`[[(sign:as:loy _@ (shaf %self (sham syp))) syp fak] ~] + fak.ton + fak == :: ++ czar !: :: czar:am From f9205418a151d43b013269e8bc7df1a6ac9c8eb1 Mon Sep 17 00:00:00 2001 From: ~hatteb-mitlyd Date: Tue, 3 Jun 2014 18:33:35 -0700 Subject: [PATCH 04/87] carriers get files from U2_LIB, new pill --- arvo/batz.hoon | 2 -- 1 file changed, 2 deletions(-) diff --git a/arvo/batz.hoon b/arvo/batz.hoon index 2c8274d3f..0b7be3fb1 100644 --- a/arvo/batz.hoon +++ b/arvo/batz.hoon @@ -1231,7 +1231,6 @@ `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) ~ :_ ~ @@ -1250,7 +1249,6 @@ :: %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) ~ From 6e00dd5ee3c648776193fd4fc41addedc2f8a2bf Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 4 Jun 2014 03:40:09 -0700 Subject: [PATCH 05/87] Tighten types on some vanes. --- arvo/clay.hoon | 188 +++++++++-------- arvo/eyre.hoon | 537 +++++++++++++------------------------------------ arvo/ford.hoon | 29 ++- arvo/gall.hoon | 101 ++++++---- arvo/hoon.hoon | 28 ++- arvo/zuse.hoon | 5 +- 6 files changed, 361 insertions(+), 527 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 79fdefba6..adb52905a 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1,21 +1,35 @@ -:: +!: :: clay (4c), revision control :: |= pit=vase => |% ++ gift :: out result <-$ - card -:: + $% [%ergo p=@p q=@tas r=@ud] :: version update + [%note p=@tD q=tank] :: debug message + [%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 -:: + $% [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill + [%want p=sock q=path r=*] :: to %ames + [%warp p=sock q=riff] :: to %clay + == :: ++ sign :: in result $-< - card + $% [%crud p=@tas q=(list tank)] :: by any + [%waft p=sock q=*] :: by %ames + [%went p=ship q=cape] :: by %ames + [%writ p=riot] :: by %clay + == :: -- => :::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 4cA, filesystem logic :: @@ -27,9 +41,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,13 +51,13 @@ :_ 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]] @@ -344,96 +358,76 @@ |= [now=@da eny=@ ski=sled] :: activate ^? :: opaque core |% :: - ++ take :: update - |= [tea=wire hen=duct hin=(hypo sign)] + :: + ++ call :: handle request + |= $: hen=duct + hic=(hypo ?([%soft p=*] kiss)) + == + =. hic =+ kyt=-:!>(q.hic) :: XX temporary + ?: (~(nest ut kyt) | p.hic) + hic + ~& [%clay-call-flub -.q.hic] + [kyt ((hard ?([%soft p=*] kiss)) q.hic)] + ?: ?=(%soft -.q.hic) + $(q.hic ((hard ?([%soft p=*] kiss)) p.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])))] + ?: =(%$ 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] + [(scot %p p.p.q.hic) (scot %p q.p.q.hic) r.q.hic] + [%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 +439,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) @@ -479,4 +469,40 @@ |=(a=(unit) (bind a |=(b=* [%noun b]))) :: ++ stay [%0 ruf] + ++ take :: accept response + |= [tea=wire hen=duct hin=(hypo sign)] + =. hin =+ kyn=-:!>(q.hin) :: XX temporary + ?: (~(nest ut kyn) | p.hin) + hin + ~& [%eyre-take-flub -.q.hin] + [kyn ((hard sign) q.hin)] + ^- [p=(list move) q=_..^$] + ?- -.q.hin + %crud + [[[hen %slip %d %flog 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 + [%toss %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/eyre.hoon b/arvo/eyre.hoon index a657f4737..1f24f9cfb 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -5,38 +5,46 @@ => =~ |% :: metastructures ++ gift :: out result <-$ - card -:: + $% [%thou p=httr] :: raw http response + [%thus p=@ud q=(unit hiss)] :: http request/cancel + == :: ++ kiss :: in request ->$ - card -:: + $% [%born ~] :: new unix process + [%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 -:: + $% [%exec p=@p q=(unit silk)] :: to %ford + [%hail ~] :: to %batz + [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill + [%line p=@t] :: to %batz + [%ling ~] :: to %batz + [%show p=hasp q=(unit hope)] :: to %gall + [%this p=? q=clip r=httq] :: to %eyre + [%thud ~] :: to %eyre + [%want p=sock q=path r=*] :: to %ames + [%warp p=sock q=riff] :: to %clay + == :: ++ sign :: in result $-< - card + $% [%crud p=@tas q=(list tank)] :: by any + [%helo p=path q=prod] :: by %batz + [%made p=(each beet (list tank))] :: by %ford + [%talk p=tank] :: by %batz + [%tell p=(list ,@t)] :: by %batz + [%text p=tape] :: by %batz + [%thou p=httr] :: by %eyre + [%waft p=sock q=*] :: by %ames + [%warn p=tape] :: by %batz + [%went p=ship q=cape] :: by %ames + [%writ p=riot] :: by %clay + == -- |% :: 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)) - -- ++ bolo :: eyre state $: %0 :: version gub=@t :: random identity @@ -92,14 +100,9 @@ $: pef=@t :: server prefix wup=(map hole cyst) :: secure sessions cah=(map cash vase) :: compilation cache - :: wez=(map duct root) :: all routes == :: -- :: |% -++ 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) @@ -183,10 +186,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 +204,87 @@ ++ adit .(ney (mix eny ney)) :: - ++ apex - |- ^+ + - ?+ -.fav - +.$(mow [[hen %give fav] mow]) + ++ axon + |= [tea=wire sin=sign] + ^+ +> + ?- -.sin + %crud + +>.$(mow [[hen %slip %d %flog sin] mow]) :: - %born +(ged hen) :: register external + %made + ?. ?=([%honk @ @ @ ~] tea) + +>.$ + %- galt + [(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) p.sin] + :: + %thou :: remote return + ?> ?=([@ @ *] tea) + (hajj (need (slaw %p i.tea)) (need (slaw %p i.t.tea)) t.t.tea p.sin) + :: + %waft + ?. ?=([%hork @ ~] tea) + +>.$ + (gosh q.p.sin (need (slaw %ud i.t.tea)) ((hard httr) q.sin)) + :: + %went + +>.$ + :: + %writ + ?. ?=([%hoot @ @ @ ~] tea) + +>.$ + %- gout + [(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) p.sin] + :: + ?(%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)) sin] + == + :: + ++ apex + |= kyz=kiss + ^+ +> + ?- -.kyz + %born +>.$(ged hen) :: register external %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 +295,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 @@ -336,12 +343,12 @@ abet:work:(~(inch ya [our ses] u.suf u.cuz) num mez) :: ++ goat - |= [our=ship ses=hole num=@ud fav=card] + |= [our=ship ses=hole num=@ud sin=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 sin) :: ++ gosh :: receive %pr response |= [him=ship num=@ud har=httr] @@ -629,8 +636,8 @@ 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] @@ -825,23 +832,23 @@ %_(+> aut.ced (~(put ju aut.ced) %$ (scot %p him))) :: ++ dodo :: console s->c - |= [con=@ud fav=card] + |= [con=@ud sin=sign] ^+ +> =+ cal=(need (~(get by cow) con)) =+ ^= jon ^- json - ?: ?=(%helo -.fav) + ?: ?=(%helo -.sin) %+ 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.sin |=(a=@ta [%s a]))]] + [%prod ~[%a [%s p.q.sin] (jape q.q.sin) (jape r.q.sin)]] == %+ 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)]~ + ?+ -.sin ~|(-.sin !!) + %tell (turn p.sin |=(a=@t [%s a])) + %text [%s (crip p.sin)]~ + %talk (turn (~(win re p.sin) [0 80]) |=(a=tape [%s (crip a)])) + %warn [%s (crip '!' p.sin)]~ == =+ ^= yov ^- (list ,@ud) =+ yov=(~(get by voy.cal) ono.cal) @@ -1165,296 +1172,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,6 +1197,7 @@ %way [[~ pip] +>.$] %new ?- -.som.pip + %ape !! %apg :: XX a mere stub ~& [%wink-apg p.som.pip r.som.pip] :- [~ pip(pez %way)] @@ -1715,7 +1449,7 @@ =. 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]) @@ -1858,26 +1592,27 @@ |= [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 ?([%soft p=*] kiss)) + == + =. hic =+ kyt=-:!>(q.hic) :: XX temporary + ?: (~(nest ut kyt) | p.hic) + hic + ~& [%eyre-call-flub -.q.hic] + [kyt ((hard ?([%soft p=*] 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)) + ?: ?=(%soft -.q.hic) + $(q.hic ((hard ?([%soft p=*] kiss)) p.q.hic)) ^- [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) @@ -1894,4 +1629,20 @@ ~ :: ++ stay `bolo`+>-.$ +++ take :: accept response + |= [tea=wire hen=duct hin=(hypo sign)] + =. hin =+ kyn=-:!>(q.hin) :: XX temporary + ?: (~(nest ut kyn) | p.hin) + hin + ~& [%eyre-take-flub -.q.hin] + [kyn ((hard sign) q.hin)] + ^- [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 q.hin) + [mos ..^$] -- diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 0dedf9fde..5ce5724c2 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -14,10 +14,10 @@ == :: ++ move ,[p=duct q=(mold note gift)] :: local move ++ note :: out request $-> - $% [%warp p=sock q=riff] :: see %clay + $% [%warp p=sock q=riff] :: to %clay == :: ++ sign :: in result $-< - $% [%writ p=riot] :: see %clay + $% [%writ p=riot] :: by %clay == :: -- :: |% :: structures @@ -161,7 +161,11 @@ ++ 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])) @@ -533,7 +537,7 @@ ++ make :: reduce silk |= [cof=cafe kas=silk] ^- (bolt cage) - ~& [%ford-make kas] + ~& [%ford-make -.kas] ?- -.kas ^ %. [cof p.kas q.kas] @@ -638,9 +642,12 @@ |% :: ++ call :: request |= [hen=duct hic=(hypo kiss)] - ?. (~(nest ut -:!>(q.hic)) | p.hic) :: XX temporary - ~& [%ford-call-flub -.q.hic] - !! + =. hic =+ kyt=-:!>(q.hic) :: XX temporary + ?: (~(nest ut kyt) | p.hic) + hic + ~& [%ford-call-flub -.q.hic] + [kyt ((hard kiss) q.hic)] + ^- [p=(list move) q=_..^$] =+ ska=(slod ski) ?: ?=(%soft -.q.hic) $(q.hic ((hard kiss) p.q.hic)) @@ -673,9 +680,11 @@ ++ stay `axle`+>-.$ ++ take :: response |= [tea=wire hen=duct hin=(hypo sign)] - ?. (~(nest ut -:!>(q.hin)) | p.hin) :: XX temporary - ~& [%ford-take-flub -.q.hin] - !! + =. hin =+ kyn=-:!>(q.hin) :: XX temporary + ?: (~(nest ut kyn) | p.hin) + hin + ~& [%ford-take-flub -.q.hin] + [kyn ((hard sign) q.hin)] ^- [p=(list move) q=_..^$] =+ ska=(slod ski) ?> ?=([@ @ @ ~] tea) diff --git a/arvo/gall.hoon b/arvo/gall.hoon index 0f8959444..6f1a9e01a 100644 --- a/arvo/gall.hoon +++ b/arvo/gall.hoon @@ -11,7 +11,7 @@ ++ bone ,@ud :: opaque duct ++ gift :: out result <-$ $% [%back p=?] :: %mess ack good/bad - [%bust ~] :: reset duct + [%boot ~] :: app boot/reboot [%crud p=@tas q=(list tank)] :: error [%rash p=json] :: web reaction [%rasp p=cage] :: urbit reaction @@ -42,7 +42,11 @@ $: bum=(map ,@ta seat) :: apps by name == :: ++ move ,[p=duct q=(mold note gift)] :: typed move -++ note curd :: out request $-> +++ note :: out request $-> + $% [%exec p=@p q=(unit silk)] :: to %ford + [%meta p=vase] :: meta-note + [%warp p=sock q=riff] :: to %clay + == :: ++ rapt |*(a=$+(* *) (qual path path ,@da a)) :: versioned result ++ scar :: opaque duct system $: p=@ud :: bone sequence @@ -58,9 +62,9 @@ zam=scar :: opaque ducts == :: ++ sign :: in result $-< - $% [%made p=(each beet (list tank))] :: computed result + $% [%made p=(each beet (list tank))] :: by %ford [%ruse p=curd] :: user wrapper - [%writ p=riot] :: version result + [%writ p=riot] :: by %clay == :: ++ toil (pair duct knob) :: work in progress -- :::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -127,9 +131,11 @@ |% :: 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)) + =. hic =+ kyt=-:!>(q.hic) :: XX temporary + ?: (~(nest ut kyt) | p.hic) + hic + ~& [%gall-call-flub -.q.hic] + [kyt ((hard kiss) q.hic)] |- ^- [p=(list move) q=_..^^$] =+ =| law=(unit cuff) |- ^- $: law=(unit cuff) @@ -150,9 +156,11 @@ :: ++ 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)) + =. hin =+ kyn=-:!>(q.hin) :: XX temporary + ?: (~(nest ut kyn) | p.hin) + hin + ~& [%gall-call-flub -.q.hin] + [kyn ((hard sign) q.hin)] ^- [p=(list move) q=_..^$] =+ lum=(lump pax) =< abet =< work @@ -331,8 +339,9 @@ ++ conf :: configured core |= vax=vase ^- silk + :: (core vax) :+ %mute (core vax) - :~ [[%$ 6]~ (cave !>([[our app] now eny]))] + :~ [[%$ 12]~ (cave !>([[our app] 0 0 eny now]))] == ++ core |=(vax=vase (cove %core vax)) :: core as silk ++ cove :: cage as silk @@ -342,23 +351,26 @@ :: ++ drug :: set dependencies |= pen=(set (pair ship desk)) + ~& [%drug-want ped.sat] ^+ +> =+ ^= new ^- (list move) %+ turn %+ skip (~(tap in pen) ~) |=(a=(pair ship desk) (~(has in ped.sat) a)) |= a=(pair ship desk) + ~& [%drug-gain a] :- 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)]] + :^ %toss %c (away %s %drug ~) + [%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) + ~& [%drug-stop a] :- hen - :^ %toss %c (away %s %drug (scot %p p.a) q.a ~) - `card`[%warp [our p.a] q.a ~] + :^ %toss %c (away %s %drug ~) + [%warp [our p.a] q.a ~] %_(+>.$ ped.sat pen, mow :(weld new old mow)) :: ++ drum :: raw dependencies @@ -381,11 +393,6 @@ :_(mow [hen [%toss %f (away [%s pan ~]) [%exec our `kas]]]) == :: - ++ gate :: gate as silk - |= [arm=term kas=silk] - ^- silk - [%pass kas [%1 [%cnzy arm]]] - :: ++ give :: return card |= gip=gift %_(+> mow [[hen %give gip] mow]) @@ -394,12 +401,17 @@ ++ game :: invoke core |= [[pan=term arm=term] vax=vase sam=vase] %+ ford pan - [%call (gate arm (conf vax)) (cove %$ sam)] + [%call (harm arm (conf vax)) (cove %$ sam)] + :: + ++ harm :: arm as silk + |= [arm=term kas=silk] + ^- silk + [%pass kas [%1 [%cnzy arm]]] :: ++ home :: load application ^- silk :+ %boil %core - [[our %main [%da now]] %app ~] + [[our %main [%da now]] app %app ~] :: ++ more :: accept result |= $: pax=path :: internal position @@ -415,16 +427,19 @@ %- ~(put to vey.sat) [hen [%take t.pax (spec (slot 3 hin))]] == + ?. ?=([%s @ ~] pax) + ~& [%more-pax pax] + !! ?> ?=([%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) + & ~& %boot-good + (drum:(morn:gone q.q.p.p.q.hin) p.p.p.q.hin) + | ~& %boot-lost + (mort p.p.q.hin) == :: %drug @@ -434,12 +449,13 @@ +>.$(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)) + & ~& %step-good + %- 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) + | ~& %step-fail + (give %crud %made p.p.q.hin) == == :: @@ -471,10 +487,26 @@ ^+ +> %_(+> vey.sat (~(put to vey.sat) hen %show hup)) :: + ++ sumo :: standard gift + |= vig=vase + ^- gift + ?+ q.vig [%meta vig] + [%rasp *] + :+ %rasp + ((hard lode) +<.q.vig) + (slot 7 vig) + :: + [%rust *] + :^ %rust + ((hard ,@da) +<.q.vig) + ((hard lode) +>-.q.vig) + (slot 15 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 !!) :: @@ -484,7 +516,7 @@ [%meta (spec (slot 15 caq))] :: [%give p=[p=@tas q=*]] - [%give [%meta (spec (slot 3 caq))]] + [%give (sumo (spec (slot 3 caq)))] :: [%slip p=@tas q=[p=@tas q=*]] :+ %slip @@ -502,6 +534,7 @@ ++ yawn :: start event |= kon=knob ^+ +> + ~& [%gall-yawn -.kon] =. qic.sat `[hen kon] ?- -.kon %boot @@ -510,9 +543,9 @@ %+ ford %boot ^- silk :+ %call - (gate %prep home) + (harm %prep home) ?~ huv.sat nile - [nile (gate %save (conf u.huv.sat))] + [nile (harm %save (conf u.huv.sat))] :: %crud ~& %yawn-crud @@ -541,7 +574,7 @@ ~& %yawn-show ?~ huv.sat ~& [%show-none our app] - gone:(give %bust ~) + gone:(give %boot ~) %^ game [%step %peer] u.huv.sat !>([ost use p.kon]) :: diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index c60566b1c..a080ace3a 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -5700,19 +5700,18 @@ ~(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 +++ spuc |= vax=vase vax :: @@ -9043,6 +9042,7 @@ |% ++ arch ,[p=@uvI q=(unit ,@uvI) r=(map ,@ta ,~)] :: fundamental node ++ bead ,[[p=ship q=desk r=case] s=path] :: global name +++ bone ,@ud :: opaque ++ care ?(%$ %u %v %w %x %y %z) :: namespace mode ++ case :: version $% [%da p=@da] :: date @@ -9073,8 +9073,22 @@ == :: ++ glob ,[p=logo q=ship r=mark] :: global brand ++ herd (hypo curd) :: typed card +++ hide :: computation state + $: own=[p=ship q=@tas] :: static identity + $= seq :: dynamic sequence + $: but=@ud :: boot number + num=@ud :: action number + eny=@ :: 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 $_ ^? :: diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 764636586..3eb6e902c 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -2192,7 +2192,7 @@ [%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 + [%wart p=sock q=@tas r=path s=*] :: network request [%went p=ship q=cape] :: reaction message [%wipe ~] :: clean to sequence [%word p=chum] :: set password @@ -2565,7 +2565,8 @@ pus=(unit ,@ta) :: password == :: ++ seam :: logical request - $% [%apg p=term q=logo r=path] :: app get + $% [%ape p=term q=@ud] :: await update + [%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 From 85a7688693caa7ebbe08bbd1ecef3d515abb5fd7 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 4 Jun 2014 10:56:30 -0700 Subject: [PATCH 06/87] Various fixes and improvements. --- arvo/clay.hoon | 7 +++--- arvo/eyre.hoon | 61 ++++++++++++++++++++++++++++++++++++++++---------- arvo/ford.hoon | 7 +++--- arvo/gall.hoon | 27 ++++++++++++++-------- 4 files changed, 73 insertions(+), 29 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 04a410351..e48a57bd1 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -358,18 +358,17 @@ |= [now=@da eny=@ ski=sled] :: activate ^? :: opaque core |% :: - :: ++ call :: handle request |= $: hen=duct - hic=(hypo ?([%soft p=*] kiss)) + hic=(hypo (hobo kiss)) == =. hic =+ kyt=-:!>(q.hic) :: XX temporary ?: (~(nest ut kyt) | p.hic) hic ~& [%clay-call-flub -.q.hic] - [kyt ((hard ?([%soft p=*] kiss)) q.hic)] + [kyt ((hard (hobo kiss)) q.hic)] ?: ?=(%soft -.q.hic) - $(q.hic ((hard ?([%soft p=*] kiss)) p.q.hic)) + $(q.hic ((hard (hobo kiss)) p.q.hic)) ^- [p=(list move) q=_..^$] ?- -.q.hic %init diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index 1f24f9cfb..b5f284ccb 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -24,7 +24,7 @@ [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill [%line p=@t] :: to %batz [%ling ~] :: to %batz - [%show p=hasp q=(unit hope)] :: to %gall + [%shah p=hasp q=(unit hope)] :: to %gall [%this p=? q=clip r=httq] :: to %eyre [%thud ~] :: to %eyre [%want p=sock q=path r=*] :: to %ames @@ -34,6 +34,8 @@ $% [%crud p=@tas q=(list tank)] :: by any [%helo p=path q=prod] :: by %batz [%made p=(each beet (list tank))] :: by %ford + :: [%rush p=@da q=json] :: by %gall + [%rust p=@da q=cage] :: by %gall [%talk p=tank] :: by %batz [%tell p=(list ,@t)] :: by %batz [%text p=tape] :: by %batz @@ -216,6 +218,11 @@ +>.$ %- galt [(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) p.sin] + :: + %rust + ?> ?=([%hove @ @ @ ~] tea) + %- gojo + [(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) +.sin] :: %thou :: remote return ?> ?=([@ @ *] tea) @@ -342,7 +349,7 @@ ?~ cuz +>.$ abet:work:(~(inch ya [our ses] u.suf u.cuz) num mez) :: - ++ goat + ++ goat :: console response |= [our=ship ses=hole num=@ud sin=sign] =+ suf=(~(get by own) our) ?~ suf +>.$ @@ -350,6 +357,14 @@ ?~ cuz +>.$ abet:work:(~(dodo ya [our ses] u.suf u.cuz) num sin) :: + ++ gojo :: app result + |= [our=ship ses=hole num=@ud wen=@da cay=cage] + =+ suf=(~(get by own) our) + ?~ suf +>.$ + =+ cuz=(~(get by wup.u.suf) ses) + ?~ cuz +>.$ + abet:work:(~(dojo ya [our ses] u.suf u.cuz) num wen cay) + :: ++ gosh :: receive %pr response |= [him=ship num=@ud har=httr] ^+ +> @@ -463,14 +478,14 @@ [%want [sor.rot him] [%q %pr %e %hork mun ~] ~] == :: - ++ hoth :: simple app request - |= [our=ship num=@ud ses=hole app=term hop=hope] + ++ hove :: app peek + |= [our=ship num=@ud ses=hole app=term pax=path] %_ +> mow :_ mow :^ hen %toss %g - :- [%hoth (scot %p our) ses (scot %ud num) ~] - [%show [our app] ~ hop] + :- [%hove (scot %p our) ses (scot %ud num) ~] + [%shah [our app] `[%| pax]] == :: ++ hork :: remote request @@ -860,6 +875,28 @@ =. cow (~(put by cow) con cal) ?~(yov +>.$ (dove ~[%a (jone ono.cal) (jone ino.cal) jon] yov)) :: + ++ dojo :: app view + |= [num=@ud wen=@da cay=cage] + ^+ +> + =+ pup=(~(get by q.rey) num) + ?~ pup ~&([%dojo-lost ses num] +>.$) + ~& [%dojo num wen] + ?> ?=(%way pez.u.pup) + ?> ?=(%apg -.som.u.pup) + =+ bek=`beak`[our %main [%da now]] + =+ kas=`silk`[%cast %mime bek [%cast q.som.u.pup bek [%done ~ cay]]] + +>.$(..ya (honk our num ses kas)) + :: + ++ iota :: 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)] ^+ +> @@ -876,7 +913,7 @@ ^- (unit seam) ?> ?=(^ fur) ?> ?=(^ paw) - `[%apg u.fur i.paw t.paw] + `[%apg i.paw u.fur t.paw] :: ++ flea :: permissive decimal |= txt=@t @@ -1198,10 +1235,10 @@ %new ?- -.som.pip %ape !! - %apg :: XX a mere stub + %apg :: simple get ~& [%wink-apg p.som.pip r.som.pip] :- [~ pip(pez %way)] - +>.$(..ya (hoth our num ses q.som.pip %& r.som.pip)) + +>.$(..ya (hove our num ses p.som.pip r.som.pip)) :: %apl !! %apm !! @@ -1594,19 +1631,19 @@ |% :: ++ call :: handle request |= $: hen=duct - hic=(hypo ?([%soft p=*] kiss)) + hic=(hypo (hobo kiss)) == =. hic =+ kyt=-:!>(q.hic) :: XX temporary ?: (~(nest ut kyt) | p.hic) hic ~& [%eyre-call-flub -.q.hic] - [kyt ((hard ?([%soft p=*] kiss)) q.hic)] + [kyt ((hard (hobo 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 ?: ?=(%soft -.q.hic) - $(q.hic ((hard ?([%soft p=*] kiss)) p.q.hic)) + $(q.hic ((hard (hobo kiss)) p.q.hic)) ^- [p=(list move) q=_..^$] =. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-')) =^ mos bol diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 5ce5724c2..3b5085f1a 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -10,7 +10,6 @@ == :: ++ 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 $-> @@ -641,16 +640,16 @@ ^? :: opaque core |% :: ++ call :: request - |= [hen=duct hic=(hypo kiss)] + |= [hen=duct hic=(hypo (hobo kiss))] =. hic =+ kyt=-:!>(q.hic) :: XX temporary ?: (~(nest ut kyt) | p.hic) hic ~& [%ford-call-flub -.q.hic] - [kyt ((hard kiss) q.hic)] + [kyt ((hard (hobo kiss)) q.hic)] ^- [p=(list move) q=_..^$] =+ ska=(slod ski) ?: ?=(%soft -.q.hic) - $(q.hic ((hard kiss) p.q.hic)) + $(q.hic ((hard (hobo kiss)) p.q.hic)) =+ ^= our ^- @p ?- -.q.hic %exec p.q.hic diff --git a/arvo/gall.hoon b/arvo/gall.hoon index 6f1a9e01a..7cf403ead 100644 --- a/arvo/gall.hoon +++ b/arvo/gall.hoon @@ -13,10 +13,10 @@ $% [%back p=?] :: %mess ack good/bad [%boot ~] :: app boot/reboot [%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 + [%rasp p=cage] :: reaction message + [%rush p=@da q=json] :: difference (web) + [%rusk p=@da q=cage] :: difference (urbit) + [%rust p=@da q=cage] :: full update [%meta p=vase] :: meta-gift == :: ++ kiss :: in request ->$ @@ -26,8 +26,8 @@ [%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 + [%shah p=hasp q=(unit hope)] :: web subscribe/cancel + [%show p=hasp q=(unit hope)] :: urb subscribe/cancel [%soft p=*] :: soft kiss == :: ++ knob :: pending action @@ -35,7 +35,8 @@ [%crud p=@tas q=(list tank)] :: error [%mess p=cage] :: message [%nuke ~] :: reboot - [%show p=(unit hope)] :: subscription + [%shah p=(unit hope)] :: web subscribe/cancel + [%show p=(unit hope)] :: urb subscribe/cancel [%take p=path q=vase] :: user result == :: ++ mast :: apps by ship @@ -147,7 +148,7 @@ %mesh !! %mess [law p.q.hic %mess q.q.hic] %mush !! - %shah !! + %shah [law p.q.hic %shah q.q.hic] %show [law p.q.hic %show q.q.hic] %soft $(q.hic ((hard kiss) p.q.hic)) %nuke [law p.q.hic %nuke ~] @@ -576,7 +577,15 @@ ~& [%show-none our app] gone:(give %boot ~) %^ game [%step %peer] u.huv.sat - !>([ost use p.kon]) + !>([ost use | p.kon]) + :: + %shah + ~& %yawn-shah + ?~ huv.sat + ~& [%show-none our app] + gone:(give %boot ~) + %^ game [%step %peer] u.huv.sat + !>([ost use & p.kon]) :: %take ~& %yawn-take From b6f3e6134405cebccc5364c729896b2740cadbe9 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 4 Jun 2014 14:24:01 -0700 Subject: [PATCH 07/87] Slowly advancing %batz. Some translators, etc. --- arvo/batz.hoon | 95 ++++++++- arvo/eyre.hoon | 12 +- arvo/ford.hoon | 3 + arvo/gall.hoon | 1 + main/sys/hoon/ref/gate.hoon | 3 + main/sys/html/ref/gate.hoon | 2 + main/sys/html/tan/mime/gate.hoon | 3 + main/sys/md/ref/gate.hoon | 1 + main/sys/md/tan/html/gate.hoon | 342 +++++++++++++++++++++++++++++++ main/sys/md/tan/mime/gate.hoon | 3 + 10 files changed, 460 insertions(+), 5 deletions(-) create mode 100644 main/sys/hoon/ref/gate.hoon create mode 100644 main/sys/html/ref/gate.hoon create mode 100644 main/sys/html/tan/mime/gate.hoon create mode 100644 main/sys/md/ref/gate.hoon create mode 100644 main/sys/md/tan/html/gate.hoon create mode 100644 main/sys/md/tan/mime/gate.hoon diff --git a/arvo/batz.hoon b/arvo/batz.hoon index 0b7be3fb1..1a0c5147f 100644 --- a/arvo/batz.hoon +++ b/arvo/batz.hoon @@ -1,4 +1,4 @@ -:: +!: :: batz (4b), shell :: |= pit=vase @@ -1263,7 +1263,98 @@ :: ++ call :: process move |= [hen=duct hic=(hypo kiss)] - (take ~ hen hic) + ^- [p=(list move) q=_..^$] + :: ~& [%batz-take -.q.hic [%tea tea] [%hen hen]] + =+ ska=(slod ski) + =+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a])))) + ?: ?=([%crud *] q.hic) + [[[hen [%slip %d %flog q.hic]] ~] ..^$] + ?: ?=([%soft *] q.hic) + $(q.hic ((hard card) p.q.hic)) + ?: ?=(%wake -.q.hic) + =+ ^= fiy + =| fiy=(list ,[p=duct q=ship r=[p=@ud q=@ud r=wire]]) + |- ^+ fiy + ?~ dez fiy + =. fiy $(dez l.dez) + =. fiy $(dez r.dez) + |- ^+ fiy + ?~ q.n.dez fiy + %= $ + q.n.dez t.q.n.dez + fiy + |- ^+ fiy + ?~ tem.q.i.q.n.dez fiy + =. fiy $(tem.q.i.q.n.dez l.tem.q.i.q.n.dez) + =. fiy $(tem.q.i.q.n.dez r.tem.q.i.q.n.dez) + ?. (lte q.n.tem.q.i.q.n.dez now) fiy + [[p.n.dez p.i.q.n.dez p.n.tem.q.i.q.n.dez] fiy] + == + =| wam=(list move) + |- ^- [p=(list move) q=_..^^$] + ?~ fiy [wam ..^^$] + =+ dos=(need (~(get by dez) p.i.fiy)) + =+ suy=|-(`brad`?~(dos !! ?.(=(q.i.fiy p.i.dos) $(dos t.dos) q.i.dos))) + =+ geb=((be [[q.i.fiy bred] suy]) now eny sky) + =+ ^= yub ^- [p=(list move) q=brat] + ?. (fang:geb r.i.fiy) + ~& [%time-lost r.i.fiy] + [~ abet:(flub:geb r.i.fiy)] + (lake:geb p.i.fiy r.i.fiy) + %= $ + fiy t.fiy + wam (weld p.yub wam) + dez.^^$ (~(put by dez.^^$) p.i.fiy [[q.i.fiy +.q.yub] +.dos]) + == + |- ^- [p=(list move) q=_..^^$] + =+ dus=(~(get by dez) hen) + ?~ dus + ?+ -.q.hic + ~& [%take-none -.q.hic ~ hen] + ~|([%take-none -.q.hic] !!) + :: + %hail + ?~ big + ~& [%take-hail-soon hen] + [~ ..^^$] + ~& [%batz-hack-console hen] + $(dez (~(put by dez) hen [[u.big (bard u.big)] ~])) + :: + %init + :: ~& [%take-init p.q.hic hen] + =. big ?~ big + `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.hic (bard p.q.hic)] ~])) + :: + ?(%loin %make %sith) + [[[hen [%toss %a ~ q.hic]] ~] ..^^$] + == + ?> ?=(^ u.dus) + ?+ -.q.hic + =+ beg=`brat`[[p.i.u.dus bred] q.i.u.dus] + =+ yub=(leap:((be beg) now eny sky) ~ hen q.hic) + :- p.yub + ..^^$(dez (~(put by dez) hen [[p.i.u.dus +.q.yub] t.u.dus])) + :: + %init + =+ bos=(sein p.q.hic) + :- :* [hen %give q.hic] + [[[%b ~] hen] [%sick %hail ~]] + ?: =(bos p.q.hic) ~ + :_ ~ + [[/b hen] [%sick %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]] + == + ..^^$(dez (~(put by dez) hen [[p.q.hic (bard p.q.hic)] u.dus])) + :: + %limn + $(q.hic [%hail ~], dez (~(put by dez) hen (weld t.u.dus `brim`[i.u.dus ~]))) + == :: ++ doze |= [now=@da hen=duct] diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index b5f284ccb..ae9ce6b33 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -10,6 +10,7 @@ == :: ++ kiss :: in request ->$ $% [%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 @@ -254,6 +255,8 @@ ^+ +> ?- -.kyz %born +>.$(ged hen) :: register external + %crud + +>.$(mow [[hen %slip %d %flog kyz] mow]) %init :: register ownership %_ +>.$ hov ?~(hov [~ p.kyz] [~ (min u.hov p.kyz)]) @@ -1175,6 +1178,7 @@ ++ inch :: function built |= [num=@ud mez=(each beet (list tank))] ^+ +> + ~& [%inch num -.mez] =+ pup=(~(get by q.rey) num) ?~ pup ~& [%inch-lost ses num mez] @@ -1583,21 +1587,23 @@ [~ pip(pez [%fin %wan 'Hello, world' ~])] :: [%fud *] - ?> ?=(%fun -.som.pip) + =+ ^= mog + ?: ?=(%fun -.som.pip) r.som.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 (lofi mog (lopo q.p.p.pez.pip))] == == :: diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 3b5085f1a..b50c579c9 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -303,6 +303,7 @@ :: ++ expo :: return gift |= gef=gift + ~& [%expo -.gef] %_(+> mow :_(mow [hen %give gef])) :: ++ fade :: compile @@ -641,6 +642,7 @@ |% :: ++ call :: request |= [hen=duct hic=(hypo (hobo kiss))] + ~& [%ford-call (,@tas -.q.hic)] =. hic =+ kyt=-:!>(q.hic) :: XX temporary ?: (~(nest ut kyt) | p.hic) hic @@ -679,6 +681,7 @@ ++ stay `axle`+>-.$ ++ take :: response |= [tea=wire hen=duct hin=(hypo sign)] + ~& [%ford-take (,@tas -.q.hin)] =. hin =+ kyn=-:!>(q.hin) :: XX temporary ?: (~(nest ut kyn) | p.hin) hin diff --git a/arvo/gall.hoon b/arvo/gall.hoon index 7cf403ead..8e5f46413 100644 --- a/arvo/gall.hoon +++ b/arvo/gall.hoon @@ -21,6 +21,7 @@ == :: ++ kiss :: in request ->$ $% [%cuff p=(unit cuff) q=kiss] :: controlled kiss + [%crud p=@tas q=(list tank)] :: XX rethink [%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) 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..730948e87 --- /dev/null +++ b/main/sys/html/tan/mime/gate.hoon @@ -0,0 +1,3 @@ +|= * +|= htm=@ +[/text/html (met 3 htm) htm] 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 + :~ '
' '
' '