2014-03-12 23:50:39 +04:00
|
|
|
!: :: %eyre, http servant
|
|
|
|
!? 164
|
|
|
|
::::
|
2013-12-15 09:42:27 +04:00
|
|
|
|= pit=vase
|
2013-09-29 00:21:18 +04:00
|
|
|
^- vane :: kernel instrument
|
|
|
|
=> =~
|
2014-03-12 23:50:39 +04:00
|
|
|
|% :: structures
|
2013-09-29 00:21:18 +04:00
|
|
|
++ bolo :: eyre state
|
2014-03-12 23:50:39 +04:00
|
|
|
$: gub=@t :: random identity
|
2014-03-23 23:42:18 +04:00
|
|
|
hov=(unit ,@p) :: 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
|
2014-03-22 01:46:14 +04:00
|
|
|
own=(map ship serf) :: domestic servers
|
|
|
|
fon=(map ship rote) :: foreign servers
|
2014-03-12 23:50:39 +04:00
|
|
|
ask=[p=@ud q=(map ,@ud ,[p=duct q=hiss])] :: outgoing by number
|
|
|
|
kes=(map duct ,@ud) :: outgoing by duct
|
2014-04-14 22:01:18 +04:00
|
|
|
lor=(map duct dual) :: incoming by duct
|
2014-03-12 23:50:39 +04:00
|
|
|
== ::
|
2014-04-21 21:02:09 +04:00
|
|
|
++ clue :: console
|
2014-04-16 05:35:25 +04:00
|
|
|
$: ino=@ud :: input sequence
|
|
|
|
ono=@ud :: (lent out)
|
|
|
|
voy=(map ,@ud (list ,@ud)) :: waiters (q.rey)
|
|
|
|
out=(list json) :: output commands
|
|
|
|
== ::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ cyst :: client session
|
|
|
|
$: ced=cred :: credential
|
2014-04-21 21:02:09 +04:00
|
|
|
cow=(map ,@ud clue) :: consoles
|
2014-03-12 23:50:39 +04:00
|
|
|
cug=(list ,@t) :: unacked cookies
|
|
|
|
lax=@da :: last used
|
|
|
|
rey=[p=@ud q=(map ,@ud pimp)] :: live requests
|
|
|
|
== ::
|
2014-04-14 22:01:18 +04:00
|
|
|
++ dual ,[p=@ud q=(each ,[p=ship q=hole] ship)] :: request handle
|
2014-03-12 23:50:39 +04:00
|
|
|
++ dude ,[p=@tas q=@] :: client identity
|
2014-03-13 05:04:58 +04:00
|
|
|
++ loco ,[p=? q=(unit ,@tas) r=path] :: logical construct
|
2014-03-12 23:50:39 +04:00
|
|
|
++ pest :: request in progress
|
|
|
|
$| $? %new :: virgin
|
2014-04-16 05:35:25 +04:00
|
|
|
%way :: waiting
|
2014-04-09 04:34:29 +04:00
|
|
|
== ::
|
2014-04-16 23:47:41 +04:00
|
|
|
$% [%err p=@ud q=(list tank)] :: error report
|
2014-03-12 23:50:39 +04:00
|
|
|
[%fin p=love] :: ready to send
|
2014-04-09 02:26:01 +04:00
|
|
|
[%haz p=riot] :: clay responded
|
2014-03-12 23:50:39 +04:00
|
|
|
[%raw p=hiss] :: wild url
|
|
|
|
== ::
|
|
|
|
++ pimp :: traced request
|
|
|
|
$: ful=? :: | === HEAD
|
|
|
|
hen=duct :: event trace
|
2014-03-26 04:48:22 +04:00
|
|
|
som=seam :: logical request
|
2014-03-12 23:50:39 +04:00
|
|
|
pez=pest :: request state
|
|
|
|
== ::
|
2014-03-22 01:46:14 +04:00
|
|
|
++ rote :: remote server
|
2014-03-23 01:42:25 +04:00
|
|
|
$: cnt=@ud :: number served
|
2014-03-23 23:42:18 +04:00
|
|
|
sor=@p :: home sponsor
|
2014-03-23 01:42:25 +04:00
|
|
|
rem=[p=@ud q=(map ,@ud duct)] :: active requests
|
2014-03-22 01:46:14 +04:00
|
|
|
== ::
|
|
|
|
++ serf :: local server
|
2014-03-12 23:50:39 +04:00
|
|
|
$: pef=@t :: server prefix
|
2014-03-20 05:05:42 +04:00
|
|
|
wup=(map hole cyst) :: secure sessions
|
2014-03-21 10:24:22 +04:00
|
|
|
cah=(map cash vase) :: compilation cache
|
2014-03-12 23:50:39 +04:00
|
|
|
:: wez=(map duct root) :: all routes
|
|
|
|
== ::
|
|
|
|
-- ::
|
|
|
|
|%
|
2014-03-21 10:24:22 +04:00
|
|
|
++ colt :: prune to save
|
|
|
|
|= bol=bolo
|
|
|
|
%_(bol own (~(run by own.bol) |=(a=serf a(cah ~))))
|
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ coss :: cookie search
|
|
|
|
|= [nam=@t mah=math]
|
2014-03-20 05:05:42 +04:00
|
|
|
^- (unit hole)
|
2014-03-12 23:50:39 +04:00
|
|
|
=+ ^= cok ^- (list ,@t)
|
|
|
|
=+ cok=(~(get by mah) 'cookie')
|
2014-04-07 21:16:57 +04:00
|
|
|
?~(cok ~ u.cok)
|
2014-03-20 05:05:42 +04:00
|
|
|
|- ^- (unit hole)
|
2014-03-12 23:50:39 +04:00
|
|
|
?~ cok ~
|
|
|
|
=+ mar=`(unit (list ,[p=@t q=@t]))`(rush i.cok cock:epur)
|
|
|
|
?~ mar $(cok t.cok)
|
2014-03-20 05:05:42 +04:00
|
|
|
|- ^- (unit hole)
|
2014-03-12 23:50:39 +04:00
|
|
|
?~ 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
|
2013-12-15 09:42:27 +04:00
|
|
|
|= hed=(list ,[p=@t q=@t])
|
2013-09-29 00:21:18 +04:00
|
|
|
=+ mah=*math
|
|
|
|
|- ^- math
|
|
|
|
?~ hed mah
|
|
|
|
=+ cus=(cass (rip 3 p.i.hed))
|
|
|
|
=+ zeb=(~(get by mah) cus)
|
|
|
|
$(hed t.hed, mah (~(put by mah) cus ?~(zeb [q.i.hed ~] [q.i.hed u.zeb])))
|
|
|
|
::
|
2014-04-10 05:01:46 +04:00
|
|
|
++ lofi :: insert scripts
|
|
|
|
|= [mog=(list manx) luv=love]
|
|
|
|
^- love
|
|
|
|
?: =(~ mog) luv
|
|
|
|
?+ -.luv luv
|
|
|
|
%mid
|
|
|
|
=+ str=(trip q.q.luv)
|
|
|
|
=+ scr=|-(^-(tape ?~(mog "</body>" (xmlt & i.mog $(mog t.mog)))))
|
|
|
|
=+ rep=(need (repg "</body>" str scr))
|
|
|
|
[%mid p.luv (tact rep)]
|
|
|
|
==
|
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ loft :: love to response
|
|
|
|
|= luv=love
|
|
|
|
^- httr
|
|
|
|
?- -.luv
|
|
|
|
%mid [200 ~[content-type/(moon p.luv)] [~ q.luv]]
|
2014-04-03 05:06:45 +04:00
|
|
|
%ham [200 ~[content-type/'text/html'] [~ (tact (xmlt | p.luv ~))]]
|
2014-03-12 23:50:39 +04:00
|
|
|
%raw p.luv
|
2014-04-09 04:34:29 +04:00
|
|
|
%wan :+ 200
|
2014-04-09 02:26:01 +04:00
|
|
|
~[content-type/'text/plain']
|
|
|
|
:- ~
|
|
|
|
%- taco
|
|
|
|
%+ rap 3
|
|
|
|
|- ^- (list ,@)
|
|
|
|
?~(p.luv ~ [i.p.luv 10 $(p.luv t.p.luv)])
|
2014-04-09 04:34:29 +04:00
|
|
|
%zap :+ p.luv
|
2014-03-12 23:50:39 +04:00
|
|
|
~[content-type/'text/plain']
|
|
|
|
:- ~
|
|
|
|
%- tell
|
2014-04-07 21:16:57 +04:00
|
|
|
|- ^- wall
|
|
|
|
?~ q.luv ~
|
2014-03-12 23:50:39 +04:00
|
|
|
(weld (~(win re i.q.luv) 0 120) $(q.luv t.q.luv))
|
2013-09-29 00:21:18 +04:00
|
|
|
==
|
|
|
|
--
|
2014-03-12 23:50:39 +04:00
|
|
|
|% :: functions
|
|
|
|
++ ye :: per event
|
2014-04-07 21:16:57 +04:00
|
|
|
=| $: $: $: wru=(unit writ) :: event authority
|
2014-03-12 23:50:39 +04:00
|
|
|
tea=wire :: event place
|
|
|
|
hen=duct :: event floor
|
|
|
|
fav=card :: event data
|
|
|
|
== ::
|
|
|
|
$: now=@da :: event date
|
|
|
|
eny=@ :: unique entropy
|
|
|
|
sky=$+(* (unit)) :: system namespace
|
2014-04-07 21:16:57 +04:00
|
|
|
== ::
|
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
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ apex
|
|
|
|
|- ^+ +
|
2014-03-24 01:18:05 +04:00
|
|
|
?+ -.fav
|
|
|
|
+.$(mow [[wru hen fav] mow])
|
2014-03-12 23:50:39 +04:00
|
|
|
::
|
|
|
|
%born +(ged hen) :: register external
|
2014-03-23 23:42:18 +04:00
|
|
|
%init :: register ownership
|
|
|
|
%_ +.$
|
|
|
|
hov ?~(hov [~ p.fav] [~ (min u.hov p.fav)])
|
|
|
|
own
|
|
|
|
%+ ~(put by own)
|
|
|
|
p.fav
|
|
|
|
^- serf
|
|
|
|
:* (cat 3 gub (rsh 3 1 (scot %p p.fav)))
|
|
|
|
~
|
|
|
|
~
|
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
%that :: outbound response
|
|
|
|
?> ?=([@ @ @ ~] tea) ::
|
|
|
|
=+ :* our=(slaw %p i.tea) :: ship
|
|
|
|
ses=i.t.tea :: session
|
|
|
|
num=(slaw %ud i.t.t.tea) :: request in session
|
|
|
|
== ::
|
|
|
|
!!
|
|
|
|
::
|
|
|
|
%them :: outbound request
|
|
|
|
?~ p.fav
|
|
|
|
=+ sud=(need (~(get by kes) hen))
|
|
|
|
%= +.$
|
|
|
|
mow :_(mow [~ ged [%thus sud ~]])
|
|
|
|
q.ask (~(del by q.ask) sud)
|
|
|
|
kes (~(del by kes) hen)
|
|
|
|
==
|
|
|
|
%= +.$
|
|
|
|
mow :_(mow [~ ged [%thus p.ask p.fav]])
|
|
|
|
p.ask +(p.ask)
|
|
|
|
q.ask (~(put by q.ask) p.ask hen u.p.fav)
|
|
|
|
kes (~(put by kes) hen p.ask)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
%they :: inbound response
|
|
|
|
=+ kas=(need (~(get by q.ask) p.fav))
|
|
|
|
%= +.$
|
|
|
|
mow :_(mow [~ p.kas [%thou q.fav]])
|
|
|
|
q.ask (~(del by q.ask) p.kas)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
%this :: inbound request
|
|
|
|
=* sec p.fav :: ? :: https bit
|
|
|
|
=* heq r.fav :: httq :: request content
|
|
|
|
=+ ryp=`quri`(rash q.heq zest:epur)
|
|
|
|
=+ mah=(ecco r.heq)
|
|
|
|
=+ ^= pul ^- purl
|
|
|
|
?- -.ryp
|
|
|
|
& ?>(=(sec p.p.p.ryp) p.ryp)
|
|
|
|
| =+ hot=(~(get by mah) %host)
|
|
|
|
?> ?=([~ @ ~] hot)
|
|
|
|
[[sec (rash i.u.hot thor:epur)] p.ryp q.ryp]
|
|
|
|
==
|
2014-03-22 01:46:14 +04:00
|
|
|
(hell pul +.fav [p.heq mah s.heq])
|
2014-04-14 22:01:18 +04:00
|
|
|
::
|
|
|
|
%thud :: cancel request
|
|
|
|
=+ dul=(~(get by lor) hen)
|
|
|
|
?~ 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))
|
|
|
|
| (hops p.q.u.dul p.u.dul)
|
|
|
|
==
|
2014-03-23 01:42:25 +04:00
|
|
|
::
|
|
|
|
%thou :: remote return
|
2014-03-24 01:18:05 +04:00
|
|
|
?> ?=([@ *] tea)
|
|
|
|
(hajj (need (slaw %p i.tea)) t.tea p.fav)
|
2014-03-23 01:42:25 +04:00
|
|
|
::
|
|
|
|
%wart :: remote request
|
|
|
|
?+ q.fav
|
|
|
|
~& [%strange-wart p.fav q.fav]
|
|
|
|
+.$
|
|
|
|
::
|
2014-04-07 21:16:57 +04:00
|
|
|
%pr
|
2014-03-23 01:42:25 +04:00
|
|
|
(hare r.fav p.fav s.fav)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
%waft
|
2014-03-24 01:18:05 +04:00
|
|
|
?. ?=([%hork @ ~] tea)
|
|
|
|
+.$
|
2014-03-23 01:42:25 +04:00
|
|
|
(gosh p.fav (need (slaw %ud i.t.tea)) ((hard httr) q.fav))
|
2014-03-24 01:18:05 +04:00
|
|
|
::
|
|
|
|
%went
|
|
|
|
+.$
|
2014-04-09 02:26:01 +04:00
|
|
|
::
|
|
|
|
%writ
|
|
|
|
?. ?=([%hoot @ @ ~] tea)
|
|
|
|
+.$
|
|
|
|
?> ?=(^ wru)
|
|
|
|
(gout q.u.wru i.t.tea (need (slaw %ud i.t.t.tea)) p.fav)
|
2014-04-17 04:49:41 +04:00
|
|
|
::
|
|
|
|
?(%helo %tell %text %talk %warn)
|
|
|
|
?. ?=([%cons @ @ ~] tea)
|
|
|
|
+.$
|
|
|
|
?> ?=(^ wru)
|
|
|
|
(goat q.u.wru i.t.tea (need (slaw %ud i.t.t.tea)) fav)
|
2014-03-12 23:50:39 +04:00
|
|
|
==
|
2013-09-29 00:21:18 +04: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
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ fail :: request failed
|
|
|
|
|= [sas=@ud str=tape]
|
|
|
|
^+ +>
|
|
|
|
%- muff
|
2013-09-29 00:21:18 +04:00
|
|
|
:- %thou
|
|
|
|
^- httr
|
2014-03-12 23:50:39 +04:00
|
|
|
[sas ~[content-type/'text/plain'] [~ (tact str)]]
|
2013-09-29 00:21:18 +04:00
|
|
|
::
|
2014-04-17 04:49:41 +04:00
|
|
|
++ goat
|
|
|
|
|= [our=ship ses=hole num=@ud fav=card]
|
|
|
|
=+ 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)
|
|
|
|
::
|
2014-03-23 01:42:25 +04:00
|
|
|
++ gosh :: receive %pr response
|
|
|
|
|= [him=ship num=@ud har=httr]
|
|
|
|
^+ +>
|
2014-04-14 22:43:06 +04:00
|
|
|
=+ ryt=(~(get by fon) him)
|
|
|
|
?~ ryt +>.$
|
|
|
|
=+ zur=(~(get by q.rem.u.ryt) num)
|
|
|
|
?~ zur +>.$
|
2014-03-23 01:42:25 +04:00
|
|
|
%_ +>.$
|
2014-04-14 22:43:06 +04:00
|
|
|
mow :_(mow [wru u.zur [%thou har]])
|
|
|
|
fon (~(put by fon) him u.ryt(q.rem (~(del by q.rem.u.ryt) num)))
|
2014-03-23 01:42:25 +04:00
|
|
|
==
|
|
|
|
::
|
2014-04-09 02:26:01 +04:00
|
|
|
++ gout
|
|
|
|
|= [our=ship ses=hole num=@ud rot=riot]
|
|
|
|
^+ +>
|
2014-04-14 22:01:18 +04:00
|
|
|
=+ suf=(~(get by own) our)
|
|
|
|
?~ suf +>.$
|
|
|
|
=+ cuz=(~(get by wup.u.suf) ses)
|
|
|
|
?~ cuz +>.$
|
|
|
|
abet:work:(~(iota ya [our ses] u.suf u.cuz) num rot)
|
2014-04-09 02:26:01 +04:00
|
|
|
::
|
2014-03-23 01:42:25 +04:00
|
|
|
++ hajj :: send %pr response
|
2014-03-24 01:18:05 +04:00
|
|
|
|= [him=ship tus=path har=httr]
|
2014-03-23 01:42:25 +04:00
|
|
|
^+ +>
|
2014-04-03 05:06:45 +04:00
|
|
|
+>.$(mow :_(mow [wru [/a /e hen] [%want him [%r %pr tus] har]]))
|
2014-03-23 01:42:25 +04:00
|
|
|
::
|
|
|
|
++ hare :: receive request
|
|
|
|
|= [tus=path him=ship hor=*]
|
|
|
|
^+ +>
|
2014-04-14 22:01:18 +04:00
|
|
|
=+ hux=((hard (unit httx)) hor)
|
|
|
|
%_ +>.$
|
|
|
|
mow
|
|
|
|
:_ mow
|
|
|
|
[wru [/e [%e (scot %p him) tus] hen] ?~(hux [%thud ~] [%this u.hux])]
|
|
|
|
==
|
2014-03-23 01:42:25 +04:00
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ hell :: request, no ship
|
2014-03-22 01:46:14 +04:00
|
|
|
|= [pul=purl hyx=httx moh=moth]
|
2014-03-12 23:50:39 +04:00
|
|
|
^+ +>
|
|
|
|
=^ wiq q.q.pul
|
|
|
|
?~ q.q.pul [~ ~]
|
2014-03-13 05:04:58 +04:00
|
|
|
=+ nam=(cat 3 '~' i.q.q.pul)
|
|
|
|
=+ gow=(rush i.q.q.pul fed:ag)
|
2014-03-12 23:50:39 +04:00
|
|
|
^- [(unit ship) (list ,@t)]
|
|
|
|
?~(gow [~ q.q.pul] [gow t.q.q.pul])
|
2014-03-22 01:46:14 +04:00
|
|
|
=+ 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)
|
2013-09-29 00:21:18 +04:00
|
|
|
::
|
2014-03-22 01:46:14 +04:00
|
|
|
++ home :: do we own?
|
|
|
|
|= who=ship
|
|
|
|
^- ?
|
2014-03-23 22:44:23 +04:00
|
|
|
?: (~(has by own) who) &
|
|
|
|
?: (~(has by fon) who) |
|
|
|
|
!=(~ (sky /a/(scot %p who)/buck/(scot %da now)))
|
2014-03-22 01:46:14 +04:00
|
|
|
::
|
2014-04-09 02:26:01 +04:00
|
|
|
++ hoot :: clay request
|
|
|
|
|= [our=ship num=@ud ses=hole rif=riff]
|
|
|
|
%_ +>
|
|
|
|
mow
|
|
|
|
:_ mow
|
|
|
|
:+ [~ %gold our]
|
|
|
|
[/c [%e %hoot ses (scot %ud num) ~] hen]
|
|
|
|
[%warp our rif]
|
|
|
|
==
|
|
|
|
::
|
2014-04-14 22:01:18 +04:00
|
|
|
++ hops :: cancel remote
|
|
|
|
|= [him=ship num=@]
|
|
|
|
^+ +>
|
|
|
|
=+ mun=(scot %ud num)
|
|
|
|
=+ rot=(need (~(get by fon) him))
|
|
|
|
%_ +>.$
|
|
|
|
mow
|
|
|
|
:_ mow
|
|
|
|
:+ [~ %gold sor.rot]
|
|
|
|
[/a [%e %hork mun ~] hen]
|
|
|
|
[%want him [%q %pr %e %hork mun ~] ~]
|
|
|
|
==
|
|
|
|
::
|
2014-03-22 01:46:14 +04:00
|
|
|
++ hork :: remote request
|
|
|
|
|= [him=ship hyx=httx]
|
|
|
|
^+ +>
|
2014-03-23 23:42:18 +04:00
|
|
|
=+ ^= sur ^- (unit ship)
|
|
|
|
?^ hov hov
|
|
|
|
?^ own [~ p.n.own]
|
|
|
|
~
|
|
|
|
?~ sur (fail 500 "no vessel available to proxy {<him>}")
|
2014-03-23 01:42:25 +04:00
|
|
|
=+ ^= rot ^- rote
|
|
|
|
=+ rut=(~(get by fon) him)
|
2014-03-23 23:42:18 +04:00
|
|
|
?^ rut u.rut
|
|
|
|
[0 u.sur [0 ~]]
|
2014-03-23 01:42:25 +04:00
|
|
|
=+ num=p.rem.rot
|
2014-03-24 01:18:05 +04:00
|
|
|
=+ mun=(scot %ud num)
|
2014-03-23 23:42:18 +04:00
|
|
|
%_ +>.$
|
2014-04-14 22:01:18 +04:00
|
|
|
lor (~(put by lor) hen num [%| him])
|
2014-03-23 23:42:18 +04:00
|
|
|
mow
|
|
|
|
:_ mow
|
|
|
|
:+ [~ %gold sor.rot]
|
2014-03-24 01:18:05 +04:00
|
|
|
[/a [%e %hork mun ~] hen]
|
2014-04-14 22:01:18 +04:00
|
|
|
[%want him [%q %pr %e %hork mun ~] [~ hyx]]
|
2014-03-23 23:42:18 +04:00
|
|
|
::
|
|
|
|
fon
|
2014-04-07 21:16:57 +04:00
|
|
|
%+ ~(put by fon) him
|
2014-03-23 23:42:18 +04:00
|
|
|
%_ rot
|
|
|
|
cnt +(cnt.rot)
|
|
|
|
p.rem +(p.rem.rot)
|
|
|
|
q.rem (~(put by q.rem.rot) num hen)
|
2014-03-23 01:42:25 +04:00
|
|
|
==
|
2014-03-23 23:42:18 +04:00
|
|
|
==
|
2014-03-22 01:46:14 +04:00
|
|
|
::
|
|
|
|
++ horn :: irregular request
|
|
|
|
|= [pul=purl cip=clip moh=moth]
|
2014-03-12 23:50:39 +04:00
|
|
|
^+ +>
|
2014-03-23 01:42:25 +04:00
|
|
|
=- ?: &(=(/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 {<pul>} does not match a vessel")
|
2014-04-07 21:16:57 +04:00
|
|
|
:*
|
2014-03-23 01:42:25 +04:00
|
|
|
^= rob
|
|
|
|
%- role
|
|
|
|
:~ 'User-agent: *'
|
|
|
|
'Disallow: /'
|
|
|
|
==
|
|
|
|
::
|
|
|
|
^= fac
|
|
|
|
0w89.wgGV4.jAl90.00003.sV4OG.IJ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
|
|
20w82.5h9gD.c4000.0l9ny.s0000.0o8p0.0006g.0001i.h4x93.g0000.
|
|
|
|
Eq2wR.7jB29
|
|
|
|
==
|
2014-03-22 01:46:14 +04:00
|
|
|
::
|
|
|
|
++ huff :: request by ship
|
|
|
|
|= [our=ship hey=? cip=clip pul=purl moh=moth]
|
2014-03-12 23:50:39 +04:00
|
|
|
=* sec p.p.pul
|
|
|
|
=+ ^= sef ^- serf
|
2014-03-22 01:46:14 +04:00
|
|
|
=+ suf=(~(get by own) our)
|
2014-03-12 23:50:39 +04:00
|
|
|
?^ suf u.suf
|
|
|
|
=+ sef=*serf
|
2014-03-23 23:42:18 +04:00
|
|
|
sef(pef (cat 3 gub (rsh 3 1 (scot %p our)))) :: XX transitional
|
2014-03-20 05:05:42 +04:00
|
|
|
=+ ^= saw ^- [p=hole q=cyst]
|
2014-03-12 23:50:39 +04:00
|
|
|
=+ lig=(coss pef.sef q.moh)
|
2014-03-21 10:24:22 +04:00
|
|
|
?^ lig
|
2014-03-12 23:50:39 +04:00
|
|
|
=+ cyz=(need (~(get by wup.sef) u.lig))
|
|
|
|
[u.lig cyz(cug ~)]
|
2014-03-20 05:05:42 +04:00
|
|
|
=+ ses=(rsh 3 1 (scot %p (end 6 1 ney)))
|
2014-03-12 23:50:39 +04:00
|
|
|
:- ses
|
|
|
|
^- cyst
|
|
|
|
:* ^- cred
|
2014-03-22 01:46:14 +04:00
|
|
|
:* [sec hey q.p.pul r.p.pul]
|
2014-03-20 05:05:42 +04:00
|
|
|
~
|
|
|
|
(rsh 3 1 (scot %p (end 6 1 (shaf %oryx ses))))
|
2014-03-22 01:46:14 +04:00
|
|
|
::
|
|
|
|
=+ lag=(~(get by q.moh) %accept-language)
|
|
|
|
?~(lag ~ ?~(u.lag ~ [~ i.u.lag]))
|
|
|
|
::
|
|
|
|
cip
|
2014-03-14 21:49:21 +04:00
|
|
|
~
|
2014-03-12 23:50:39 +04:00
|
|
|
==
|
2014-04-16 05:35:25 +04:00
|
|
|
::
|
|
|
|
~
|
2014-03-12 23:50:39 +04:00
|
|
|
::
|
|
|
|
:_ ~
|
|
|
|
%^ cat 3
|
|
|
|
(cat 3 (cat 3 pef.sef '=') ses)
|
2014-03-20 05:05:42 +04:00
|
|
|
:: (cat 3 '; HttpOnly' ?.(sec '' '; Secure'))
|
2014-04-14 22:01:18 +04:00
|
|
|
'; Path=/; HttpOnly'
|
2014-03-12 23:50:39 +04:00
|
|
|
::
|
|
|
|
now
|
|
|
|
[1 ~]
|
|
|
|
==
|
2014-03-22 01:46:14 +04:00
|
|
|
abet:work:(~(into ya [our p.saw] sef q.saw) pul moh)
|
2014-03-12 23:50:39 +04:00
|
|
|
::
|
|
|
|
++ muff :: return card
|
|
|
|
|= fav=card
|
|
|
|
+>(mow :_(mow [wru hen fav]))
|
2013-09-29 00:21:18 +04:00
|
|
|
::
|
2014-04-14 22:01:18 +04:00
|
|
|
++ myth :: load session
|
|
|
|
|= [our=ship ses=hole]
|
|
|
|
=+ suf=(~(get by own) our)
|
|
|
|
?~ suf ~
|
|
|
|
=+ cuz=(~(get by wup.u.suf) ses)
|
|
|
|
?~ cuz ~
|
|
|
|
[~ u=~(. ya [our ses] u.suf u.cuz)]
|
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ ya :: session engine
|
2014-03-20 05:05:42 +04:00
|
|
|
=| [[our=ship ses=hole] serf cyst]
|
2014-03-12 23:50:39 +04:00
|
|
|
=* sef ->-
|
|
|
|
=* cyz ->+
|
|
|
|
|%
|
|
|
|
++ abet :: resolve engine
|
|
|
|
^+ ..ya
|
|
|
|
%= ..ya
|
|
|
|
own
|
|
|
|
(~(put by own) our sef(wup (~(put by wup) ses cyz)))
|
|
|
|
==
|
|
|
|
::
|
2014-04-16 05:35:25 +04:00
|
|
|
++ dodo :: console s->c
|
|
|
|
|= [con=@ud fav=card]
|
|
|
|
^+ +>
|
|
|
|
=+ cal=(need (~(get by cow) con))
|
|
|
|
=+ ^= jon ^- json
|
|
|
|
?: ?=(%helo -.fav)
|
|
|
|
%+ 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)]]
|
|
|
|
==
|
|
|
|
%+ 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)]~
|
|
|
|
==
|
|
|
|
=+ ^= yov ^- (list ,@ud)
|
|
|
|
=+ yov=(~(get by voy.cal) ono.cal)
|
|
|
|
?~(yov ~ u.yov)
|
|
|
|
=: voy.cal (~(del by voy.cal) ono.cal)
|
|
|
|
ono.cal +(ono.cal)
|
|
|
|
out.cal [jon out.cal]
|
|
|
|
==
|
|
|
|
=. cow (~(put by cow) con cal)
|
|
|
|
?~(yov +>.$ (dove ~[%a (jone ono.cal) (jone ino.cal) jon] yov))
|
|
|
|
::
|
2014-04-17 04:49:41 +04:00
|
|
|
++ dove :: console waiting
|
2014-04-16 05:35:25 +04:00
|
|
|
|= [jon=json yov=(list ,@ud)]
|
|
|
|
^+ +>
|
|
|
|
=+ noz=`pest`[%fin %mid /text/json (tact (pojo jon))]
|
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ yov +>.^$
|
|
|
|
=+ pup=(~(get by q.rey) i.yov)
|
|
|
|
?~ pup $(yov t.yov)
|
|
|
|
?> ?=(%way pez.u.pup)
|
|
|
|
$(yov t.yov, q.rey (~(put by q.rey) i.yov u.pup(pez noz)))
|
|
|
|
::
|
2014-04-16 23:47:41 +04:00
|
|
|
++ flea :: permissive decimal
|
|
|
|
|= txt=@t
|
|
|
|
^- (unit ,@ud)
|
|
|
|
=+ zac=(slay txt)
|
|
|
|
?: ?=([~ %$ %ud @] zac)
|
|
|
|
[~ q.p.u.zac]
|
|
|
|
=+ soc=(rush txt dim:ag)
|
|
|
|
?~(soc ~ [~ u.soc])
|
|
|
|
::
|
2014-04-21 21:02:09 +04:00
|
|
|
++ foal :: url from query
|
|
|
|
|= [nam=@t yaq=(map ,@t ,@t)]
|
|
|
|
^- (unit purl)
|
|
|
|
=+ uru=(~(get by yaq) %url)
|
|
|
|
?~ uru ~
|
|
|
|
(rush u.uru auri:epur)
|
|
|
|
::
|
|
|
|
++ fool :: domestic login get
|
|
|
|
|= quy=quay
|
|
|
|
^- (unit seam)
|
|
|
|
=+ yaq=(~(gas by *(map ,@t ,@t)) quy)
|
|
|
|
=+ pyl=(foal %url yaq)
|
|
|
|
?~ pyl ~
|
|
|
|
=+ wuh=(~(get by yaq) %who)
|
|
|
|
[~ %lon ?~(wuh ~ (rush u.wuh fed:ag)) u.pyl]
|
|
|
|
::
|
|
|
|
++ foom :: domestic login post
|
|
|
|
|= moh=moth
|
|
|
|
^- (unit seam)
|
|
|
|
?. ?& ?=(^ r.moh)
|
|
|
|
.= [~ 'application/x-www-form-urlencoded' ~]
|
|
|
|
(~(get by q.moh) 'content-type')
|
|
|
|
== ~
|
|
|
|
=+ yuq=(rush q.u.r.moh yquy:epur)
|
|
|
|
?~ yuq ~
|
|
|
|
=+ yaq=(~(gas by *(map ,@t ,@t)) u.yuq)
|
|
|
|
=+ pas=(~(get by yaq) %pas)
|
|
|
|
?~ pas ~
|
|
|
|
=+ pyl=(foal %url yaq)
|
|
|
|
?~ pyl ~
|
|
|
|
=+ ^= whu ^- (unit ,@p)
|
|
|
|
=+ sip=(~(get by yaq) %who)
|
|
|
|
?~(sip ~ (rush u.sip fed:ag))
|
|
|
|
?~ whu ~
|
|
|
|
[~ %log u.whu u.pyl u.pas]
|
|
|
|
::
|
2014-04-16 23:47:41 +04:00
|
|
|
++ flub :: console request
|
|
|
|
|= [paw=(list ,@t) muh=(unit moth)]
|
|
|
|
^- (unit seam)
|
|
|
|
?: ?=([@ ~] paw)
|
|
|
|
?^ muh ~
|
|
|
|
=+ fee=(flea i.paw)
|
|
|
|
?~ fee ~
|
|
|
|
[~ %con u.fee]
|
|
|
|
?. ?=([@ @ ~] paw) ~
|
|
|
|
=+ [fee=(flea i.paw) fum=(flea i.t.paw)]
|
|
|
|
?. &(?=(^ fee) ?=(^ fum)) ~
|
|
|
|
?: |(?=(~ muh) ?=(~ r.u.muh))
|
|
|
|
[~ %cog u.fee u.fum]
|
2014-04-17 04:49:41 +04:00
|
|
|
?. =([~ 'text/json' ~] (~(get by q.u.muh) 'content-type'))
|
2014-04-16 23:47:41 +04:00
|
|
|
~
|
|
|
|
=+ jun=`(unit json)`(rush q.u.r.u.muh apex:poja)
|
|
|
|
?~ jun
|
|
|
|
~
|
|
|
|
[~ %cop u.fee u.fum u.jun]
|
|
|
|
::
|
2014-03-20 05:05:42 +04:00
|
|
|
++ flux :: credential caboose
|
2014-03-26 04:48:22 +04:00
|
|
|
|= [nep=@tas quy=quay]
|
2014-03-20 05:05:42 +04:00
|
|
|
^- coin
|
|
|
|
:* %many
|
2014-03-26 04:48:22 +04:00
|
|
|
[%$ %tas nep]
|
2014-03-20 05:05:42 +04:00
|
|
|
[%blob ced]
|
|
|
|
|- ^- (list coin)
|
|
|
|
?~ quy ~
|
|
|
|
[[%$ %t p.i.quy] [%$ %t q.i.quy] $(quy t.quy)]
|
2014-04-07 21:16:57 +04:00
|
|
|
==
|
2014-03-20 05:05:42 +04:00
|
|
|
::
|
2014-04-09 02:26:01 +04:00
|
|
|
++ foin :: version request
|
|
|
|
|= [fur=(unit term) paw=(list ,@t) quy=quay]
|
|
|
|
^- (unit seam)
|
|
|
|
?. ?& ?=(~ fur)
|
|
|
|
?=(~ quy)
|
|
|
|
?=([@ @ ~] paw)
|
|
|
|
((sane %tas) i.t.paw)
|
|
|
|
== ~
|
|
|
|
%+ bind
|
|
|
|
^- (unit moat)
|
|
|
|
=+ soy=(slay i.paw)
|
|
|
|
?~ soy ~
|
2014-04-09 04:34:29 +04:00
|
|
|
?+ u.soy
|
2014-04-09 02:26:01 +04:00
|
|
|
~
|
|
|
|
::
|
2014-04-09 04:34:29 +04:00
|
|
|
[%$ ?(%da %ud %tas) @]
|
2014-04-09 02:26:01 +04:00
|
|
|
[~ (case p.u.soy) (case p.u.soy)]
|
|
|
|
::
|
|
|
|
[%many [%$ ?(%da %ud %tas) @] [%$ ?(%da %ud %tas) @] ~]
|
|
|
|
[~ (case i.p.u.soy) (case i.t.p.u.soy)]
|
|
|
|
==
|
|
|
|
|= mot=moat
|
|
|
|
`seam`[%det i.t.paw mot]
|
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ funk :: functional request
|
2014-03-26 04:48:22 +04:00
|
|
|
|= [nep=@tas fur=(unit term) paw=(list ,@t) quy=quay]
|
2014-03-12 23:50:39 +04:00
|
|
|
^- (unit seam)
|
2014-04-10 03:51:19 +04:00
|
|
|
=+ won==(%n (rsh 3 2 nep))
|
2014-03-20 05:05:42 +04:00
|
|
|
%+ bind
|
|
|
|
^- (unit ,[logo tube])
|
|
|
|
=+ ^= zac ^- (unit ,[p=@ta q=path])
|
2014-04-10 03:51:19 +04:00
|
|
|
?: won
|
2014-03-20 05:05:42 +04:00
|
|
|
[~ (scot %da now) paw]
|
|
|
|
?~ paw ~
|
|
|
|
=+ zac=(slay i.paw)
|
|
|
|
?. ?=([~ %$ ?(%ud %da %tas) *] zac) ~
|
|
|
|
[~ i.paw t.paw]
|
2014-04-09 04:34:29 +04:00
|
|
|
?: ?| ?=(~ zac)
|
2014-04-09 02:26:01 +04:00
|
|
|
?=(~ q.u.zac)
|
2014-03-20 05:05:42 +04:00
|
|
|
!(levy t.q.u.zac (sane %ta))
|
|
|
|
== ~
|
|
|
|
:+ ~ ?~(fur %html u.fur)
|
|
|
|
^- tube
|
2014-04-07 21:16:57 +04:00
|
|
|
:* (scot %p our)
|
|
|
|
i.q.u.zac
|
|
|
|
p.u.zac
|
2014-03-20 05:05:42 +04:00
|
|
|
t.q.u.zac
|
|
|
|
==
|
|
|
|
|= [for=logo toe=tube]
|
|
|
|
^- seam
|
2014-04-10 03:51:19 +04:00
|
|
|
:^ %fun for
|
|
|
|
toe(s (weld s.toe `path`~[~(rent co (flux nep quy))]))
|
|
|
|
?. won ~
|
|
|
|
:_ ~
|
|
|
|
=- =+ pey=(cat 3 (end 3 2 nep) %v)
|
|
|
|
=+ ven=+((,@ (need (sky %cw p.toe q.toe r.toe ~))))
|
|
|
|
=+ ^= cal :/
|
2014-04-14 22:01:18 +04:00
|
|
|
"path='".
|
2014-04-10 03:51:19 +04:00
|
|
|
"/{(trip (rsh 3 1 p.toe))}".
|
|
|
|
"/{(trip pey)}".
|
|
|
|
"/{(scow %ud ven)}".
|
2014-04-14 22:01:18 +04:00
|
|
|
"/{(trip q.toe)}';"
|
|
|
|
[-.sac [cal +.sac]]
|
2014-04-10 03:51:19 +04:00
|
|
|
^= sac
|
|
|
|
;script
|
2014-04-14 22:22:36 +04:00
|
|
|
;
|
2014-04-10 03:51:19 +04:00
|
|
|
; tries = 0;
|
2014-04-14 22:01:18 +04:00
|
|
|
; call = function() {
|
2014-04-10 03:51:19 +04:00
|
|
|
; xhr = new XMLHttpRequest();
|
|
|
|
; xhr.open('GET', path, true);
|
|
|
|
; xhr.addEventListener('load', function() {
|
|
|
|
; if(this.status !== 200) {
|
|
|
|
; return keep();
|
|
|
|
; }
|
|
|
|
; document.location.reload();
|
|
|
|
; });
|
|
|
|
; xhr.addEventListener('error', keep);
|
|
|
|
; xhr.addEventListener('abort', keep);
|
|
|
|
; xhr.send();
|
|
|
|
; }
|
|
|
|
; keep = function() {
|
|
|
|
; setTimeout(call,1000*tries);
|
|
|
|
; tries++;
|
|
|
|
; }
|
2014-04-14 22:01:18 +04:00
|
|
|
; call();
|
2014-04-10 03:51:19 +04:00
|
|
|
==
|
2014-03-12 23:50:39 +04:00
|
|
|
::
|
2014-04-21 21:02:09 +04:00
|
|
|
++ holt :: login redirect
|
|
|
|
|= [whu=(unit ship) pul=purl]
|
|
|
|
^- (unit seam)
|
|
|
|
:+ ~
|
|
|
|
%red
|
|
|
|
:: :+ [& q.p.pul r.p.pul]
|
|
|
|
%+ earl our
|
|
|
|
:+ [p.p.pul q.p.pul r.p.pul]
|
|
|
|
[~ /gul]
|
|
|
|
:- [%url (crip (urle (earn (earl our pul))))]
|
|
|
|
?~ whu ~
|
|
|
|
[%who (rsh 3 1 (scot %p u.whu))]~
|
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ holy :: structured request
|
|
|
|
|= [pul=purl moh=moth]
|
|
|
|
^- (unit seam)
|
|
|
|
?~ q.q.pul ~
|
|
|
|
=* nep i.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
|
2014-03-20 05:05:42 +04:00
|
|
|
%conn | :: connect
|
|
|
|
%delt | :: delete
|
|
|
|
%get =(%g one) :: get
|
|
|
|
%head =(%g one) :: head
|
|
|
|
%opts | :: options
|
|
|
|
%post =(%p one) :: post
|
|
|
|
%put =(%t one) :: put
|
|
|
|
%trac | :: trace
|
2014-03-12 23:50:39 +04:00
|
|
|
==
|
2014-04-21 21:02:09 +04:00
|
|
|
::
|
|
|
|
?+ two |
|
2014-03-12 23:50:39 +04:00
|
|
|
%e & :: stranger
|
2014-04-21 21:02:09 +04:00
|
|
|
::%u p.p.pul :: guest
|
|
|
|
%u &
|
|
|
|
%i p.p.pul :: neighbor
|
|
|
|
::%o p.p.pul :: identified
|
2014-04-16 05:35:25 +04:00
|
|
|
%o &
|
2014-03-12 23:50:39 +04:00
|
|
|
==
|
2014-04-21 21:02:09 +04:00
|
|
|
::
|
2014-03-26 04:48:22 +04:00
|
|
|
?= $? %p :: application
|
2014-03-12 23:50:39 +04:00
|
|
|
%c :: console
|
|
|
|
%f :: functional
|
2014-04-09 02:26:01 +04:00
|
|
|
%v :: version
|
2014-04-21 21:02:09 +04:00
|
|
|
%l :: local login
|
|
|
|
%m :: remote login
|
2014-03-12 23:50:39 +04:00
|
|
|
%n :: now
|
|
|
|
==
|
|
|
|
tri
|
2014-04-21 21:02:09 +04:00
|
|
|
::
|
|
|
|
!&(=(%c tri) !=(%o two))
|
2014-03-12 23:50:39 +04:00
|
|
|
=(3 (met 3 nep))
|
|
|
|
==
|
|
|
|
~
|
2014-04-21 21:02:09 +04:00
|
|
|
~& [%aut aut.ced]
|
|
|
|
?: &(=(%i two) =(~ aut.ced))
|
|
|
|
(holt ~ pul)
|
|
|
|
?: ?& =(%o two)
|
|
|
|
=+ urb=(~(get by aut.ced) %$)
|
|
|
|
~& [%urb urb]
|
|
|
|
?~(urb & !(levy u.urb |=(a=@ =(our (need (rush a fed:ag))))))
|
|
|
|
==
|
|
|
|
(holt [~ our] pul)
|
|
|
|
?+ one ~
|
|
|
|
%g
|
|
|
|
?+ tri ~
|
|
|
|
?(%f %n) (funk nep p.q.pul paw r.pul)
|
|
|
|
%v (foin p.q.pul paw r.pul)
|
|
|
|
%c (flub paw ~)
|
|
|
|
%l (fool r.pul)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
%p
|
|
|
|
?+ tri ~
|
|
|
|
%l (foom moh)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
%t
|
|
|
|
?+ tri ~
|
|
|
|
%c (flub paw [~ moh])
|
|
|
|
==
|
2014-03-12 23:50:39 +04:00
|
|
|
==
|
|
|
|
::
|
2014-04-14 22:01:18 +04:00
|
|
|
++ idle :: cancel request
|
|
|
|
|= num=@ud
|
|
|
|
^+ +>
|
|
|
|
=+ pup=(~(get by q.rey) num)
|
|
|
|
?~ pup +>.$
|
|
|
|
=. q.rey (~(del by q.rey) num)
|
|
|
|
?. ?=(%way pez.u.pup) +>.$
|
2014-04-16 23:47:41 +04:00
|
|
|
?. ?=(%det -.som.u.pup) +>.$
|
2014-04-14 22:01:18 +04:00
|
|
|
+>.$(..ya (hoot our num ses `riff`[p.som.u.pup ~]))
|
|
|
|
::
|
|
|
|
++ into :: introduce
|
2014-04-09 04:34:29 +04:00
|
|
|
|= [pul=purl moh=moth]
|
2014-04-09 02:26:01 +04:00
|
|
|
^+ +>
|
|
|
|
=+ num=p.rey
|
|
|
|
%= +>.$
|
2014-04-14 22:01:18 +04:00
|
|
|
lor (~(put by lor) hen num [%& our ses])
|
2014-04-09 02:26:01 +04:00
|
|
|
p.rey +(num)
|
|
|
|
q.rey
|
|
|
|
%+ ~(put by q.rey) num
|
|
|
|
^- pimp
|
|
|
|
:* !?=(%head p.moh)
|
|
|
|
hen
|
|
|
|
*seam
|
|
|
|
`pest`[%raw pul moh]
|
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ iota :: change response
|
|
|
|
|= [num=@ud rot=riot]
|
|
|
|
^+ +>
|
2014-04-14 22:01:18 +04:00
|
|
|
=+ 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])))
|
2014-04-09 02:26:01 +04:00
|
|
|
::
|
2014-03-21 10:24:22 +04:00
|
|
|
++ lace :: load and execute
|
|
|
|
|= [pax=path sam=vase]
|
|
|
|
^- [gank _+>]
|
|
|
|
=^ hum +>.$ (lack pax)
|
|
|
|
:_ +>.$
|
|
|
|
=+ mud=(need hum)
|
|
|
|
?: ?=(| -.mud) mud
|
2014-04-09 02:26:01 +04:00
|
|
|
=+ 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]
|
2014-04-09 04:34:29 +04:00
|
|
|
==
|
2014-03-21 10:24:22 +04:00
|
|
|
::
|
|
|
|
++ 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)
|
2014-04-07 21:16:57 +04:00
|
|
|
?^ huc
|
2014-03-21 10:24:22 +04:00
|
|
|
[[~ %& u.huc] +>.$]
|
|
|
|
=+ mud=(much pax q.u.q.ank)
|
|
|
|
:- [~ mud]
|
2014-04-07 21:16:57 +04:00
|
|
|
?: ?=(| -.mud) +>.$
|
2014-03-21 10:24:22 +04:00
|
|
|
+>.$(cah.sef (~(put by cah.sef) p.u.q.ank p.mud))
|
|
|
|
::
|
|
|
|
++ 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 {<too>} from {<for>}"] ~]]
|
|
|
|
::
|
|
|
|
++ 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)]
|
2014-04-07 21:16:57 +04:00
|
|
|
::
|
2014-03-21 10:24:22 +04:00
|
|
|
++ 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) ~)
|
2014-04-21 21:02:09 +04:00
|
|
|
=- ?~(q.arc orz [tex orz])
|
|
|
|
^= orz
|
2014-03-21 10:24:22 +04:00
|
|
|
|- ^- (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])
|
2014-04-07 21:16:57 +04:00
|
|
|
=| suf=path
|
2014-03-21 10:24:22 +04:00
|
|
|
|- ^- (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
|
2014-04-07 21:16:57 +04:00
|
|
|
& ?~ q.r.i.luc
|
2014-03-21 10:24:22 +04:00
|
|
|
[[[p.i.luc q.i.luc r.r.i.luc] p.mor] q.mor r.mor s.mor]
|
2014-04-07 21:16:57 +04:00
|
|
|
:+ p.mor q.mor
|
2014-03-21 10:24:22 +04:00
|
|
|
[[[p.i.luc q.i.luc u.q.r.i.luc r.r.i.luc] r.mor] s.mor]
|
2014-04-07 21:16:57 +04:00
|
|
|
| ?~ q.r.i.luc
|
2014-03-21 10:24:22 +04:00
|
|
|
[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] +>.$]
|
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
++ step :: step in work
|
|
|
|
|- ^+ +
|
|
|
|
=^ zib +.$
|
|
|
|
=+ yub=q.rey
|
|
|
|
|- ^- [(list ,[p=@ud q=pimp]) _+.^$]
|
|
|
|
?~ yub [~ +.^$]
|
|
|
|
=^ sin +.^$ $(yub l.yub)
|
2014-04-09 04:34:29 +04:00
|
|
|
=^ dex +.^$ $(yub r.yub)
|
2014-04-09 02:26:01 +04:00
|
|
|
=^ top +.^$ (wink n.yub)
|
2014-03-12 23:50:39 +04:00
|
|
|
=+ pot=`(list ,[p=@ud q=pimp])`?~(top ~ [[p.n.yub u.top] ~])
|
|
|
|
[:(weld pot dex sin) +.^$]
|
|
|
|
+.$(q.rey (~(gas by `_q.rey`~) zib))
|
|
|
|
::
|
|
|
|
++ wink :: advance request
|
2014-04-09 02:26:01 +04:00
|
|
|
|= [num=@ud pip=pimp]
|
2014-03-12 23:50:39 +04:00
|
|
|
^- [(unit pimp) _+>]
|
|
|
|
?- pez.pip
|
2014-04-09 02:26:01 +04:00
|
|
|
%way [[~ pip] +>.$]
|
2014-03-12 23:50:39 +04:00
|
|
|
%new
|
2014-03-26 04:48:22 +04:00
|
|
|
?- -.som.pip
|
2014-04-16 23:47:41 +04:00
|
|
|
%con
|
|
|
|
:_ +>.$
|
2014-04-21 21:02:09 +04:00
|
|
|
=+ cal==+(cal=(~(get by cow) p.som.pip) ?^(cal u.cal *clue))
|
2014-04-17 04:49:41 +04:00
|
|
|
=+ ^= obj
|
|
|
|
%- jobe
|
|
|
|
:~ sent/(jone ino.cal)
|
|
|
|
recv/(jone ono.cal)
|
|
|
|
ownr/[%s (rsh 3 1 (scot %p our))]
|
|
|
|
==
|
2014-04-16 23:47:41 +04:00
|
|
|
=+ sez=:/("seq={(pojo obj)}")
|
|
|
|
=+ jqu="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"
|
|
|
|
=+ ^= sac
|
|
|
|
;script
|
|
|
|
;
|
|
|
|
; $(
|
|
|
|
; function() {
|
|
|
|
; $input = $('#input .line')
|
|
|
|
; $prompt = $('#input .prompt')
|
|
|
|
; $output = $('#output')
|
|
|
|
; $input.focus()
|
|
|
|
;
|
|
|
|
; send = function(com) {
|
|
|
|
; if(com.line !== undefined &&
|
|
|
|
; com.line.indexOf('error') != -1) {
|
|
|
|
; com = {error:true}
|
|
|
|
; }
|
|
|
|
; console.log('sending')
|
|
|
|
; console.log(com)
|
2014-04-17 04:49:41 +04:00
|
|
|
; $.ajax('/'+seq.ownr+'/toc/0/'+seq.sent, {
|
2014-04-16 23:47:41 +04:00
|
|
|
; type: 'PUT',
|
2014-04-17 04:49:41 +04:00
|
|
|
; contentType: 'text/json',
|
|
|
|
; data: JSON.stringify(com),
|
2014-04-16 23:47:41 +04:00
|
|
|
; success: function(data,status,xhr) {
|
|
|
|
; seq.sent++
|
|
|
|
; },
|
|
|
|
; error: function(data,status,xhr) {
|
|
|
|
; if(data.responseJSON.lines !== undefined)
|
|
|
|
; addLines(data.responseJSON.lines)
|
|
|
|
; seq.sent++
|
|
|
|
; }
|
|
|
|
; })
|
|
|
|
; }
|
|
|
|
;
|
|
|
|
; recv = function() {
|
2014-04-17 04:49:41 +04:00
|
|
|
; $.ajax('/'+seq.ownr+'/goc/0/'+seq.recv, {
|
2014-04-16 23:47:41 +04:00
|
|
|
; type:'GET',
|
|
|
|
; success: function(data,status,xhr) {
|
2014-04-17 04:49:41 +04:00
|
|
|
; console.log(data);
|
|
|
|
; seq.recv = data[0];
|
|
|
|
; seq.send = data[1];
|
|
|
|
; msg = data[2];
|
|
|
|
; if(msg.text !== undefined)
|
|
|
|
; addLines(msg.text)
|
|
|
|
; if(msg.helo !== undefined)
|
|
|
|
; changePrompt(msg.helo)
|
2014-04-16 23:47:41 +04:00
|
|
|
; recv()
|
|
|
|
; },
|
|
|
|
; error: function(data,status,xhr) {
|
|
|
|
; console.log('error')
|
|
|
|
; seq.recv++
|
|
|
|
; }
|
|
|
|
; })
|
|
|
|
; }
|
|
|
|
;
|
|
|
|
; recv()
|
|
|
|
;
|
|
|
|
; send({hail:true})
|
|
|
|
;
|
|
|
|
; addLines = function(lines) {
|
|
|
|
; $output.append(lines.join("<br />")+"<br />")
|
|
|
|
; }
|
|
|
|
;
|
|
|
|
; changePrompt = function(helo) {
|
2014-04-17 04:49:41 +04:00
|
|
|
; $prompt.text(helo.prod[1]);
|
2014-04-16 23:47:41 +04:00
|
|
|
; }
|
|
|
|
;
|
|
|
|
; ctrl = false
|
|
|
|
;
|
|
|
|
; $input.on('keydown', function(e) {
|
|
|
|
; console.log('keydown')
|
|
|
|
; console.log(e.keyCode)
|
|
|
|
; if(e.keyCode == 17) {
|
|
|
|
; ctrl = true
|
|
|
|
; return;
|
|
|
|
; }
|
|
|
|
; if(e.keyCode == 88 && ctrl == true) {
|
|
|
|
; console.log('ling')
|
|
|
|
; send({ling:true})
|
|
|
|
; return;
|
|
|
|
; }
|
|
|
|
; if(e.keyCode == 13) {
|
|
|
|
; send({line:$input.val()})
|
|
|
|
; $input.val('')
|
|
|
|
; return;
|
|
|
|
; }
|
|
|
|
; });
|
|
|
|
;
|
|
|
|
; $input.on('keyup', function(e) {
|
|
|
|
; if(e.keyCode == 17) {
|
|
|
|
; ctrl = false
|
|
|
|
; }
|
|
|
|
; });
|
|
|
|
; }
|
|
|
|
; )
|
|
|
|
==
|
|
|
|
=+ ^= ham
|
|
|
|
;html
|
|
|
|
;head
|
2014-04-17 04:49:41 +04:00
|
|
|
;title: urbit {<our>}/{<p.som.pip>}
|
2014-04-16 23:47:41 +04:00
|
|
|
;script(type "text/javascript", src jqu);
|
2014-04-17 04:49:41 +04:00
|
|
|
;style
|
|
|
|
; body {
|
|
|
|
; margin: 60px 120px;
|
|
|
|
; font: normal 12px "Menlo" monospace;
|
|
|
|
; background-color: #000;
|
|
|
|
; color: #fff;
|
|
|
|
; }
|
|
|
|
;
|
|
|
|
; #output {
|
|
|
|
;
|
|
|
|
; }
|
|
|
|
;
|
|
|
|
; #input .prompt {
|
|
|
|
; display: inline-block;
|
|
|
|
; margin-right: 12px;
|
|
|
|
; }
|
|
|
|
;
|
|
|
|
; #input .line {
|
|
|
|
; outline: none;
|
|
|
|
; width: 80%;
|
|
|
|
; border: 0;
|
|
|
|
; background-color: transparent;
|
|
|
|
; color: #fff;
|
|
|
|
; font: normal 12px "Menlo" monospace;
|
|
|
|
; }
|
|
|
|
==
|
2014-04-16 23:47:41 +04:00
|
|
|
==
|
|
|
|
;body
|
2014-04-17 04:49:41 +04:00
|
|
|
;div@output;
|
|
|
|
;div@input
|
|
|
|
;div/prompt;
|
|
|
|
;input/line(type "text");
|
|
|
|
==
|
2014-04-16 23:47:41 +04:00
|
|
|
;+ [-.sac `marl`[sez +.sac]]
|
|
|
|
==
|
|
|
|
==
|
|
|
|
[~ pip(pez [%fin %ham ham])]
|
|
|
|
::
|
|
|
|
%cog
|
2014-04-21 21:02:09 +04:00
|
|
|
=+ cal==+(cal=(~(get by cow) p.som.pip) ?^(cal u.cal *clue))
|
2014-04-16 23:47:41 +04:00
|
|
|
?. (lth q.som.pip ono.cal)
|
2014-04-17 04:49:41 +04:00
|
|
|
:- [~ pip(pez %way)]
|
|
|
|
%= +>.$ cow
|
|
|
|
%+ ~(put by cow)
|
|
|
|
p.som.pip
|
|
|
|
=+ val=(~(get by voy.cal) q.som.pip)
|
|
|
|
cal(voy (~(put by voy.cal) q.som.pip ?~(val [num ~] [num u.val])))
|
|
|
|
==
|
|
|
|
:_ +>.$
|
2014-04-16 23:47:41 +04:00
|
|
|
=+ ^= jon ^- json
|
|
|
|
:~ %a
|
|
|
|
(jone ono.cal)
|
|
|
|
(jone ino.cal)
|
|
|
|
(snag (sub ono.cal q.som.pip) out.cal)
|
|
|
|
==
|
|
|
|
[~ pip(pez [%fin %mid /text/json (tact (pojo jon))])]
|
|
|
|
::
|
|
|
|
%cop
|
2014-04-21 21:02:09 +04:00
|
|
|
=+ cal==+(cal=(~(get by cow) p.som.pip) ?^(cal u.cal *clue))
|
2014-04-16 23:47:41 +04:00
|
|
|
?. =(q.som.pip ino.cal)
|
|
|
|
=. cow (~(put by cow) p.som.pip cal)
|
|
|
|
:_ +>.$
|
|
|
|
[~ pip(pez [%err 500 [%leaf "cop: {<q.som.pip>}, {<ino.cal>}."]~])]
|
|
|
|
=+ ^= fuv ^- (unit card)
|
|
|
|
?. ?=(%o -.r.som.pip) ~
|
|
|
|
=+ lin=(~(get by p.r.som.pip) %line)
|
|
|
|
?^ lin ?.(?=(%s -.u.lin) ~ [~ %line p.u.lin])
|
2014-04-17 04:49:41 +04:00
|
|
|
=+ syc=(~(get by p.r.som.pip) %hail)
|
2014-04-16 23:47:41 +04:00
|
|
|
?^ syc [~ %hail ~]
|
|
|
|
=+ lig=(~(get by p.r.som.pip) %ling)
|
|
|
|
?^ lig [~ %ling ~]
|
|
|
|
~
|
|
|
|
:_ %_ +>.$
|
2014-04-17 04:49:41 +04:00
|
|
|
cow (~(put by cow) p.som.pip cal(ino +(ino.cal)))
|
2014-04-16 23:47:41 +04:00
|
|
|
mow
|
|
|
|
?~ fuv mow
|
|
|
|
:_ mow
|
|
|
|
:+ [~ %gold our]
|
2014-04-17 04:49:41 +04:00
|
|
|
[/b [%e %cons ses (scot %ud p.som.pip) ~] ~ ~]
|
2014-04-16 23:47:41 +04:00
|
|
|
u.fuv
|
|
|
|
==
|
|
|
|
[~ `pimp`pip(pez `pest`[%fin %raw 200 ~ ~])]
|
|
|
|
::
|
2014-04-09 02:26:01 +04:00
|
|
|
%det
|
|
|
|
:- [~ pip(pez %way)]
|
|
|
|
=+ rif=`riff`[p.som.pip ~ [%| q.som.pip]]
|
|
|
|
+>.$(..ya (hoot our num ses rif))
|
|
|
|
::
|
2014-03-12 23:50:39 +04:00
|
|
|
%fun
|
2014-03-26 04:48:22 +04:00
|
|
|
=^ syt +>.$ (lude p.som.pip q.som.pip)
|
2014-04-07 21:16:57 +04:00
|
|
|
:_ +>.$
|
2014-03-12 23:50:39 +04:00
|
|
|
:- ~
|
|
|
|
%= pip
|
|
|
|
pez
|
|
|
|
^- pest
|
|
|
|
?~ syt
|
2014-04-10 05:01:46 +04:00
|
|
|
[%err 404 [[%leaf "{<p.som.pip>} not found"] ~]]
|
2014-03-20 05:05:42 +04:00
|
|
|
?- -.u.syt
|
|
|
|
| [%err 500 (flop p.u.syt)]
|
2014-04-10 05:01:46 +04:00
|
|
|
& [%fin (lofi r.som.pip p.u.syt)]
|
|
|
|
:: & [%fin p.u.syt]
|
2014-03-12 23:50:39 +04:00
|
|
|
==
|
|
|
|
==
|
2014-04-21 21:02:09 +04:00
|
|
|
::
|
|
|
|
%lof !!
|
|
|
|
%lon
|
|
|
|
:_ +>.$
|
|
|
|
=+ rul=(earn q.som.pip)
|
|
|
|
=+ ruf=(earn (earl our q.som.pip(q.q /pul, r ~)))
|
|
|
|
=+ ^= ham
|
|
|
|
;html
|
|
|
|
;body
|
|
|
|
;form(method "post", action ruf)
|
|
|
|
;* ?^ p.som.pip
|
|
|
|
=+ nam=(trip (rsh 3 1 (scot %p u.p.som.pip)))
|
|
|
|
;= ;input(type "hidden", name "who", value nam);
|
|
|
|
==
|
|
|
|
;= ; vessel: ;{input(type "text", name "who")}
|
|
|
|
==
|
|
|
|
; password: ;{input(type "password", name "pas")}
|
|
|
|
;input(type "hidden", name "url", value rul);
|
|
|
|
;input(type "submit", value "submit");
|
|
|
|
==
|
|
|
|
==
|
|
|
|
==
|
|
|
|
[~ pip(pez [%fin %ham ham])]
|
|
|
|
::
|
|
|
|
%log
|
|
|
|
?. =(%foobar r.som.pip)
|
|
|
|
~& [%login-bad som.pip]
|
|
|
|
$(som.pip [%lon [~ p.som.pip] q.som.pip])
|
|
|
|
=+ tau=(~(get by aut.ced) %$)
|
|
|
|
=+ hoo=`@t`(rsh 3 1 (scot %p p.som.pip))
|
|
|
|
~& [%login-good hoo som.pip]
|
|
|
|
%= $
|
|
|
|
som.pip [%red q.som.pip]
|
|
|
|
aut.ced (~(put by aut.ced) %$ ?~(tau [hoo ~] [hoo u.tau]))
|
|
|
|
==
|
|
|
|
::
|
|
|
|
%red
|
|
|
|
:_ +>.$
|
|
|
|
:- ~
|
|
|
|
%= pip
|
|
|
|
pez
|
|
|
|
:- %fin
|
|
|
|
:- %raw
|
|
|
|
:+ 301
|
|
|
|
[%location (crip (earn p.som.pip))]~
|
|
|
|
~
|
|
|
|
==
|
2013-09-29 00:21:18 +04:00
|
|
|
==
|
2014-03-12 23:50:39 +04:00
|
|
|
::
|
|
|
|
[%err *]
|
2014-04-17 04:49:41 +04:00
|
|
|
[~ +>.$(..ya (muff(hen hen.pip) [%thou (loft `love`[%zap +.pez.pip])]))]
|
2014-03-12 23:50:39 +04:00
|
|
|
::
|
|
|
|
[%fin *]
|
|
|
|
=+ har=(loft p.pez.pip)
|
|
|
|
=. q.har (weld (turn cug |=(a=@t ['set-cookie' a])) q.har)
|
2014-04-17 04:49:41 +04:00
|
|
|
[~ +>.$(..ya (muff(hen hen.pip) [%thou har]))]
|
2014-04-09 02:26:01 +04:00
|
|
|
::
|
|
|
|
[%haz *]
|
|
|
|
:_ +>.$
|
|
|
|
[~ pip(pez [%fin %wan 'Hello, world' ~])]
|
2014-03-12 23:50:39 +04:00
|
|
|
::
|
|
|
|
[%raw *]
|
|
|
|
:_ +>.$
|
|
|
|
^- (unit pimp)
|
|
|
|
:- ~
|
|
|
|
=+ hoy=(holy p.pez.pip)
|
|
|
|
?~ hoy
|
|
|
|
pip(pez [%err 404 [[%leaf "invalid request"] ~]])
|
2014-03-26 04:48:22 +04:00
|
|
|
pip(som u.hoy, pez %new)
|
2014-03-12 23:50:39 +04:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ work
|
|
|
|
|- ^+ +
|
|
|
|
=+ sez=step
|
|
|
|
?: =(rey.sez rey) sez
|
|
|
|
$(+ sez)
|
|
|
|
--
|
|
|
|
--
|
|
|
|
--
|
|
|
|
. ==
|
|
|
|
=| bolo
|
|
|
|
=* bol -
|
|
|
|
|= [now=@da eny=@ sky=$+(* (unit))] :: activate
|
|
|
|
^? :: opaque core
|
|
|
|
|% ::
|
|
|
|
++ beat :: process move
|
|
|
|
|= [wru=(unit writ) tea=wire hen=duct fav=curd]
|
|
|
|
=> .(fav ((hard card) fav))
|
2014-04-14 22:01:18 +04:00
|
|
|
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
|
2014-03-12 23:50:39 +04:00
|
|
|
?: ?=(%crud -.fav)
|
|
|
|
[[[wru [/d hen] %flog fav] ~] ..^$]
|
|
|
|
^- [p=(list move) q=vane]
|
2014-03-20 05:05:42 +04:00
|
|
|
=. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
|
2014-04-07 21:16:57 +04:00
|
|
|
=^ mos bol
|
2014-03-12 23:50:39 +04:00
|
|
|
abet:apex:~(adit ye [[wru tea hen fav] [now eny sky] ~] bol)
|
|
|
|
[mos ..^$]
|
2013-09-29 00:21:18 +04:00
|
|
|
::
|
2013-12-09 01:23:03 +04:00
|
|
|
++ come
|
2014-01-06 05:52:37 +04:00
|
|
|
|= [sam=? old=vase]
|
2013-09-29 00:21:18 +04:00
|
|
|
^- vane
|
2014-01-07 00:37:42 +04:00
|
|
|
(load old)
|
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
|
2014-04-17 20:37:22 +04:00
|
|
|
|= old=vase
|
2013-09-29 00:21:18 +04:00
|
|
|
^- vane
|
2014-04-17 20:37:22 +04:00
|
|
|
?. (~(nest ut -:!>(`bolo`+>-.^$)) | p.old)
|
2014-03-12 23:50:39 +04:00
|
|
|
~& %eyre-reset
|
|
|
|
..^$
|
2014-04-17 20:37:22 +04:00
|
|
|
..^$(+>- (bolo q.old))
|
2013-09-29 00:21:18 +04:00
|
|
|
::
|
2013-12-09 01:23:03 +04:00
|
|
|
++ raze
|
2013-09-29 00:21:18 +04:00
|
|
|
^- vane
|
|
|
|
..$(+>- *bolo)
|
|
|
|
::
|
|
|
|
++ scry
|
2013-12-15 09:42:27 +04:00
|
|
|
|= [our=ship ren=@tas who=ship syd=disc lot=coin tyl=path]
|
2013-09-29 00:21:18 +04:00
|
|
|
^- (unit)
|
|
|
|
~
|
|
|
|
::
|
2014-04-07 21:16:57 +04:00
|
|
|
++ stay
|
2014-03-21 10:24:22 +04:00
|
|
|
`vase`!>((colt `bolo`+>-.$))
|
2014-01-07 00:37:42 +04:00
|
|
|
++ vern [164 0]
|
2013-09-29 00:21:18 +04:00
|
|
|
--
|