shrub/arvo/eyre.hoon

555 lines
20 KiB
Plaintext
Raw Normal View History

!: :: %eyre, http servant
2014-03-12 23:50:39 +04:00
!? 164
::::
2013-12-15 09:42:27 +04:00
|= pit=vase
2013-09-29 00:21:18 +04:00
=> =~
2014-06-07 22:36:31 +04:00
|% :: interfaces
2014-06-08 06:45:00 +04:00
++ chop ,[p=@ud q=@da] :: see
2014-06-03 09:07:32 +04:00
++ gift :: out result <-$
2014-07-15 06:45:04 +04:00
$% [%thou p=httr] :: raw http response
2014-06-04 14:40:09 +04:00
[%thus p=@ud q=(unit hiss)] :: http request/cancel
2014-10-04 02:32:10 +04:00
[%veer p=@ta q=path r=@t] :: drop-through
[%vega p=path] :: drop-through
2015-02-10 04:52:29 +03:00
== ::
2015-02-20 02:33:39 +03:00
++ gram :: inter-ship message
$? [[%lon ~] p=hole] :: login request
[[%aut ~] p=hole] :: login reply
[[%hat ~] p=hole q=hart] :: login redirect
== ::
2014-09-11 03:35:03 +04:00
++ hasp ,[p=ship q=term] :: don't see %gall
++ hapt ,[p=ship q=path] :: do see %gall
2014-06-03 09:07:32 +04:00
++ kiss :: in request ->$
2014-06-04 14:40:09 +04:00
$% [%born ~] :: new unix process
[%crud p=@tas q=(list tank)] :: XX rethink
2014-06-04 14:40:09 +04:00
[%init p=@p] :: report install
2015-02-06 08:00:35 +03:00
:: [%them p=(unit hiss)] :: outbound request
:: [%they p=@ud q=httr] :: inbound response
2014-06-04 14:40:09 +04:00
[%this p=? q=clip r=httq] :: inbound request
[%thud ~] :: inbound cancel
2015-02-20 02:33:39 +03:00
[%wart p=sock q=@tas r=_`[path *]`*gram] :: urbit message
2014-06-04 14:40:09 +04:00
== ::
2014-06-22 09:49:10 +04:00
++ move ,[p=duct q=(mold note gift)] :: local move
2014-06-03 09:07:32 +04:00
++ note :: out request $->
2015-02-10 04:52:29 +03:00
$%
:: $: %a :: to %ames
:: $% [%want p=sock q=path r=*] ::
:: == == ::
2014-06-22 06:51:12 +04:00
$: %c :: to %clay
$% [%warp p=sock q=riff] ::
== == ::
$: %d :: to %dill
$% [%flog p=[%crud p=@tas q=(list tank)]] ::
== == ::
$: %f :: to %ford
$% [%exec p=@p q=(unit silk)] ::
2015-02-19 00:35:22 +03:00
[%wasp p=@p q=@uvH] ::
2015-02-27 00:17:29 +03:00
== == == ::
2014-06-11 18:06:36 +04:00
++ rave :: see %clay
2015-02-10 04:52:29 +03:00
$% [& p=mood] ::
2014-06-11 18:06:36 +04:00
== ::
++ riff ,[p=desk q=(unit rave)] :: see %clay
2014-07-12 22:24:52 +04:00
++ silk :: see %ford
$& [p=silk q=silk] ::
$% [%boil p=mark q=beam r=path] ::
2014-07-27 14:26:17 +04:00
[%cast p=mark q=silk] ::
2014-07-12 22:24:52 +04:00
[%done p=(set beam) q=cage] ::
== ::
2014-10-04 02:32:10 +04:00
++ sine ::
$? sign ::
$: %g ::
$% [%veer p=@ta q=path r=@t] ::
[%vega p=path] ::
== == == ::
2014-06-22 09:49:10 +04:00
++ sign :: in result $<-
2015-02-27 00:17:29 +03:00
$? $: %c :: by %clay
2014-06-22 06:51:12 +04:00
$% [%writ p=riot] ::
== == ::
$: %f :: by %ford
2015-02-19 00:35:22 +03:00
$% [%made p=@uvH q=(each cage tang)] ::
[%news ~] ::
== == ::
2014-06-22 06:51:12 +04:00
$: @tas :: by any
$% [%crud p=@tas q=(list tank)] ::
== == == ::
-- ::
2014-06-07 22:36:31 +04:00
|% :: models
2013-09-29 00:21:18 +04:00
++ bolo :: eyre state
2014-05-31 02:10:39 +04:00
$: %0 :: version
gub=@t :: random identity
2014-06-10 00:09:14 +04:00
hov=(unit ship) :: master for remote
2014-03-12 23:50:39 +04:00
ged=duct :: client interface
ney=@uvI :: rolling entropy
dop=(map host ship) :: host aliasing
2015-02-17 01:06:58 +03:00
liz=(jug beam (each duct oryx)) :: clay subscriptions
2015-02-26 04:20:45 +03:00
wup=(map hole cyst) :: secure sessions
2014-06-10 00:09:14 +04:00
== ::
2015-02-18 00:05:28 +03:00
++ cyst :: client session
$: ced=cred :: credential
2015-02-26 04:20:45 +03:00
cez=[p=ship q=(set ship)] :: authenticated
2015-02-18 00:05:28 +03:00
cug=(list ,@t) :: unacked cookies
lax=@da :: last used
== ::
2014-03-12 23:50:39 +04:00
-- ::
|%
2015-02-18 00:05:28 +03:00
++ coss :: cookie search
|= [nam=@t mah=math]
^- (unit hole)
=+ ^= cok ^- (list ,@t)
=+ cok=(~(get by mah) 'cookie')
?~(cok ~ u.cok)
|- ^- (unit hole)
?~ cok ~
=+ mar=`(unit (list ,[p=@t q=@t]))`(rush i.cok cock:epur)
?~ mar $(cok t.cok)
|- ^- (unit hole)
?~ u.mar ^$(cok t.cok)
?:(=(nam p.i.u.mar) [~ q.i.u.mar] $(u.mar t.u.mar))
2013-09-29 00:21:18 +04:00
++ ecco :: eat headers
2015-02-06 08:00:35 +03:00
|= hed=(list ,[p=@t q=@t]) ^- math
%+ roll hed
|= [a=[p=cord cord] b=math]
=. p.a (cass (trip p.a))
(~(add ja b) a)
2015-02-17 02:19:58 +03:00
++ loga :: tanks to manx
|= tac=(list tank)
^- manx
=+ rolt=|=(a=wall `tape`?~(a ~ :(weld i.a "\0a" $(a t.a))))
=+ mec=(rolt (turn tac |=(a=tank (rolt (wash 0^160 a)))))
;html
;head
;meta(charset "utf-8");
;title: server error
==
;body:pre:code:"{mec}"
==
::
++ lode
2015-02-19 00:35:22 +03:00
|= [dep=@uvH max=manx]
2015-02-17 02:19:58 +03:00
^- manx
?> ?=([[%html ~] [[%head ~] *] [[%body ~] ^] ~] max) :: XX static
?~ dep max
2015-02-19 00:35:22 +03:00
max(c.i.c :_(c.i.c.max ;script@"/~/on/{<dep>}.js";))
2015-02-17 02:19:58 +03:00
::
2015-02-11 22:26:42 +03:00
++ js :: static javascript
|%
++ poll
'''
2015-02-14 06:43:17 +03:00
urb.tries = 0
2015-02-11 22:26:42 +03:00
urb.call = function() {
2015-02-14 06:43:17 +03:00
xhr = new XMLHttpRequest()
xhr.open('GET', urb.poll, true)
2015-02-11 22:26:42 +03:00
xhr.addEventListener('load', function() {
2015-02-17 02:19:58 +03:00
// if(~~(this.status / 100) == 4)
// return document.write(xhr.responseText)
if(this.status !== 205) {
2015-02-14 06:43:17 +03:00
return urb.keep()
2015-02-11 22:26:42 +03:00
}
2015-02-14 06:43:17 +03:00
document.location.reload()
})
xhr.addEventListener('error', urb.keep)
xhr.addEventListener('abort', urb.keep)
xhr.send()
2015-02-11 22:26:42 +03:00
}
urb.keep = function() {
2015-02-14 06:43:17 +03:00
setTimeout(urb.call,1000*urb.tries)
urb.tries++
2015-02-11 22:26:42 +03:00
}
2015-02-14 06:43:17 +03:00
urb.call()
2015-02-11 22:26:42 +03:00
'''
--
2013-09-29 00:21:18 +04:00
--
2014-03-12 23:50:39 +04:00
|% :: functions
++ ye :: per event
2014-06-04 14:40:09 +04:00
=| $: $: hen=duct :: event floor
2014-03-12 23:50:39 +04:00
$: now=@da :: event date
eny=@ :: unique entropy
2015-02-11 22:26:42 +03:00
our=ship :: current ship
2014-03-12 23:50:39 +04:00
sky=$+(* (unit)) :: system namespace
== ::
2014-03-12 23:50:39 +04:00
mow=(list move) :: pending actions
== ::
bolo :: all vane state
== ::
=* bol ->
|%
++ abet
^- [(list move) bolo]
[(flop mow) bol]
2013-09-29 00:21:18 +04:00
::
2014-03-12 23:50:39 +04:00
++ adit
.(ney (mix eny ney))
2013-09-29 00:21:18 +04:00
::
2015-02-26 04:20:45 +03:00
++ anon (add our ^~((bex 64))) :: pseudo-sub
2014-06-04 14:40:09 +04:00
++ axon
2014-06-22 09:49:10 +04:00
|= [tea=wire typ=type sih=sign]
2014-06-04 14:40:09 +04:00
^+ +>
2014-06-22 06:51:12 +04:00
?- -.+.sih
2014-06-04 14:40:09 +04:00
%crud
2014-06-22 06:51:12 +04:00
+>.$(mow [[hen %slip %d %flog +.sih] mow])
2015-02-10 04:52:29 +03:00
::
%made
?+ tea +>.$
2015-02-11 22:26:42 +03:00
~
2015-02-10 04:52:29 +03:00
:: ~& e/ford/hen
2015-02-12 00:10:07 +03:00
?- -.q.sih
2015-02-17 01:06:58 +03:00
| (fail 404 p.sih p.q.sih)
& =* cag p.q.sih
2015-02-14 06:43:17 +03:00
?+ p.cag (back ~ p.sih cag)
%hipo :: hacks!
?> ?=(@tas -.q.q.cag)
$(p.q.sih [-.q.q.cag (slot 3 q.cag)])
::
%mime
~| q.q.cag
=+ ((hard ,[mit=mite rez=octs]) q.q.cag) :: XX
(muff %thou 200 [content-type/(moon mit)]~ ~ rez)
==
2015-02-10 04:52:29 +03:00
==
==
::
2015-02-19 00:35:22 +03:00
%news (jive %b &) :: dependency updated
2015-02-10 04:52:29 +03:00
%writ
2015-02-17 01:06:58 +03:00
:: ?^ tea ~&(e/missed/writ/tea=tea +>.$)
2015-02-10 04:52:29 +03:00
?~ p.sih +>.$
2015-02-17 01:06:58 +03:00
=+ `[@ caz=case dez=desk]`p.u.p.sih
2015-02-10 04:52:29 +03:00
?> ?=(%ud -.caz)
2015-02-17 01:06:58 +03:00
(jive (joba dez (jone p.caz)))
2014-06-04 14:40:09 +04:00
==
::
++ apex
|= kyz=kiss
^+ +>
?- -.kyz
%born +>.$(ged hen) :: register external
%crud
+>.$(mow [[hen %slip %d %flog kyz] mow])
2014-03-23 23:42:18 +04:00
%init :: register ownership
2014-06-04 14:40:09 +04:00
%_ +>.$
hov ?~(hov [~ p.kyz] [~ (min u.hov p.kyz)])
2014-03-23 23:42:18 +04:00
==
2015-02-18 00:05:28 +03:00
::
2014-03-12 23:50:39 +04:00
%this :: inbound request
2014-06-04 14:40:09 +04:00
=* sec p.kyz :: ? :: https bit
=* heq r.kyz :: httq :: request content
2014-03-12 23:50:39 +04:00
=+ ryp=`quri`(rash q.heq zest:epur)
=+ mah=(ecco r.heq)
=+ ^= pul ^- purl
?- -.ryp
& ?>(=(sec p.p.p.ryp) p.ryp)
2015-02-11 22:26:42 +03:00
| =+ hot=(~(get ja mah) %host)
?> ?=([@ ~] hot)
[[sec (rash i.hot thor:epur)] p.ryp q.ryp]
2014-03-12 23:50:39 +04:00
==
2015-01-15 04:47:51 +03:00
=. p.p.pul |(p.p.pul ?=(hoke r.p.pul))
2014-06-04 14:40:09 +04:00
(hell pul +.kyz [p.heq mah s.heq])
::
%thud :: cancel request
2015-02-06 08:00:35 +03:00
~& e/gone/hen
+>.$
2015-02-20 02:33:39 +03:00
::
%wart :: remote request
=+ mez=((soft gram) r.kyz)
?~ mez
~& [%strange-wart p.kyz q.kyz]
+>.$
?- -<.u.mez
%lon !!
%aut !!
%hat !!
==
2014-03-12 23:50:39 +04:00
==
2013-09-29 00:21:18 +04:00
::
2015-02-06 08:00:35 +03:00
++ back :: %ford bounce
2015-02-19 00:35:22 +03:00
|= [tea=wire dep=@uvH cag=cage]
(miff tea %f %exec our `[%cast %mime %done ~ cag]) :: XX deps
2015-02-11 22:26:42 +03:00
::
2014-03-12 23:50:39 +04:00
++ doss :: host to ship
|= hot=host
^- (unit ship)
=+ gow=(~(get by dop) hot)
?^ gow gow
?. &(?=(& -.hot) ?=(^ p.hot)) ~
2014-03-27 21:39:17 +04:00
(rush -:(flop p.hot) fed:ag)
2013-09-29 00:21:18 +04:00
::
++ fail :: request failed
2015-02-19 00:35:22 +03:00
|= [sas=@ud dep=@uvH mez=tang]
^+ +>
2015-02-19 00:35:22 +03:00
:: (back ~ dep %tang !>(mez)) :: XX broken tang->mime door in ford
2015-02-17 02:19:58 +03:00
(resp sas text//html (poxo (lode dep (loga mez))))
::
2015-02-11 22:26:42 +03:00
++ heck :: extract err beak
|= [oar=ship pul=purl]
^- (unit beak)
%- bind :_ |=(a=$&(beam beak) ?^(-.a -.a a))
^- (unit $&(beam beak))
?. ?=([%'~' ^] q.q.pul)
(heft oar q.pul)
?+ i.t.q.q.pul ~
%as ?~(t.t.q.q.pul ~ $(q.q.pul t.t.t.q.q.pul))
%on ~ ::(tome (scot %p oar)
==
++ heft :: regular request
|= [oar=ship pok=pork]
^- (unit beam)
?~ q.pok
$(q.pok /index)
?. ((sane %tas) i.q.pok)
(tome q.pok)
`[[oar i.q.pok da/now] (flop t.q.pok)]
::
2014-03-12 23:50:39 +04:00
++ hell :: request, no ship
|= [pul=purl hyx=httx moh=moth]
2014-03-12 23:50:39 +04:00
^+ +>
2014-06-24 23:13:26 +04:00
=+ hon=(horn pul q.hyx moh)
?^ hon (muff u.hon)
=+ oar=(fall (doss r.p.pul) (need hov))
2015-02-17 01:06:58 +03:00
=+ ext=(fall p.q.pul %urb)
2015-02-19 00:35:22 +03:00
%- |=(a=(each ,_..hell tang) ?~(-.a p.a (fail 404 0v0 >%exit< p.a)))
2015-02-10 04:52:29 +03:00
%- mule |. ^+ ..hell
2015-02-11 22:26:42 +03:00
=+ hev=(heft oar q.pul)
?^ hev
2015-02-26 04:20:45 +03:00
=+ ced=ced.q:(huff our q.hyx pul moh)
=: s.u.hev [%web ~(rent co (flux:ya /'' r.pul ced)) s.u.hev]
2015-02-11 22:26:42 +03:00
r.u.hev ?+(r.u.hev r.u.hev [%ud %0] da/now)
==
2015-02-17 01:06:58 +03:00
(honk oar [%cast %mime [%boil ext u.hev ~]])
2015-02-10 04:52:29 +03:00
=+ hem=(hemp oar [q r]:pul)
?~ hem
2015-02-13 00:03:54 +03:00
~|(strange-path/q.q.pul !!)
2015-02-18 00:05:28 +03:00
?- -.u.hem
2015-02-19 02:25:55 +03:00
& ?. ?=([~ %js] p.q.pul) :: XX treat non-json cases?
~! hem
?~ p.u.hem ..hell
(howa ~ p.u.hem)
%^ resp 200 text//javascript
"""
window.urb = \{poll: "/{(apex:earn %| q.pul(u.p %json) r.pul)}"}
{(trip poll:js)}
"""
::
2015-02-26 04:20:45 +03:00
| ~| aute/p.u.hem ~| q.moh
=+ hez=(huff our q.hyx pul moh)
2015-02-27 00:17:29 +03:00
=. q.cez.q.hez
?. =(anon p.p.u.hem)
q.cez.q.hez
(~(put in q.cez.q.hez) p.p.u.hem)
2015-02-26 04:20:45 +03:00
=. wup (~(put by wup) hez)
?^ cug.q.hez
=+ rel=;html:script:"document.location.reload()"
=+ tuv=(tuff 200 text//html (crip (poxo rel)))
=. q.tuv
(weld :_(q.tuv (turn `(list ,@t)`cug.q.hez |=(a=cord set-cookie/a))))
(muff tuv)
~| hez !!
2015-02-18 00:05:28 +03:00
==
2015-02-10 04:52:29 +03:00
::
++ hemp :: auxillary(/~) request
|= [oar=ship pok=pork quy=quay]
2015-02-19 02:25:55 +03:00
^- (unit (each ,@uvH ,[p=ship q=pork]))
2015-02-26 04:20:45 +03:00
?: ?=([%'~~' *] q.pok) $(q.pok ['~' %as %own t.q.pok]) :: auth shortcut
2015-02-10 04:52:29 +03:00
?. ?=([%'~' @ *] q.pok) ~
:- ~
=* pef i.t.q.pok
=+ but=t.t.q.pok :: XX =*
2015-02-18 00:05:28 +03:00
?+ pef ~|(pfix-lost/`path`/~/[pef] !!)
%on
:- %&
2015-02-19 02:25:55 +03:00
~| on/bad-path/but
?> ?=([@ ~] but)
(slav %uv i.but)
2015-02-18 00:05:28 +03:00
%as
:- %|
~| bad-ship/?~(but ~ i.but)
?~ but !!
:_ pok(q t.but)
?+ i.but (slav %p i.but)
2015-02-26 04:20:45 +03:00
%anon anon
2015-02-18 00:05:28 +03:00
%own our
==
2015-02-10 04:52:29 +03:00
==
::
++ hoot :: clay request
2015-02-18 00:05:28 +03:00
|= [our=ship wir=path his=ship rif=riff]
(miff wir %c [%warp [our his] rif])
2015-02-10 04:52:29 +03:00
::
2014-05-16 04:46:48 +04:00
++ hone :: kill ford
2015-02-10 04:52:29 +03:00
|= [our=ship ses=hole]
2015-02-11 22:26:42 +03:00
(miff ~ %f [%exec our ~])
2014-05-16 04:46:48 +04:00
::
2014-05-10 11:10:46 +04:00
++ honk :: ford request
2015-02-06 08:00:35 +03:00
|= [our=ship kas=silk]
2014-07-15 06:45:04 +04:00
:: ~& [%honk our num ses -.kas]
2015-02-11 22:26:42 +03:00
(miff ~ %f [%exec our `kas])
2015-02-10 04:52:29 +03:00
::
++ horn :: irregular request
|= [pul=purl cip=clip moh=moth]
2014-06-24 23:13:26 +04:00
^- (unit gift)
2015-02-06 08:00:35 +03:00
?+ [(fall p.q.pul %$) q.q.pul] ~
[?(%ico %png) %favicon ~]
:- ~
2015-02-17 02:19:58 +03:00
%^ tuff 200 image//png
2014-09-17 04:29:12 +04:00
0w89wg.GV4jA.l9000.00dPb.YzBT6.giO00.o100d.wZcqc.a9tg-.VTG0b.
AUIvE.HBM3g.cK4SE.0aagi.l090p.I1P5g.Y-80r.y1YS9.1xE~Y.qgpFY.
vKN1V.905y0.2UwvL.43TUw.uL406.0-31h.xwoJF.Ul454.ilk00.00Yps.
BNumh.xpl9B.pS5Ji.i1BoC.ZAgg1.BsC5T.t6pLk.Thohn.gp000.0ov~P.
7M000.0o840.00010.0001i.h4x93.g0000.Eq2wR.7jB29
2015-02-06 08:00:35 +03:00
::
[%txt %robots ~]
:- ~
2015-02-17 02:19:58 +03:00
%^ tuff 200 text//plain
2015-02-06 08:00:35 +03:00
%- role
:~ 'User-agent: *'
'Disallow: /'
==
2014-03-23 01:42:25 +04:00
==
2015-02-26 04:20:45 +03:00
::
2015-02-19 00:35:22 +03:00
++ howa :: ford %wasp request
|= [tea=wire dep=@uvH]
(miff tea %f [%wasp our dep])
::
2015-02-18 00:05:28 +03:00
++ huff :: request by ship
|= [our=ship cip=clip pul=purl moh=moth]
^- [p=hole q=cyst]
=* sec p.p.pul
2015-02-26 04:20:45 +03:00
=+ pef=(rsh 3 1 (scot %p our))
2015-02-18 00:05:28 +03:00
=+ lig=(coss pef q.moh)
2015-02-26 04:20:45 +03:00
?^ lig
=+ cyz=(need (~(get by wup) u.lig))
[u.lig cyz(cug ~)]
2015-02-18 00:05:28 +03:00
=+ ses=(rsh 3 1 (scot %p (end 6 1 ney)))
:- ses
^- cyst
:* ^- cred
:* [sec q.p.pul r.p.pul]
~
(rsh 3 1 (scot %p (end 6 1 (shaf %oryx ses))))
::
=+ lag=(~(get by q.moh) %accept-language)
?~(lag ~ ?~(u.lag ~ [~ i.u.lag]))
::
cip
~
==
2015-02-26 04:20:45 +03:00
[anon ~]
2015-02-18 00:05:28 +03:00
::
:: ~
::
:_ ~
%^ cat 3
(cat 3 (cat 3 pef '=') ses)
:: (cat 3 '; HttpOnly' ?.(sec '' '; Secure'))
'; Path=/; HttpOnly'
::
now
:: ~
:: [1 ~]
==
2014-03-12 23:50:39 +04:00
::
2015-02-10 04:52:29 +03:00
++ jive :: success json
|= jon=json
2015-02-17 02:19:58 +03:00
(resp 205 application//json (pojo jon))
2015-02-14 06:43:17 +03:00
::
2014-03-12 23:50:39 +04:00
++ muff :: return card
2014-06-04 14:40:09 +04:00
|= gef=gift
+>(mow :_(mow [hen %give gef]))
2013-09-29 00:21:18 +04:00
::
2015-02-10 04:52:29 +03:00
++ miff :: pass card
|= noe=[wire note]
+>(mow :_(mow [hen %pass noe]))
::
2015-02-14 06:43:17 +03:00
++ resp :: mime response
2015-02-17 02:19:58 +03:00
|= [sas=@uG mit=mite bod=tape]
(muff (tuff sas mit (crip bod)))
2015-02-14 06:43:17 +03:00
::
2015-02-17 02:19:58 +03:00
++ tuff :: mimed response
|= [sas=@uG mit=mite rez=@]
2015-02-26 04:20:45 +03:00
:: (weld (turn cug |=(a=@t ['set-cookie' a]))
[%thou `httr`[sas ~[content-type/(moon mit)] [~ (taco rez)]]]
2015-02-10 04:52:29 +03:00
::
2014-03-12 23:50:39 +04:00
++ ya :: session engine
2015-02-27 00:17:29 +03:00
:: =| [[our=ship ses=hole] cyst] ::serf cyst]
2015-02-10 04:52:29 +03:00
:: =* sef ->-
2015-02-20 02:33:39 +03:00
=* cyz ->
2014-03-12 23:50:39 +04:00
|%
2015-02-10 04:52:29 +03:00
++ flux :: credential caboose
2015-02-26 04:20:45 +03:00
|= [nyp=path quy=quay ced=cred] ^- coin
2015-02-10 04:52:29 +03:00
:* %many
[%$ %ta ~]
2015-02-26 04:20:45 +03:00
[%blob ced]
2015-02-10 04:52:29 +03:00
|- ^- (list coin)
?~ quy ~
[[%$ %t p.i.quy] [%$ %t q.i.quy] $(quy t.quy)]
==
2015-02-20 02:33:39 +03:00
++ inte
^- (unit $&([%lon purl] gram))
~
2014-03-12 23:50:39 +04:00
--
--
--
. ==
=| bolo
=* bol -
2014-05-31 23:40:02 +04:00
|= [now=@da eny=@ ski=sled] :: activate
2014-03-12 23:50:39 +04:00
^? :: opaque core
|% ::
2014-06-04 14:40:09 +04:00
++ call :: handle request
|= $: hen=duct
2014-06-04 21:56:30 +04:00
hic=(hypo (hobo kiss))
2014-06-04 14:40:09 +04:00
==
2014-06-06 03:00:19 +04:00
=> %= . :: 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)
==
2014-05-31 23:40:02 +04:00
^- [p=(list move) q=_..^$]
2015-02-11 22:26:42 +03:00
=| our=ship :: XX
2014-05-31 23:40:02 +04:00
=+ ska=(slod ski)
2014-05-02 03:33:15 +04:00
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
2014-05-31 23:40:02 +04:00
^- [p=(list move) q=_..^$]
2014-03-20 05:05:42 +04:00
=. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
=^ mos bol
2015-02-11 22:26:42 +03:00
abet:(apex:~(adit ye [hen [now eny our sky] ~] bol) q.hic)
2014-03-12 23:50:39 +04:00
[mos ..^$]
2013-09-29 00:21:18 +04:00
::
++ doze
2013-12-15 09:42:27 +04:00
|= [now=@da hen=duct]
2013-09-29 00:21:18 +04:00
^- (unit ,@da)
~
::
++ load
2015-02-10 04:52:29 +03:00
|= old=_[%0 gub hov ged ney dop **]
2014-05-31 23:40:02 +04:00
^+ ..^$
2015-02-10 04:52:29 +03:00
..^$(+>- (bolo old))
2013-09-29 00:21:18 +04:00
::
++ scry
2014-05-27 00:43:40 +04:00
|= [our=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
^- (unit (unit (pair mark ,*)))
2013-09-29 00:21:18 +04:00
~
::
2014-05-31 23:40:02 +04:00
++ stay `bolo`+>-.$
2014-06-04 14:40:09 +04:00
++ take :: accept response
2014-10-04 02:32:10 +04:00
|= [tea=wire hen=duct hin=(hypo sine)]
2014-06-04 14:40:09 +04:00
^- [p=(list move) q=_..^$]
2014-10-04 02:32:10 +04:00
?: ?=(%veer +<.q.hin) :: vomit
[[hen %give +.q.hin]~ ..^$]
?: ?=(%vega +<.q.hin) :: vomit
[[hen %give +.q.hin]~ ..^$]
2015-02-11 22:26:42 +03:00
=| our=ship :: XX
2014-06-04 14:40:09 +04:00
=+ 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
2015-02-11 22:26:42 +03:00
%^ axon:~(adit ye [hen [now eny our sky] ~] bol) tea
2014-06-24 21:32:59 +04:00
(~(peek ut p.hin) %free 3)
2014-06-22 06:51:12 +04:00
q.hin
2014-06-04 14:40:09 +04:00
[mos ..^$]
2013-09-29 00:21:18 +04:00
--