diff --git a/arvo/batz.hoon b/arvo/batz.hoon index 9e7c2794a1..2b2f93da03 100644 --- a/arvo/batz.hoon +++ b/arvo/batz.hoon @@ -73,6 +73,7 @@ [%mess p=hasp q=ship r=cage] :: [%nuke p=hasp q=ship] :: [%show p=hasp q=ship r=path] :: + [%wipe p=hasp] :: == == == :: ++ rave :: see %clay $% [& p=mood] :: single request diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index 3902c3c090..62f4bb87a0 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -413,6 +413,8 @@ ?< ?=(~ t.mab) =+ nap=(slav %ud i.t.mab) =+ sem=(need (~(get by can.sub.siq:beat:u.ouy) nap)) + ?: &(=(0 nap) =(~ s.sem)) + (hear:woy ~ %& %json !>((joba %reload %b %&))) =+ ^= cay ^- cage ?. ?=(%json p.+.sih) [p.+.sih (slot 3 (spec (slot 3 [typ +.sih])))] @@ -1135,6 +1137,38 @@ heart.beat() ''' :: + ++ duty + ;script:''' + if (auto) + { + var tries = 0; + var cnt = 0; + var next = "/gie/"+user+"/"+port+"/"+cnt; + call = function() { + xhr = new XMLHttpRequest(); + xhr.open('GET', next, true); + xhr.addEventListener('load', function() { + if ( this.status >= 500 ) { + return delay(); + } + cnt++; + if ( this.status >= 400 ) { + document.alert("neighbor, please."); + } + document.location.reload(); + }); + xhr.addEventListener('error', delay); + xhr.addEventListener('abort', delay); + xhr.send(); + } + delay = function() { + setTimeout(call,1000*tries); + tries++; + } + call(); + } + ''' + :: ++ fape :: dispatch %ape |= [fur=(unit term) you=@p paw=path] ^- (unit seam) @@ -1768,7 +1802,7 @@ |= [num=@ud app=term you=ship pax=path] ^+ +> ?< (~(has by sok) num) - abet:(~(self yo num you [-(tim.bet +)]:[*sink now]) app pax) + abet:(~(self yo num you *sink) app pax) :: ++ yokh :: heartbeat |= [num=@ud you=ship nap=@ud cnt=@ud jon=json] @@ -1888,6 +1922,7 @@ ++ self :: request main |= [app=term pax=path] ^+ +> + =. tim.bet.siq now =. can.sub.siq (~(put by can.sub.siq) 0 [[our app] pax hen `nap]) =. num.sub.siq +(num.sub.siq) (pass `0 [%g %show [our app] you pax]) @@ -1930,7 +1965,7 @@ =+ pip=u.pup =+ ^= sip ?. =(%apg -.som.pip) sip.pip - [duti sip.pip] + [duti duty sip.pip] ?~ huq +>.$(..yo (bust 404 num)) %= +>.$ q.rey diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 369c2b95b5..1da9741056 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -629,13 +629,13 @@ %+ cope (maul cof (slap gab [%cnzy %noun]) [%noun q.sam]) |= [cof=cafe pro=vase] ?: =(+<.q.pro q.sam) - (flaw cof [%leaf "ford: invalid content: {<[for bek]>}"]~) - (fine cof (slot 6 pro)) + (fine cof (slot 6 pro)) + (flaw cof [%leaf "ford: invalid content: {<[for bek]>}"]~) :: ++ lave :: validate |= [cof=cafe for=mark his=ship som=*] ^- (bolt vase) - ((lake for [his %main [%da now]]) cof [%noun som]) + ((lake for [our %main [%da now]]) cof [%noun som]) :: ++ lane :: type infer |= [cof=cafe typ=type gen=twig] diff --git a/arvo/gall.hoon b/arvo/gall.hoon index f0d84ec90f..10e361a17b 100644 --- a/arvo/gall.hoon +++ b/arvo/gall.hoon @@ -27,6 +27,7 @@ [%nuke p=hasp q=ship] :: clear duct [%rote p=sack q=term r=*] :: remote request [%roth p=sack q=term r=*] :: remote response + [%wipe p=hasp] :: forget app == :: ++ knob :: pending action $% [%boot ~] :: begin boot @@ -204,6 +205,11 @@ (gawk hen p.q.hic q.q.hic ((hard ,[@ud rook]) r.q.hic)) ?: ?=(%roth -.q.hic) (gawd hen p.q.hic q.q.hic ((hard ,[@ud roon]) r.q.hic)) + ?: ?=(%wipe -.q.hic) + =+ mat=(~(got by pol.all) p.p.q.hic) + =. bum.mat (~(del by bum.mat) q.p.q.hic) + =. pol.all (~(put by pol.all) p.p.q.hic mat) + [p=~ q=..^$] |- ^- [p=(list move) q=_..^^$] =+ =| law=(unit cuff) |- ^- $: law=(unit cuff) @@ -784,6 +790,7 @@ %= +>.$ sup.sat (~(del by sup.sat) ost) pus.sat (~(del ju pus.sat) pax ost) + peq.sat (~(del by peq.sat) ost) == == :: @@ -941,6 +948,7 @@ qic.sat ~ sup.sat (~(del by sup.sat) ost) pus.sat (~(del ju pus.sat) pax ost) + peq.sat (~(del by peq.sat) ost) == :: %mess diff --git a/main/app/appbug-2/core.hoon b/main/app/appbug-2/core.hoon index 962dc53c7f..365deea39e 100644 --- a/main/app/appbug-2/core.hoon +++ b/main/app/appbug-2/core.hoon @@ -1,5 +1,5 @@ !: -::::::::: Foobug: a simple application. +::::::::: Appbug: a simple application. :: |_ [hid=hide vat=[%0 p=@ud]] ++ poke @@ -14,7 +14,8 @@ ^- manx ;html ;head - ;title: Foobug! + ;title: Appbug! + ;script: appl = '{(trip app.hid)}' == ;body ;p: Dude, a better answer is {}. @@ -25,9 +26,9 @@ ; function bump() { ; xhr = new XMLHttpRequest(); ; xhr.onload = function() { mess++; } - ; xhr.open("PUT", "/tim/"+user+"/"+appl+"/"+port+"/"+mess); + ; xhr.open("PUT", "/tim/" + [user, port, mess].join("/")); ; xhr.setRequestHeader("content-type", "text/json"); - ; xhr.send(JSON.stringify({oryx: oryx, xyro: {}})); + ; xhr.send(JSON.stringify({oryx: oryx, xyro: {ship: ship, appl: appl, data: {}}})); ; } == == diff --git a/main/bin/chat.hoon b/main/bin/chat.hoon index 3da14aa742..a7e38df911 100644 --- a/main/bin/chat.hoon +++ b/main/bin/chat.hoon @@ -4,6 +4,7 @@ => %= . + => + + =* sed . => ^/===/lib/pony =+ ^= flag $? %leet @@ -78,7 +79,7 @@ ^- (unit ,[p=@t q=tank]) =+ hun=(rush a wide:vast) ?~ hun ~ - ?~(a ~ [~ a (sell (slap seed u.hun))]) + ?~(a ~ [~ a (sell (slap !>(sed) u.hun))]) :: ++ mess %+ cook |=(a=^mess a) diff --git a/main/bin/wipe.hoon b/main/bin/wipe.hoon new file mode 100644 index 0000000000..4ccdb4d3fa --- /dev/null +++ b/main/bin/wipe.hoon @@ -0,0 +1,11 @@ +!: +:: /=main=/bin/wipe/hoon +:: +=* our -< +|= * +|= gon=[term (pole term)] +:_ ~ +%+ turn `(list term)`gon +|= app=term +^- gift +[%xy /g %wipe [our app]] \ No newline at end of file diff --git a/main/lib/urb.js b/main/lib/urb.js index da82fe1075..883a7144d7 100644 --- a/main/lib/urb.js +++ b/main/lib/urb.js @@ -158,8 +158,11 @@ window.urb = { $this = this this.req(method,url,params,false,function(err,data) { + console.log(data) if(cb) { cb.call(this,err,{status: data.status, data: data.data.data}) + } else if (data.data.reload) { + document.location.reload() } else { fn = data.data.appl+","+data.data.path.replace(/[^\x00-\x7F]/g, "") +","+data.data.ship @@ -180,3 +183,5 @@ window.urb = { }) } } + +auto = false diff --git a/main/pro/down/core.hoon b/main/pro/down/core.hoon index 8a568eabd2..b27d3f4d5c 100644 --- a/main/pro/down/core.hoon +++ b/main/pro/down/core.hoon @@ -2,7 +2,14 @@ :::: /hoon/core/down/pro :: /? 314 -/- down +/- maud + !: +:::: describe + :: +=+ maud + :: +:::: compute + :: |_ don=down ++ grab :: convert from |% @@ -10,325 +17,268 @@ |= src=@t =< (mark (trip src)) |% - ++ cott - ;~ pose - (shim 0 8) - (shim 11 37) - (shim 39 59) - (just `@`61) - (shim 63 95) - (shim 97 255) - == - ++ copt - ;~ pose - (shim 0 9) - (shim 11 37) - (shim 39 39) - (shim 43 59) - (just `@`61) - (shim 63 90) - (shim 94 94) - (shim 97 255) - == - ++ urlc ;~(pose (shim 0 9) (shim 11 31) (shim 33 39) (shim 42 255)) - ++ uctt ;~(pose (shim 0 9) (shim 11 91) (shim 94 255)) - ++ uctc ;~(pose (shim 0 9) (shim 11 33) (shim 35 39) (shim 42 255)) - ++ htmc ;~(pose (shim 0 9) (shim 11 255)) - ++ escp (mask "\\`*_\{}[]()#+-.!") - ++ escd ;~(pfix bas escp) - ++ whit (mask (tape 9 32 ~)) - ++ dent ;~(pose (jest ' ') (just `@`9)) - ++ blan (cold ~ ;~(plug (star whit) (just `@`10))) - ++ mcat (bend |=([a=tape b=tape] (some (weld a b)))) - ++ wcat |*(a=_rule (cook |=([a=tape b=tape] (weld a b)) a)) - ++ codt - %+ knee *tape |. ~+ - ;~ pose - (wcat ;~(plug (plus cott) codt)) - (cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose codt (easy ~)))) - (cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose codt (easy ~)))) - (cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose codt (easy ~)))) - (plus cott) - == - ++ inlt - %+ knee *tape |. ~+ - ;~ pose - ;~(mcat (plus copt) inlt) - ;~(mcat (plus escd) inlt) - ;~ mcat - %- wcat - ;~ plug - ;~(plug gal (cook trip inle)) - ;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar) - == - inlt - == - ;~ mcat - %- wcat - ;~ plug - ;~(plug gal fas (cook trip inle)) - ;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar) - == - inlt - == - ;~ mcat - (wcat ;~(plug ;~(plug pam hax ;~(sfix (plus nud) sem)) (easy ";"))) - inlt - == - ;~ mcat - (wcat ;~(plug ;~(plug pam ;~(sfix (plus alf) sem)) (easy ";"))) - inlt - == - (cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose inlt (easy ~)))) - (cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose inlt (easy ~)))) - (cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose inlt (easy ~)))) - == - ++ kite - |= bud=(list ,@t) - |= tub=nail - |- ^- (like ,@t) - ?@ bud - (fail tub) - =+ foo=((jest i.bud) tub) - ?~ q.foo - $(bud t.bud) - foo - ++ bloc - %+ knee *@t |. ~+ - %- kite - :~ '
' '
' '