mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
Merge branch 'nextbreach' of https://github.com/urbit/urbit into nextbreach
This commit is contained in:
commit
1e2e1174e2
@ -1123,7 +1123,6 @@
|
||||
++ done :: done:ho:um:am
|
||||
|= [cha=path num=@ud] :: complete outgoing
|
||||
^- [(unit duct) _+>]
|
||||
~? =(~wicwyc-sitlyr her) [%done cha num]
|
||||
=+ rol=(need (~(get by ryl.bah) cha))
|
||||
=+ rix=(~(get by san.rol) num)
|
||||
?~ rix [~ +>.$]
|
||||
|
@ -27,6 +27,8 @@
|
||||
++ kiss :: in request ->$
|
||||
$% [%crud p=@tas q=(list tank)] :: error with trace
|
||||
[%hail ~] :: refresh
|
||||
[%hook ~] :: this term hung up
|
||||
[%harm ~] :: all terms hung up
|
||||
[%init p=@p] :: report install
|
||||
[%kill p=~] :: kill a task
|
||||
[%line p=@t] :: source line
|
||||
@ -57,6 +59,11 @@
|
||||
[%want p=sock q=path r=*] :: to %ames
|
||||
[%warp p=sock q=riff] :: to %clay
|
||||
== ::
|
||||
++ rave :: see %clay
|
||||
$% [& p=mood] :: single request
|
||||
[| p=moat] :: change range
|
||||
== ::
|
||||
++ riff ,[p=desk q=(unit rave)] :: see %clay
|
||||
++ sign :: in result $-<
|
||||
$% [%crud p=@tas q=(list tank)] :: by any
|
||||
[%hail ~] :: by any
|
||||
@ -269,6 +276,8 @@
|
||||
?- -.kyz
|
||||
%crud [[[hen [%slip %d %flog kyz]] ~] +<.^^$]
|
||||
%hail [[[hen [%give %helo prot]] ~] +<.^^$]
|
||||
%harm [~ +<.^^$]
|
||||
%hook ~&(%batz-hook [~ +<.^^$])
|
||||
%line =+ gyp=?>(?=(^ fog) i.fog)
|
||||
?: &(=(0 gyp) =(%$ p.kyz)) $(kyz [%hail ~])
|
||||
=< abet
|
||||
@ -276,8 +285,11 @@
|
||||
lash:(gill:(fist hen) p.kyz)
|
||||
lash:(como:(fest gyp hen) p.kyz)
|
||||
%kill =+ gyp=?>(?=(^ fog) i.fog)
|
||||
?: =(0 gyp) [[[hen [%give %logo ~]] ~] +<.^^$]
|
||||
abet:kill:(fest gyp hen)
|
||||
?. =(0 gyp)
|
||||
abet:kill:(fest gyp hen)
|
||||
?: =(~[/gold/term/1] ?>(?=(^ hen) t.hen)) :: XX gross
|
||||
[[[hen [%give %logo ~]] ~] +<.^^$]
|
||||
[~ +<.^^$]
|
||||
%ling ?> ?=(^ fog)
|
||||
=> .(fog (weld t.fog `(list ,@ud)`[i.fog ~]))
|
||||
[[[hen [%give %helo prot]] ~] +<.^^$]
|
||||
|
@ -3,6 +3,8 @@
|
||||
::
|
||||
|= pit=vase
|
||||
=> |%
|
||||
++ cult (map duct rave) :: subscriptions
|
||||
++ dojo ,[p=cult q=dome] :: domestic desk state
|
||||
++ gift :: out result <-$
|
||||
$% [%ergo p=@p q=@tas r=@ud] :: version update
|
||||
[%note p=@tD q=tank] :: debug message
|
||||
@ -32,6 +34,34 @@
|
||||
[%went p=ship q=cape] :: by %ames
|
||||
[%writ p=riot] :: by %clay
|
||||
== ::
|
||||
++ raft :: filesystem
|
||||
$: fat=(map ship room) :: domestic
|
||||
hoy=(map ship rung) :: foreign
|
||||
== ::
|
||||
++ rave :: general request
|
||||
$% [& p=mood] :: single request
|
||||
[| p=moat] :: change range
|
||||
== ::
|
||||
++ rede :: universal project
|
||||
$: lim=@da :: complete to
|
||||
qyx=cult :: subscribers
|
||||
ref=(unit rind) :: outgoing requests
|
||||
dom=dome :: revision state
|
||||
== ::
|
||||
++ riff ,[p=desk q=(unit rave)] :: request/desist
|
||||
++ rind :: request manager
|
||||
$: nix=@ud :: request index
|
||||
bom=(map ,@ud ,[p=duct q=rave]) :: outstanding
|
||||
fod=(map duct ,@ud) :: current requests
|
||||
haw=(map mood (unit)) :: simple cache
|
||||
== ::
|
||||
++ room :: fs per ship
|
||||
$: hun=duct :: terminal duct
|
||||
hez=(unit duct) :: sync duct
|
||||
dos=(map desk dojo) :: native desk
|
||||
== ::
|
||||
++ rung $: rus=(map desk rede) :: neighbor desks
|
||||
== ::
|
||||
-- =>
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 4cA, filesystem logic ::
|
||||
|
@ -1,8 +1,8 @@
|
||||
::
|
||||
!:
|
||||
:: dill (4d), terminal handling
|
||||
::
|
||||
|= pit=vase
|
||||
=> |%
|
||||
=> |% :: interface tiles
|
||||
++ gift :: out result <-$
|
||||
$% [%bbye ~] :: reset prompt
|
||||
[%blit p=(list blit)] :: terminal output
|
||||
@ -20,10 +20,11 @@
|
||||
[%crud p=@tas q=(list tank)] :: error with trace
|
||||
[%flog p=flog] :: wrapped error
|
||||
[%hail ~] :: terminal refresh
|
||||
[%hook ~] :: this term hung up
|
||||
[%harm ~] :: all terms hung up
|
||||
[%noop ~] :: no operation
|
||||
[%talk p=tank] ::
|
||||
[%text p=tape] ::
|
||||
[%wipe ~] :: clear terminal
|
||||
== ::
|
||||
++ flog :: sent to %dill
|
||||
$% [%crud p=@tas q=(list tank)] ::
|
||||
@ -33,6 +34,8 @@
|
||||
++ note :: out request $->
|
||||
$% [%crud p=@tas q=(list tank)] :: to %dill
|
||||
[%hail ~] :: to %batz
|
||||
[%harm ~] :: to %batz
|
||||
[%hook ~] :: to %batz
|
||||
[%kill p=~] :: to %batz
|
||||
[%line p=@t] :: to %batz
|
||||
[%ling ~] :: to %batz
|
||||
@ -57,11 +60,56 @@
|
||||
[%vega p=path] :: by %batz
|
||||
[%warn p=tape] :: by %batz
|
||||
==
|
||||
:::::::: :: dill tiles
|
||||
++ bein :: terminal control
|
||||
$: $: bul=@ud :: buffer length
|
||||
bus=@ud :: cursor in buffer
|
||||
but=(list ,@c) :: buffer text
|
||||
buy=prom :: input style
|
||||
== ::
|
||||
$: hiz=@ud :: history depth
|
||||
hux=path :: history path
|
||||
hym=(map ,@ud (list ,@c)) :: history overlay
|
||||
hyt=hist :: history object
|
||||
hyr=(unit (list ,@c)) :: history search
|
||||
== ::
|
||||
$: pol=@ud :: length of prompt
|
||||
pot=tape :: prompt text
|
||||
== ::
|
||||
== ::
|
||||
++ blew ,[p=@ud q=@ud] :: columns rows
|
||||
++ belt :: raw console input
|
||||
$% [%aro p=?(%d %l %r %u)] :: arrow key
|
||||
[%bac ~] :: true backspace
|
||||
[%ctl p=@ud] :: control-key
|
||||
[%del ~] :: true delete
|
||||
[%met p=@ud] :: meta-key
|
||||
[%ret ~] :: return
|
||||
[%txt p=(list ,@c)] :: utf32 text
|
||||
== ::
|
||||
++ blit :: raw console output
|
||||
$% [%bel ~] :: make a noise
|
||||
[%clr ~] :: clear the screen
|
||||
[%hop p=@ud] :: set cursor position
|
||||
[%lin p=(list ,@c)] :: set current line
|
||||
[%mor ~] :: newline
|
||||
[%sav p=path q=@] :: save to file
|
||||
== ::
|
||||
++ blot :: kill ring
|
||||
$: p=@ud :: length
|
||||
q=@ud :: depth
|
||||
r=(list (list ,@c)) :: kills
|
||||
== ::
|
||||
++ blur ,[p=@ud q=(unit bein) r=blot] :: columns, prompt
|
||||
++ yard :: terminal state
|
||||
$: p=? :: verbose
|
||||
q=blur :: display state
|
||||
r=(map path hist) :: history
|
||||
== ::
|
||||
-- =>
|
||||
|%
|
||||
++ dy
|
||||
|= [hen=duct dug=(map duct yard)]
|
||||
=+ wip=|
|
||||
=+ ^= yar ^- yard
|
||||
=+ yur=(~(get by dug) hen)
|
||||
?^ yur u.yur
|
||||
@ -487,17 +535,26 @@
|
||||
::
|
||||
%hail :: refresh
|
||||
+>.$(mos :_(mos [hen %toss %b ~ kyz]))
|
||||
::
|
||||
%harm :: all terms hung up
|
||||
=+ nug=((map duct yard) [[hen (~(get by dug) hen)] ~ ~])
|
||||
^+ +>.$
|
||||
%= +>.$
|
||||
dug nug
|
||||
mos :_(mos [hen %toss %b ~ kyz])
|
||||
==
|
||||
::
|
||||
%hook :: this term hung up
|
||||
+>.$(dug (~(del by dug) hen), mos :_(mos [hen %toss %b ~ kyz]))
|
||||
::
|
||||
%talk (furl (~(win re p.kyz) 0 p.q.yar)) :: program output
|
||||
%text $(kyz [%talk %leaf p.kyz]) :: simple message
|
||||
::
|
||||
%wipe +>.$(wip &) :: delete old
|
||||
==
|
||||
::
|
||||
++ yerk :: complete core
|
||||
^- [p=(list move) q=(map duct yard)]
|
||||
:- (flop mos)
|
||||
?.(wip (~(put by dug) hen yar) (~(del by dug) hen))
|
||||
(~(put by dug) hen yar)
|
||||
--
|
||||
--
|
||||
=| $: %0 ::
|
||||
@ -540,7 +597,7 @@
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair lode ,*)))
|
||||
~
|
||||
[~ ~ [%tank >dug<]]
|
||||
::
|
||||
++ stay [%0 dug]
|
||||
++ take :: process move
|
||||
|
459
arvo/eyre.hoon
459
arvo/eyre.hoon
@ -10,7 +10,6 @@
|
||||
[%thus p=@ud q=(unit hiss)] :: http request/cancel
|
||||
== ::
|
||||
++ hasp ,[p=ship q=term] :: see %gall
|
||||
++ hope (pair ,? path) :: see %gall
|
||||
++ kiss :: in request ->$
|
||||
$% [%born ~] :: new unix process
|
||||
[%crud p=@tas q=(list tank)] :: XX rethink
|
||||
@ -28,18 +27,22 @@
|
||||
[%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
|
||||
[%show p=hasp q=ship r=path] :: to %gall
|
||||
[%shut p=hasp q=ship] :: to %gall
|
||||
[%this p=? q=clip r=httq] :: to %eyre
|
||||
[%thud ~] :: to %eyre
|
||||
[%wait p=hasp q=@ud] :: to %gall
|
||||
[%want p=sock q=path r=*] :: to %ames
|
||||
[%warp p=sock q=riff] :: to %clay
|
||||
== ::
|
||||
++ rave :: see %clay
|
||||
$% [| p=moat] :: change range
|
||||
== ::
|
||||
++ riff ,[p=desk q=(unit rave)] :: see %clay
|
||||
++ sign :: in result $-<
|
||||
$% [%boot p=@ud] :: by %gall
|
||||
[%crud p=@tas q=(list tank)] :: by any
|
||||
$% [%crud p=@tas q=(list tank)] :: by any
|
||||
[%helo p=path q=prod] :: by %batz
|
||||
[%made p=(each bead (list tank))] :: by %ford
|
||||
[%rush p=chop q=cage] :: by %gall
|
||||
[%rust p=chop q=cage] :: by %gall
|
||||
[%talk p=tank] :: by %batz
|
||||
[%tell p=(list ,@t)] :: by %batz
|
||||
@ -55,7 +58,7 @@
|
||||
++ bolo :: eyre state
|
||||
$: %0 :: version
|
||||
gub=@t :: random identity
|
||||
hov=(unit ,@p) :: master for remote
|
||||
hov=(unit ship) :: master for remote
|
||||
ged=duct :: client interface
|
||||
ney=@uvI :: rolling entropy
|
||||
dop=(map host ship) :: host aliasing
|
||||
@ -76,6 +79,8 @@
|
||||
cow=(map ,@ud clue) :: consoles
|
||||
cug=(list ,@t) :: unacked cookies
|
||||
lax=@da :: last used
|
||||
sok=(map ,@ud (trel term ship sink)) :: live apps by reqno
|
||||
kog=(map (pair term ship) ,@ud) :: live apps by name
|
||||
rey=[p=@ud q=(map ,@ud pimp)] :: live requests
|
||||
== ::
|
||||
++ dual ,[p=@ud q=(each ,[p=ship q=hole] ship)] :: request handle
|
||||
@ -105,12 +110,12 @@
|
||||
rem=[p=@ud q=(map ,@ud duct)] :: active requests
|
||||
== ::
|
||||
++ seam :: logical request
|
||||
$% [%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
|
||||
[%apu p=term q=logo r=octs] :: app upload
|
||||
$% [%ape p=term q=ship r=@ud s=term t=@ud] :: subscribe pull
|
||||
[%apg p=term q=ship r=logo s=path] :: app get/start
|
||||
[%apm p=term q=ship r=@ud s=@ud t=json] :: message send
|
||||
[%apr p=term q=ship r=@ud s=@ud] :: response pull
|
||||
[%aps p=term q=ship r=@ud s=term t=path] :: subscribe
|
||||
[%apu p=term q=ship r=@ud s=term] :: unsubscribe
|
||||
[%cog p=@ud q=@ud] :: console get
|
||||
[%con p=@ud] :: console face
|
||||
[%cop p=@ud q=@ud r=json] :: console put
|
||||
@ -118,12 +123,22 @@
|
||||
[%fun p=term q=tube r=(list manx)] :: functional
|
||||
[%lon p=seal] :: authentication flow
|
||||
[%red p=purl] :: redirect
|
||||
[%sil p=@ud q=silk] :: status and silk
|
||||
== ::
|
||||
++ serf :: local server
|
||||
$: pef=@t :: server prefix
|
||||
wup=(map hole cyst) :: secure sessions
|
||||
cah=(map cash vase) :: compilation cache
|
||||
== ::
|
||||
++ sink :: page push system
|
||||
$: haw=(map term swig) :: subscriptions
|
||||
== ::
|
||||
++ swig :: update channel
|
||||
$: cnt=@ud :: updates produced
|
||||
toy=@ud :: updates sent
|
||||
wan=(map ,@ud ,@ud) :: upno to reqno
|
||||
red=(map ,@ud (each cage cage)) :: ready for pickup
|
||||
== ::
|
||||
-- ::
|
||||
|%
|
||||
++ coss :: cookie search
|
||||
@ -140,6 +155,13 @@
|
||||
?~ u.mar ^$(cok t.cok)
|
||||
?:(=(nam p.i.u.mar) [~ q.i.u.mar] $(u.mar t.u.mar))
|
||||
::
|
||||
++ ecce :: JS from moth
|
||||
|= moh=moth
|
||||
^- (unit json)
|
||||
?. =([~ 'text/json' ~] (~(get by q.moh) 'content-type')) ~
|
||||
?~ r.moh ~
|
||||
`(unit json)`(rush q.u.r.moh apex:poja)
|
||||
::
|
||||
++ ecco :: eat headers
|
||||
|= hed=(list ,[p=@t q=@t])
|
||||
=+ mah=*math
|
||||
@ -231,11 +253,6 @@
|
||||
|= [tea=wire sin=sign]
|
||||
^+ +>
|
||||
?- -.sin
|
||||
%boot
|
||||
?> ?=([%hova @ @ @ ~] tea)
|
||||
%- goja
|
||||
[(need (slaw %p i.t.tea)) i.t.t.tea (need (slaw %ud i.t.t.t.tea)) +.sin]
|
||||
::
|
||||
%crud
|
||||
+>.$(mow [[hen %slip %d %flog sin] mow])
|
||||
::
|
||||
@ -245,10 +262,14 @@
|
||||
%- 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]
|
||||
?(%rush %rust)
|
||||
=+ heq=?:(?=(%rust -.sin) [%& q.sin] [%| q.sin])
|
||||
?> ?=([%hoop @ @ @ @ ~] tea)
|
||||
=+ ^= yoo
|
||||
%- need
|
||||
%- yolk:(gale (need (slaw %p i.t.tea)) i.t.t.tea)
|
||||
(need (slaw %ui i.t.t.t.tea))
|
||||
abet:work:abet:abet:(hear:(yule:yoo i.t.t.t.t.tea) heq)
|
||||
::
|
||||
%thou :: remote return
|
||||
?> ?=([@ @ *] tea)
|
||||
@ -368,6 +389,12 @@
|
||||
^- httr
|
||||
[sas ~[content-type/'text/plain'] [~ (tact str)]]
|
||||
::
|
||||
++ gale :: ya from response
|
||||
|= [our=ship ses=hole]
|
||||
=+ sef=(need (~(get by own) our))
|
||||
=+ cyz=(need (~(get by wup.sef) ses))
|
||||
~(. ya [our ses] sef cyz)
|
||||
::
|
||||
++ galt
|
||||
|= [our=ship ses=hole num=@ud mez=(each bead (list tank))]
|
||||
^+ +>
|
||||
@ -385,22 +412,6 @@
|
||||
?~ cuz +>.$
|
||||
abet:work:(~(dodo ya [our ses] u.suf u.cuz) num sin)
|
||||
::
|
||||
++ goja :: app result
|
||||
|= [our=ship ses=hole num=@ud tik=@ud]
|
||||
=+ suf=(~(get by own) our)
|
||||
?~ suf +>.$
|
||||
=+ cuz=(~(get by wup.u.suf) ses)
|
||||
?~ cuz +>.$
|
||||
abet:work:(~(doja ya [our ses] u.suf u.cuz) num tik)
|
||||
::
|
||||
++ gojo :: app result
|
||||
|= [our=ship ses=hole num=@ud cup=chop 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 cup cay)
|
||||
::
|
||||
++ gosh :: receive %pr response
|
||||
|= [him=ship num=@ud har=httr]
|
||||
^+ +>
|
||||
@ -514,26 +525,6 @@
|
||||
[%want [sor.rot him] [%q %pr %e %hork mun ~] ~]
|
||||
==
|
||||
::
|
||||
++ hova :: app wait
|
||||
|= [our=ship num=@ud ses=hole app=term tik=@ud]
|
||||
%_ +>
|
||||
mow
|
||||
:_ mow
|
||||
:^ hen %toss %g
|
||||
:- [%hova (scot %p our) ses (scot %ud num) ~]
|
||||
[%wait [our app] tik]
|
||||
==
|
||||
::
|
||||
++ hove :: app peek
|
||||
|= [our=ship num=@ud ses=hole app=term pax=path]
|
||||
%_ +>
|
||||
mow
|
||||
:_ mow
|
||||
:^ hen %toss %g
|
||||
:- [%hove (scot %p our) ses (scot %ud num) ~]
|
||||
[%show [our app] `[%| pax]]
|
||||
==
|
||||
::
|
||||
++ hork :: remote request
|
||||
|= [him=ship hyx=httx]
|
||||
^+ +>
|
||||
@ -692,6 +683,8 @@
|
||||
'; Path=/; HttpOnly'
|
||||
::
|
||||
now
|
||||
~
|
||||
~
|
||||
[1 ~]
|
||||
==
|
||||
abet:work:(~(into ya [our p.saw] sef q.saw) pul moh)
|
||||
@ -921,41 +914,6 @@
|
||||
=. cow (~(put by cow) con cal)
|
||||
?~(yov +>.$ (dove ~[%a (jone ono.cal) (jone ino.cal) jon] yov))
|
||||
::
|
||||
++ dojo :: app view
|
||||
|= [num=@ud cup=chop cay=cage]
|
||||
^+ +>
|
||||
=+ pup=(~(get by q.rey) num)
|
||||
?~ pup ~&([%dojo-lost ses num] +>.$)
|
||||
?> ?=(%way pez.u.pup)
|
||||
?> ?=(%apg -.som.u.pup)
|
||||
=. q.rey
|
||||
%+ ~(put by q.rey)
|
||||
num
|
||||
%= u.pup
|
||||
sip
|
||||
:_ sip.u.pup
|
||||
%- dute
|
||||
^- path
|
||||
:~ (rsh 3 1 (scot %p our))
|
||||
%gez
|
||||
p.som.u.pup
|
||||
(scot %ud +(p.cup))
|
||||
==
|
||||
==
|
||||
=+ 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))
|
||||
::
|
||||
++ doja :: app reboot
|
||||
|= [num=@ud tik=@ud]
|
||||
^+ +>
|
||||
=+ pup=(~(get by q.rey) num)
|
||||
?~ pup
|
||||
~& [%doja-lost ses num tik]
|
||||
+>.$
|
||||
?> ?=(%way pez.u.pup)
|
||||
+>.$(q.rey (~(put by q.rey) num u.pup(pez [%fin %mid /text/plain *octs])))
|
||||
::
|
||||
++ iota :: fun change response
|
||||
|= [num=@ud rot=riot]
|
||||
^+ +>
|
||||
@ -977,7 +935,7 @@
|
||||
?> ?=(%way pez.u.pup)
|
||||
$(yov t.yov, q.rey (~(put by q.rey) i.yov u.pup(pez noz)))
|
||||
::
|
||||
++ dute :: reload script
|
||||
++ duty :: reload script
|
||||
|= pax=path
|
||||
=- =+ cal=:/("path=\"{<pax>}\"")
|
||||
[-.sac [cal +.sac]]
|
||||
@ -1005,19 +963,86 @@
|
||||
; call();
|
||||
==
|
||||
::
|
||||
++ fape
|
||||
|= [fur=(unit term) paw=path]
|
||||
++ fape :: dispatch %ape
|
||||
|= [fur=(unit term) you=@p paw=path]
|
||||
^- (unit seam)
|
||||
?> ?=(~ fur)
|
||||
?> ?=([@ @ ~] paw)
|
||||
`[%ape i.paw (need (slaw %ud i.t.paw))]
|
||||
?> ?=([@ @ @ @ ~] paw)
|
||||
:- ~
|
||||
:* %ape
|
||||
(need ((sand %tas) i.paw))
|
||||
you
|
||||
(need (slaw %ui i.t.paw))
|
||||
(need ((sand %tas) i.t.t.paw))
|
||||
(need (slaw %ui i.t.t.t.paw))
|
||||
==
|
||||
::
|
||||
++ fapp :: dispatch app
|
||||
|= [fur=(unit term) paw=path]
|
||||
++ fapg :: dispatch %apg
|
||||
|= [fur=(unit term) you=@p paw=path]
|
||||
^- (unit seam)
|
||||
?> ?=(^ fur)
|
||||
?> ?=(^ paw)
|
||||
`[%apg i.paw u.fur t.paw]
|
||||
:- ~
|
||||
:* %apg
|
||||
(need ((sand %tas) i.paw))
|
||||
you
|
||||
u.fur
|
||||
(turn t.paw |=(a=@ `@ta`(need ((sand %ta) a))))
|
||||
==
|
||||
::
|
||||
++ fapm :: dispatch %apm
|
||||
|= [fur=(unit term) you=@p paw=path moh=moth]
|
||||
^- (unit seam)
|
||||
?> ?=(~ fur)
|
||||
?> ?=([@ @ @ ~] paw)
|
||||
:- ~
|
||||
:* %apm
|
||||
(need ((sand %tas) i.paw))
|
||||
you
|
||||
(need (slaw %ui i.t.paw))
|
||||
(need (slaw %ui i.t.t.paw))
|
||||
(need (ecce moh))
|
||||
==
|
||||
::
|
||||
++ fapr :: dispatch %apr
|
||||
|= [fur=(unit term) you=@p paw=path]
|
||||
^- (unit seam)
|
||||
?> ?=(~ fur)
|
||||
?> ?=([@ @ @ ~] paw)
|
||||
:- ~
|
||||
:* %apr
|
||||
(need ((sand %tas) i.paw))
|
||||
you
|
||||
(need (slaw %ui i.t.paw))
|
||||
(need (slaw %ui i.t.t.paw))
|
||||
==
|
||||
::
|
||||
++ faps :: dispatch %aps
|
||||
|= [fur=(unit term) you=@p paw=path moh=moth]
|
||||
^- (unit seam)
|
||||
?> ?=(~ fur)
|
||||
?> ?=([@ @ @ *] paw)
|
||||
:- ~
|
||||
:* %aps
|
||||
(need ((sand %tas) i.paw))
|
||||
you
|
||||
(need (slaw %ud i.t.paw))
|
||||
(need ((sand %tas) i.t.t.paw))
|
||||
(turn t.t.t.paw |=(a=@ `@ta`(need ((sand %ta) a))))
|
||||
==
|
||||
::
|
||||
++ fapu :: dispatch %apu
|
||||
|= [fur=(unit term) you=@p paw=path]
|
||||
^- (unit seam)
|
||||
?> ?=(~ fur)
|
||||
?> ?=([@ @ @ ~] paw)
|
||||
:- ~
|
||||
:* %apu
|
||||
(need ((sand %tas) i.paw))
|
||||
you
|
||||
(need (slaw %ud i.t.paw))
|
||||
(need ((sand %tas) i.t.t.paw))
|
||||
==
|
||||
::
|
||||
++ flea :: permissive decimal
|
||||
|= txt=@t
|
||||
@ -1204,7 +1229,7 @@
|
||||
^- (unit seam)
|
||||
?~ q.q.pul ~
|
||||
=* nep i.q.q.pul
|
||||
=* paw t.q.q.pul
|
||||
=+ paw=t.q.q.pul
|
||||
=+ [one=(end 3 1 nep) two=(cut 3 [1 1] nep) tri=(cut 3 [2 1] nep)]
|
||||
?. ?& ?- p.moh
|
||||
%conn | :: connect
|
||||
@ -1224,13 +1249,17 @@
|
||||
%o p.p.pul :: identified
|
||||
==
|
||||
::
|
||||
?= $? %p :: application
|
||||
?= $? %g :: app get
|
||||
%c :: console
|
||||
%e :: app update
|
||||
%f :: functional
|
||||
%v :: functional version
|
||||
%l :: local login
|
||||
%m :: remote login
|
||||
%m :: app message
|
||||
%r :: app response
|
||||
%s :: app subscribe
|
||||
%n :: now
|
||||
%u :: app unsubscribe
|
||||
%z :: app version
|
||||
==
|
||||
tri
|
||||
@ -1239,10 +1268,17 @@
|
||||
=(3 (met 3 nep))
|
||||
==
|
||||
~
|
||||
?: &(=(%i two) =(~ aut.ced))
|
||||
(holt ~ pul)
|
||||
?: &(=(%o two) !(~(has ju aut.ced) %$ (scot %p our)))
|
||||
(holt [~ our] pul)
|
||||
=^ yun paw
|
||||
?+ two ~
|
||||
?(%e %u) [`@`(shaf %fake ses) paw]
|
||||
%i ?~ paw ~
|
||||
[(need (slaw %p i.paw)) t.paw]
|
||||
%o [our paw]
|
||||
==
|
||||
:: ?: &(=(%i two) =(~ aut.ced))
|
||||
:: (holt ~ pul)
|
||||
:: ?: &(=(%o two) !(~(has ju aut.ced) %$ (scot %p our)))
|
||||
:: (holt [~ our] pul)
|
||||
?+ one ~
|
||||
%g
|
||||
?+ tri ~
|
||||
@ -1250,13 +1286,17 @@
|
||||
%v (foin p.q.pul paw r.pul)
|
||||
%c (flub paw ~)
|
||||
%l (fool r.pul)
|
||||
%p (fapp p.q.pul paw)
|
||||
%z (fape p.q.pul paw)
|
||||
%g (fapg p.q.pul yun paw)
|
||||
%r (fapr p.q.pul yun paw)
|
||||
%e (fape p.q.pul yun paw)
|
||||
==
|
||||
::
|
||||
%p
|
||||
?+ tri ~
|
||||
%l (foom moh)
|
||||
%m (fapm p.q.pul yun paw moh)
|
||||
%s (faps p.q.pul yun paw moh)
|
||||
%u (fapu p.q.pul yun paw)
|
||||
==
|
||||
::
|
||||
%t
|
||||
@ -1278,6 +1318,56 @@
|
||||
+>.$(..ya (hone our num ses))
|
||||
+>.$
|
||||
::
|
||||
++ busc :: seam result code
|
||||
|= som=seam
|
||||
^- @ud
|
||||
?.(?=(%sil -.som) 200 p.som) :: 203 means a diff
|
||||
::
|
||||
++ bush :: seam logo
|
||||
|= som=seam
|
||||
^- (unit logo)
|
||||
?+ -.som ~
|
||||
%ape `%json
|
||||
%apg `r.som
|
||||
%apr `%json
|
||||
%fun `p.som
|
||||
==
|
||||
::
|
||||
++ busk :: seam result
|
||||
|= [num=@ud heq=(each cage cage)]
|
||||
=+ pip=(need (~(get by q.rey) num))
|
||||
?> ?=(%way pez.pip)
|
||||
%= +>.$
|
||||
q.rey
|
||||
%+ ~(put by q.rey) num
|
||||
^- pimp
|
||||
%= pip
|
||||
pez %new
|
||||
som
|
||||
^- seam
|
||||
:+ %sil
|
||||
?:(-.heq 200 203)
|
||||
=+ lug=(bush som.pip)
|
||||
=+ bek=`beak`[our %main [%da now]]
|
||||
=+ don=`silk`[%done ~ `cage`p.heq]
|
||||
^- silk
|
||||
:^ %cast %mime bek
|
||||
?~ lug don
|
||||
`silk`[%cast u.lug bek don]
|
||||
==
|
||||
==
|
||||
::
|
||||
++ bust
|
||||
|= num=@ud
|
||||
=+ pip=(need (~(get by q.rey) num))
|
||||
?> ?=(%way pez.pip)
|
||||
%= +>.$
|
||||
q.rey
|
||||
%+ ~(put by q.rey) num
|
||||
pip(pez [%fin %raw 204 *mess `*octs])
|
||||
==
|
||||
|
||||
::
|
||||
++ inch :: function built
|
||||
|= [num=@ud mez=(each bead (list tank))]
|
||||
^+ +>
|
||||
@ -1341,18 +1431,35 @@
|
||||
%way [[~ pip] +>.$]
|
||||
%new
|
||||
?- -.som.pip
|
||||
%ape
|
||||
%ape :: stream update
|
||||
~& [%wink-ape +.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
+>.$(..ya (hova our num ses p.som.pip q.som.pip))
|
||||
(yoke num +.som.pip)
|
||||
::
|
||||
%apg :: simple get
|
||||
~& [%wink-apg +.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
+>.$(..ya (hove our num ses p.som.pip r.som.pip))
|
||||
(yokg num p.som.pip q.som.pip s.som.pip)
|
||||
::
|
||||
%apl !!
|
||||
%apm !!
|
||||
%aps !!
|
||||
%apu !!
|
||||
%apm :: message
|
||||
~& [%wink-apm +.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
(yokm num +.som.pip)
|
||||
::
|
||||
%apr :: response
|
||||
~& [%wink-apr +.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
(yokr num +.som.pip)
|
||||
::
|
||||
%aps :: subscribe
|
||||
~& [%wink-aps +.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
(yoks num +.som.pip)
|
||||
::
|
||||
%apu :: unsubscribe
|
||||
~& [%wink-apu +.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
(yoku num +.som.pip)
|
||||
::
|
||||
%con
|
||||
:_ +>.$
|
||||
@ -1677,6 +1784,10 @@
|
||||
[%location (crip (earn p.som.pip))]~
|
||||
~
|
||||
==
|
||||
::
|
||||
%sil
|
||||
:- [~ pip(pez %way)]
|
||||
+>.$(..ya (honk our num ses q.som.pip))
|
||||
==
|
||||
::
|
||||
[%err *]
|
||||
@ -1732,6 +1843,122 @@
|
||||
=+ sez=step
|
||||
?: =(rey.sez rey) sez
|
||||
$(+ sez)
|
||||
::
|
||||
++ yoke :: long poll
|
||||
|= [num=@ud app=term you=ship nap=@ud suc=term cnt=@ud]
|
||||
^+ +>
|
||||
=+ yon=(yolk nap)
|
||||
?~ yon (bust num)
|
||||
abet:abet:(hire:(yule:u.yon suc) cnt num)
|
||||
::
|
||||
++ yokg :: main call
|
||||
|= [num=@ud app=term you=ship pax=path]
|
||||
^+ +>
|
||||
=+ nup=(~(get by kog) [app you])
|
||||
=. +>.$ ?~(nup +>.$ abet:burn:(need (yolk u.nup)))
|
||||
abet:(~(self yo num app you *sink) pax)
|
||||
::
|
||||
++ yokm :: message
|
||||
|= [num=@ud app=term you=ship nap=@ud cnt=@ud jon=json]
|
||||
!!
|
||||
::
|
||||
++ yokr :: response pull
|
||||
|= [num=@ud app=term you=ship nap=@ud cnt=@ud]
|
||||
!!
|
||||
::
|
||||
++ yoks :: subscribe
|
||||
|= [num=@ud app=term you=ship nap=@ud suc=term pax=path]
|
||||
!!
|
||||
::
|
||||
++ yoku :: unsubscribe
|
||||
|= [num=@ud app=term you=ship nap=@ud suc=term]
|
||||
!!
|
||||
::
|
||||
++ yolk :: yo by instance
|
||||
|= nap=@ud
|
||||
=+ suy=(~(get by sok) nap)
|
||||
?~ suy ~
|
||||
(some ~(. yo nap u.suy))
|
||||
::
|
||||
++ yo :: app instance
|
||||
|_ $: nap=@ud :: instance number
|
||||
app=term :: application name
|
||||
you=ship :: client identity
|
||||
siq=sink :: instance state
|
||||
==
|
||||
++ abet :: resolve
|
||||
%_ ..yo
|
||||
kog (~(put by kog) [app you] nap)
|
||||
sok (~(put by sok) nap [app you siq])
|
||||
==
|
||||
::
|
||||
++ burn :: cancel all subs
|
||||
^+ .
|
||||
~& [%eyre-yo-burn our app you nap]
|
||||
. :: XX
|
||||
::
|
||||
++ hoop :: request path
|
||||
|= suc=term
|
||||
^- path
|
||||
:~ %hoop
|
||||
(scot %p our)
|
||||
ses
|
||||
(scot %ui nap)
|
||||
suc
|
||||
==
|
||||
::
|
||||
++ self :: request main
|
||||
|= pax=path
|
||||
^+ +>
|
||||
abet:(hire:(yule:(toss %self [%show [our app] you pax]) %self) 0 nap)
|
||||
::
|
||||
++ toss :: toss to gall
|
||||
|= [suc=term noh=note]
|
||||
^+ +>
|
||||
+>(mow [[hen %toss %g (hoop suc) noh] mow])
|
||||
::
|
||||
++ yule :: swig state
|
||||
|= suc=term
|
||||
~(. yu suc =+(wig=(~(get by haw.siq) suc) ?~(wig *swig u.wig)))
|
||||
::
|
||||
++ yu :: swig state
|
||||
|_ [suc=term wig=swig]
|
||||
++ abet :: resolve
|
||||
%_(..yu haw.siq (~(put by haw.siq) suc wig))
|
||||
::
|
||||
++ hear :: produce
|
||||
|= heq=(each cage cage)
|
||||
^+ +>
|
||||
=+ dul=(~(get by wan.wig) cnt.wig)
|
||||
=. wan.wig ?~(dul wan.wig (~(del by wan.wig) cnt.wig))
|
||||
%= +>.$
|
||||
cnt.wig +(cnt.wig)
|
||||
red.wig (~(put by red.wig) cnt.wig heq)
|
||||
..yo ?~(dul ..yo (busk u.dul heq))
|
||||
==
|
||||
::
|
||||
++ hire :: consume
|
||||
|= [cnt=@ud num=@ud]
|
||||
^+ +>
|
||||
=+ ^= yut ^- (unit ,?)
|
||||
?: =(toy.wig cnt) `&
|
||||
?: =(+(toy.wig) cnt) `|
|
||||
~
|
||||
?~ yut +>.$(..yo (bust num))
|
||||
=. +>.$ ?: u.yut +>.$
|
||||
%= +>.$
|
||||
toy.wig +(toy.wig)
|
||||
red.wig (~(del by red.wig) toy.wig)
|
||||
==
|
||||
?: (gte cnt cnt.wig)
|
||||
~& [%hire-ahead nap cnt cnt.wig]
|
||||
=+ old=(~(get by wan.wig) cnt)
|
||||
=. wan.wig (~(put by wan.wig) cnt num)
|
||||
+>.$(..yo ?~(old ..yo (bust u.old)))
|
||||
=+ rud=(~(get by red.wig) cnt)
|
||||
+>.$(..yo ?~(rud (bust num) (busk num u.rud)))
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
|
@ -15,6 +15,11 @@
|
||||
++ note :: out request $->
|
||||
$% [%warp p=sock q=riff] :: to %clay
|
||||
== ::
|
||||
++ rave :: see %clay
|
||||
$% [& p=mood] :: single request
|
||||
[| p=moat] :: change range
|
||||
== ::
|
||||
++ riff ,[p=desk q=(unit rave)] :: see %clay
|
||||
++ sign :: in result $-<
|
||||
$% [%writ p=riot] :: by %clay
|
||||
== ::
|
||||
|
145
arvo/gall.hoon
145
arvo/gall.hoon
@ -12,43 +12,42 @@
|
||||
++ chop ,[p=@ud q=@da] :: revision/date
|
||||
++ gift :: out result <-$
|
||||
$% [%back p=?] :: %mess ack good/bad
|
||||
[%boot p=@ud] :: response to %wait
|
||||
[%crud p=@tas q=(list tank)] :: error
|
||||
[%done ~] :: reset duct
|
||||
[%rasp p=cage] :: reaction message
|
||||
[%rush p=chop q=cage] :: difference
|
||||
[%rust p=chop q=cage] :: full update
|
||||
[%meta p=vase] :: meta-gift
|
||||
== ::
|
||||
++ hasp ,[p=ship q=term] :: app identity
|
||||
++ hope (pair ,? path) :: view/subscribe
|
||||
++ kiss :: in request ->$
|
||||
$% [%show p=hasp q=(unit hope)] :: urb subscribe/cancel
|
||||
$% [%show p=hasp q=ship r=path] :: subscribe
|
||||
[%cuff p=(unit cuff) q=kiss] :: controlled kiss
|
||||
[%mess p=hasp q=cage] :: message
|
||||
[%nuke p=hasp] :: reset this duct
|
||||
[%show p=hasp q=(unit hope)] :: web subscribe/cancel
|
||||
[%wait p=hasp q=@ud] :: await tick
|
||||
[%mess p=hasp q=ship r=cage] :: message
|
||||
[%shut p=hasp q=ship] :: unsubscribe
|
||||
== ::
|
||||
++ knob :: pending action
|
||||
$% [%boot ~] :: boot/reboot
|
||||
[%crud p=@tas q=(list tank)] :: error
|
||||
[%mess p=cage] :: message
|
||||
[%nuke ~] :: destroy duct
|
||||
[%show p=(unit hope)] :: subscribe/cancel
|
||||
[%mess p=ship q=cage] :: message
|
||||
[%show p=ship q=path] :: subscribe
|
||||
[%shut p=ship] :: unsubscribe
|
||||
[%take p=path q=vase] :: user result
|
||||
[%wait p=@ud] :: await tick
|
||||
== ::
|
||||
++ mast :: apps by ship
|
||||
$: bum=(map ,@ta seat) :: apps by name
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: typed move
|
||||
++ note :: out request $->
|
||||
$% [%exec p=@p q=(unit silk)] :: to %ford
|
||||
$% [%exec p=@p q=(unit silk)] :: see %ford
|
||||
[%meta p=vase] :: meta-note
|
||||
[%warp p=sock q=riff] :: to %clay
|
||||
[%warp p=sock q=riff] :: see %clay
|
||||
== ::
|
||||
++ rapt |*(a=$+(* *) (qual path path ,@da a)) :: versioned result
|
||||
++ rave :: see %clay
|
||||
$% [& p=mood] :: single request
|
||||
[| p=moat] :: change range
|
||||
== ::
|
||||
++ riff ,[p=desk q=(unit rave)] :: see %clay
|
||||
++ scar :: opaque duct system
|
||||
$: p=@ud :: bone sequence
|
||||
q=(map duct ,[p=bone q=(unit cuff)]) :: by duct
|
||||
@ -60,8 +59,8 @@
|
||||
vey=(qeu toil) :: pending projects
|
||||
tik=@ud :: build number
|
||||
orm=(unit ,@da) :: build date
|
||||
med=(map ,@ud (list duct)) :: waiters
|
||||
ped=(set (pair ship desk)) :: dependencies
|
||||
sup=(map duct (pair ship path)) :: subscribers
|
||||
ped=(set (pair ship desk)) :: active depends
|
||||
zam=scar :: opaque ducts
|
||||
== ::
|
||||
++ sign :: in result $-<
|
||||
@ -134,15 +133,7 @@
|
||||
|% :: vane interface
|
||||
++ call :: handle request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
=> %= . :: XX temporary
|
||||
q.hic
|
||||
^- kiss
|
||||
?: ?=(%soft -.q.hic)
|
||||
((hard kiss) p.q.hic)
|
||||
?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
|
||||
~& [%gall-call-flub (,@tas `*`-.q.hic)]
|
||||
((hard kiss) q.hic)
|
||||
==
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
|- ^- [p=(list move) q=_..^^$]
|
||||
=+ =| law=(unit cuff)
|
||||
|- ^- $: law=(unit cuff)
|
||||
@ -151,22 +142,14 @@
|
||||
==
|
||||
?- -.q.hic
|
||||
%cuff $(q.hic q.q.hic, law (limp p.q.hic law))
|
||||
%mess [law p.q.hic %mess q.q.hic]
|
||||
%show [law p.q.hic %show q.q.hic]
|
||||
%nuke [law p.q.hic %nuke ~]
|
||||
%wait [law p.q.hic %wait q.q.hic]
|
||||
%mess [law p.q.hic %mess q.q.hic r.q.hic]
|
||||
%show [law p.q.hic %show q.q.hic r.q.hic]
|
||||
%shut [law p.q.hic %shut q.q.hic]
|
||||
==
|
||||
abet:work:(quem:(boar:(goat hap) hen law) kon)
|
||||
::
|
||||
++ take :: accept response
|
||||
|= [pax=path hen=duct hin=(hypo sign)] ::
|
||||
=> %= . :: XX temporary
|
||||
q.hin
|
||||
^- sign
|
||||
?: (~(nest ut -:!>(*sign)) | p.hin) q.hin
|
||||
~& [%gall-take-flub (,@tas `*`-.q.hin)]
|
||||
((hard sign) q.hin)
|
||||
==
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ lum=(lump pax)
|
||||
=< abet =< work
|
||||
@ -325,7 +308,7 @@
|
||||
++ abet [(flop mow) ^abet] :: resolve
|
||||
++ apex
|
||||
^+ .
|
||||
?. &(=(~ huv.sat) =(~ qic.sat) =(~ vey.sat)) .
|
||||
?. &(=(~ huv.sat) =(~ qic.sat) =(~ vey.sat) =(~ ped.sat)) .
|
||||
%_(. vey.sat (~(put to vey.sat) hen [%boot ~]))
|
||||
::
|
||||
++ bing :: reset to duct
|
||||
@ -358,20 +341,19 @@
|
||||
++ deal :: advance tick
|
||||
^+ .
|
||||
=. tik.sat +(tik.sat)
|
||||
=+ dyq=(dear tik.sat)
|
||||
=+ pys=(~(tap by sup.sat) ~)
|
||||
|- ^+ +>.$
|
||||
?~ dyq +>.$(med.sat (~(del by med.sat) tik.sat))
|
||||
=. +>.$ $(dyq t.dyq)
|
||||
(give(hen i.dyq) %boot tik.sat)
|
||||
::
|
||||
++ dear :: waiters
|
||||
|= tik=@ud
|
||||
^- (list duct)
|
||||
=+ dyq=(~(get by med.sat) tik.sat)
|
||||
?~(dyq ~ u.dyq)
|
||||
?~ pys +>.$
|
||||
=. +>.$ $(pys t.pys)
|
||||
%= +>.$
|
||||
vey.sat
|
||||
(~(put to vey.sat) [p.i.pys [%show q.i.pys]])
|
||||
==
|
||||
::
|
||||
++ drug :: set dependencies
|
||||
|= pen=(set (pair ship desk))
|
||||
:: ~& [%drug %pen pen]
|
||||
:: ~& [%drug %ped ped.sat]
|
||||
^+ +>
|
||||
=+ ^= new ^- (list move)
|
||||
%+ turn
|
||||
@ -379,7 +361,7 @@
|
||||
|=(a=(pair ship desk) (~(has in ped.sat) a))
|
||||
|= a=(pair ship desk)
|
||||
:- hen
|
||||
:^ %toss %c (away %s %drug ~)
|
||||
:^ %toss %c (away %s %drug (scot %p p.a) q.a ~)
|
||||
[%warp [our p.a] q.a ~ %| [%da now] [%da (add now ~d1000)]]
|
||||
=+ ^= old ^- (list move)
|
||||
%+ turn
|
||||
@ -387,7 +369,7 @@
|
||||
|=(a=(pair ship desk) (~(has in pen) a))
|
||||
|= a=(pair ship desk)
|
||||
:- hen
|
||||
:^ %toss %c (away %s %drug ~)
|
||||
:^ %toss %c (away %s %drug (scot %p p.a) q.a ~)
|
||||
[%warp [our p.a] q.a ~]
|
||||
%_(+>.$ ped.sat pen, mow :(weld new old mow))
|
||||
::
|
||||
@ -445,10 +427,7 @@
|
||||
%- ~(put to vey.sat)
|
||||
[hen [%take t.pax (spec (slot 3 hin))]]
|
||||
==
|
||||
?. ?=([%s @ ~] pax)
|
||||
~& [%more-pax pax]
|
||||
!!
|
||||
?> ?=([%s @ ~] pax)
|
||||
?> ?=([%s @ *] pax)
|
||||
?+ i.t.pax !!
|
||||
%boot
|
||||
?> ?=([~ * %boot ~] qic.sat)
|
||||
@ -457,12 +436,18 @@
|
||||
& :: ~& %boot-good
|
||||
deal:(drum:(morn:gone q.q.p.p.q.hin) p.p.p.q.hin)
|
||||
| :: ~& %boot-lost
|
||||
(mort p.p.q.hin)
|
||||
(drum:(mort:gone p.p.q.hin) ~)
|
||||
==
|
||||
::
|
||||
%drug
|
||||
?> ?=(%writ -.q.hin)
|
||||
?~ p.q.hin +>.$
|
||||
?> ?=([@ @ ~] t.t.pax)
|
||||
=+ :* our=(need (slaw %p i.t.t.pax))
|
||||
syd=(need ((sand %tas) i.t.t.t.pax))
|
||||
==
|
||||
=. ped.sat (~(del by ped.sat) [our syd])
|
||||
?~ p.q.hin
|
||||
+>.$
|
||||
+>.$(vey.sat (~(put to vey.sat) hen %boot ~))
|
||||
::
|
||||
%step
|
||||
@ -474,19 +459,28 @@
|
||||
| :: ~& %step-fail
|
||||
(give %crud %made p.p.q.hin)
|
||||
==
|
||||
::
|
||||
%show
|
||||
?> ?=(%made -.q.hin)
|
||||
?- -.p.q.hin
|
||||
& :: ~& %step-good
|
||||
%- obey:(morn:gone (slot 3 q.q.p.p.q.hin))
|
||||
(slot 2 q.q.p.p.q.hin)
|
||||
| :: ~& %step-fail
|
||||
(give %crud %made p.p.q.hin)
|
||||
==
|
||||
==
|
||||
::
|
||||
++ morn :: successful boot
|
||||
|= vax=vase
|
||||
^+ +>
|
||||
:: =. +> (give [%boot ~])
|
||||
%_(+> huv.sat `vax)
|
||||
::
|
||||
++ mort :: failed boot
|
||||
|= tan=(list tank)
|
||||
(give %crud %boot-lost tan)
|
||||
::
|
||||
++ nile [%done ~ [%$ [%atom %n] ~]] :: null silk
|
||||
++ nile [%done ~ [%$ [%cube 0 [%atom %n]] ~]] :: null silk
|
||||
++ obey :: process result
|
||||
|= vax=vase
|
||||
%_(+> mow (weld (flop (said vax)) mow))
|
||||
@ -494,11 +488,7 @@
|
||||
++ quem :: queue action
|
||||
|= kon=knob :: content
|
||||
^+ +>
|
||||
?. ?=(%wait -.kon)
|
||||
%_(+> vey.sat (~(put to vey.sat) hen kon))
|
||||
?: (lte p.kon tik.sat)
|
||||
(give %boot p.kon)
|
||||
%_(+>.$ med.sat (~(put by med.sat) p.kon [hen (dear p.kon)]))
|
||||
%_(+> vey.sat (~(put to vey.sat) hen kon))
|
||||
::
|
||||
++ said
|
||||
|= vud=vase
|
||||
@ -507,9 +497,12 @@
|
||||
[(sump (slot 2 vud)) $(vud (slot 3 vud))]
|
||||
::
|
||||
++ show :: subscribe
|
||||
|= hup=(unit hope) :: subscription
|
||||
^+ +>
|
||||
%_(+> vey.sat (~(put to vey.sat) hen %show hup))
|
||||
|= [you=ship pax=path] :: subscription
|
||||
%_(+> vey.sat (~(put to vey.sat) hen %show you pax))
|
||||
::
|
||||
++ shut :: unsubscribe
|
||||
|= you=ship
|
||||
%_(+> vey.sat (~(put to vey.sat) hen %shut you))
|
||||
::
|
||||
++ sumo :: standard gift
|
||||
|= vig=vase
|
||||
@ -566,7 +559,8 @@
|
||||
^- silk
|
||||
:+ %call
|
||||
(harm %prep home)
|
||||
?~ huv.sat nile
|
||||
?~ huv.sat
|
||||
nile
|
||||
[nile (harm %save (conf u.huv.sat))]
|
||||
::
|
||||
%crud
|
||||
@ -581,27 +575,24 @@
|
||||
~& [%mess-none our app]
|
||||
gone:(give %back |)
|
||||
%^ game [%step %poke] u.huv.sat
|
||||
:(slop [[%atom %ud] ost] !>((ride use say)) q.p.kon)
|
||||
::
|
||||
%nuke
|
||||
?~ huv.sat
|
||||
~& [%nuke-none our app]
|
||||
gone
|
||||
(game [%step %punk] u.huv.sat !>([ost ~]))
|
||||
:(slop [[%atom %ud] ost] !>((ride use say)) q.q.kon)
|
||||
::
|
||||
%show
|
||||
?~ huv.sat
|
||||
~& [%show-none our app]
|
||||
gone:(give %done ~)
|
||||
gone
|
||||
~& [%show p.kon q.kon]
|
||||
%^ game [%step %peer] u.huv.sat
|
||||
!>([ost use | p.kon])
|
||||
!>([ost p.kon q.kon])
|
||||
::
|
||||
%shut
|
||||
~& %yawn-shut
|
||||
!!
|
||||
::
|
||||
%take
|
||||
?> ?=(^ huv.sat)
|
||||
%^ game [%step %peck] u.huv.sat
|
||||
:(slop [[%atom %ud] ost] !>((ride use say)) !>(p.kon) q.kon)
|
||||
::
|
||||
%wait !! :: handled above
|
||||
==
|
||||
--
|
||||
--
|
||||
|
@ -248,6 +248,7 @@
|
||||
[%ktbr p=twig] :: %gold core to %iron
|
||||
[%ktdt p=twig q=twig] :: cast q to type (p q)
|
||||
[%ktls p=twig q=twig] :: cast q to p, verify
|
||||
[%kthx p=twig q=twig] :: cast q to p, verify
|
||||
[%kthp p=tile q=twig] :: cast q to icon of p
|
||||
[%ktpm p=twig] :: %gold core to %zinc
|
||||
[%ktsg p=twig] :: p as static constant
|
||||
@ -1647,6 +1648,22 @@
|
||||
$(a l.a)
|
||||
$(a r.a)
|
||||
::
|
||||
+- int :: intersection
|
||||
~/ %int
|
||||
|* b=_a
|
||||
|- ^+ a
|
||||
?~ b
|
||||
~
|
||||
?~ a
|
||||
~
|
||||
?. (vor n.a n.b)
|
||||
$(a b, b a)
|
||||
?: =(n.b n.a)
|
||||
[n.a $(a l.a, b l.b) $(a r.a, b r.b)]
|
||||
?: (hor n.b n.a)
|
||||
%- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
|
||||
%- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
|
||||
::
|
||||
+- put :: puts b in a, sorted
|
||||
~/ %put
|
||||
|* b=*
|
||||
@ -1681,6 +1698,26 @@
|
||||
b
|
||||
$(a r.a, b [n.a $(a l.a)])
|
||||
::
|
||||
+- uni :: union
|
||||
~/ %uni
|
||||
|* b=_a
|
||||
|- ^+ a
|
||||
?~ b
|
||||
a
|
||||
?~ a
|
||||
b
|
||||
?: (vor n.a n.b)
|
||||
?: =(n.b n.a)
|
||||
[n.b $(a l.a, b l.b) $(a r.a, b r.b)]
|
||||
?: (hor n.b n.a)
|
||||
$(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
|
||||
$(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
|
||||
?: =(n.a n.b)
|
||||
[n.b $(b l.b, a l.a) $(b r.b, a r.a)]
|
||||
?: (hor n.a n.b)
|
||||
$(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
|
||||
$(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
|
||||
::
|
||||
+- wyt :: depth of set
|
||||
.+
|
||||
|- ^- @
|
||||
@ -1722,7 +1759,7 @@
|
||||
^- ?
|
||||
(~(has in (get(+< a) b)) c)
|
||||
::
|
||||
+- put :: adds key-set pair
|
||||
+- put :: add key-set pair
|
||||
|* [b=* c=*]
|
||||
^+ a
|
||||
=+ d=(get(+< a) b)
|
||||
@ -1801,6 +1838,26 @@
|
||||
|* b=*
|
||||
!=(~ (get(+< a) b))
|
||||
::
|
||||
+- int :: intersection
|
||||
~/ %int
|
||||
|* b=_a
|
||||
|- ^+ a
|
||||
?~ b
|
||||
~
|
||||
?~ a
|
||||
~
|
||||
?: (vor p.n.a p.n.b)
|
||||
?: =(p.n.b p.n.a)
|
||||
[n.b $(a l.a, b l.b) $(a r.a, b r.b)]
|
||||
?: (hor p.n.b p.n.a)
|
||||
%- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b)
|
||||
%- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b)
|
||||
?: =(p.n.a p.n.b)
|
||||
[n.b $(b l.b, a l.a) $(b r.b, a r.a)]
|
||||
?: (hor p.n.a p.n.b)
|
||||
%- uni(+< $(b l.b, a [n.a l.a ~])) $(a r.a)
|
||||
%- uni(+< $(b r.b, a [n.a ~ r.a])) $(a l.a)
|
||||
::
|
||||
+- mar :: add with validation
|
||||
|* [b=_?>(?=(^ a) p.n.a) c=(unit ,_?>(?=(^ a) q.n.a))]
|
||||
?~ c
|
||||
@ -1859,14 +1916,25 @@
|
||||
b
|
||||
$(a r.a, b [n.a $(a l.a)])
|
||||
::
|
||||
+- uni :: union, merge
|
||||
+- uni :: union
|
||||
~/ %uni
|
||||
|= b=_a
|
||||
?~ b a
|
||||
%= $
|
||||
a (~(put by a) p.n.b q.n.b)
|
||||
b (~(uni by l.b) r.b)
|
||||
==
|
||||
|* b=_a
|
||||
|- ^+ a
|
||||
?~ b
|
||||
a
|
||||
?~ a
|
||||
b
|
||||
?: (vor p.n.a p.n.b)
|
||||
?: =(p.n.b p.n.a)
|
||||
[n.b $(a l.a, b l.b) $(a r.a, b r.b)]
|
||||
?: (hor p.n.b p.n.a)
|
||||
$(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b)
|
||||
$(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b)
|
||||
?: =(p.n.a p.n.b)
|
||||
[n.b $(b l.b, a l.a) $(b r.b, a r.a)]
|
||||
?: (hor p.n.a p.n.b)
|
||||
$(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a)
|
||||
$(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a)
|
||||
::
|
||||
+- wyt :: depth of map
|
||||
.+
|
||||
@ -5720,6 +5788,7 @@
|
||||
::
|
||||
++ slit
|
||||
|= [gat=type sam=type]
|
||||
?> (~(nest ut (~(peek ut gat) %free 6)) & sam)
|
||||
(~(play ut [%cell gat sam]) [%cncl [~ 2] [~ 3]])
|
||||
::
|
||||
++ slym
|
||||
@ -7310,8 +7379,12 @@
|
||||
::
|
||||
[%dtwt *] [(nice bool) [%3 q:$(gen p.gen, gol %noun)]]
|
||||
[%ktbr *] =+(vat=$(gen p.gen) [(wrap(sut p.vat) %iron) q.vat])
|
||||
::
|
||||
[%ktls *]
|
||||
=+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)])
|
||||
::
|
||||
[%kthx *]
|
||||
=+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)])
|
||||
::
|
||||
[%ktpm *] =+(vat=$(gen p.gen) [(wrap(sut p.vat) %zinc) q.vat])
|
||||
[%ktsg *]
|
||||
@ -7476,6 +7549,10 @@
|
||||
[%ktls *]
|
||||
=+ hif=[p=(nice (play p.gen)) q=(play(sut dox) p.gen)]
|
||||
=+($(gen q.gen, gol p.hif) hif)
|
||||
::
|
||||
[%kthx *]
|
||||
=+ hif=[p=(nice (play p.gen)) q=(play(sut dox) p.gen)]
|
||||
=+($(gen q.gen, gol p.hif) hif)
|
||||
::
|
||||
[%ktpm *]
|
||||
=+(vat=$(gen p.gen) [(wrap(sut p.vat) %zinc) (wrap(sut q.vat) %zinc)])
|
||||
@ -7825,6 +7902,7 @@
|
||||
[%dtts *] bool
|
||||
[%dtwt *] bool
|
||||
[%ktbr *] (wrap(sut $(gen p.gen)) %iron)
|
||||
[%kthx *] $(gen p.gen)
|
||||
[%ktls *] $(gen p.gen)
|
||||
[%ktpm *] (wrap(sut $(gen p.gen)) %zinc)
|
||||
[%ktsg *] $(gen p.gen)
|
||||
@ -8674,6 +8752,7 @@
|
||||
['.' (rune dot %ktdt expb)]
|
||||
['-' (rune hep %kthp expo)]
|
||||
['+' (rune lus %ktls expb)]
|
||||
['#' (rune hax %kthx expb)]
|
||||
['&' (rune pam %ktpm expa)]
|
||||
['~' (rune sig %ktsg expa)]
|
||||
['=' (rune tis %ktts expg)]
|
||||
@ -9125,7 +9204,7 @@
|
||||
++ hide :: computation state
|
||||
$: own=[p=ship q=@tas] :: static identity
|
||||
$= seq :: dynamic sequence
|
||||
$: but=@ud :: boot number
|
||||
$: tik=@ud :: boot number
|
||||
num=@ud :: action number
|
||||
eny=@ :: entropy
|
||||
lat=@da :: date of last tick
|
||||
|
@ -2023,22 +2023,6 @@
|
||||
raz=(map path race) :: statements inbound
|
||||
ryl=(map path rill) :: statements outbound
|
||||
== ::
|
||||
++ bein :: terminal control
|
||||
$: $: bul=@ud :: buffer length
|
||||
bus=@ud :: cursor in buffer
|
||||
but=(list ,@c) :: buffer text
|
||||
buy=prom :: input style
|
||||
== ::
|
||||
$: hiz=@ud :: history depth
|
||||
hux=path :: history path
|
||||
hym=(map ,@ud (list ,@c)) :: history overlay
|
||||
hyt=hist :: history object
|
||||
hyr=(unit (list ,@c)) :: history search
|
||||
== ::
|
||||
$: pol=@ud :: length of prompt
|
||||
pot=tape :: prompt text
|
||||
== ::
|
||||
== ::
|
||||
++ bead ,[p=(set beam) q=cage] :: computed result
|
||||
++ beam ,[[p=ship q=desk r=case] s=path] :: global name
|
||||
++ beak ,[p=ship q=desk r=case] :: garnish with beak
|
||||
@ -2049,30 +2033,6 @@
|
||||
lys=@da :: last sent
|
||||
pac=rock :: packet data
|
||||
== ::
|
||||
++ belt :: raw console input
|
||||
$% [%aro p=?(%d %l %r %u)] :: arrow key
|
||||
[%bac ~] :: true backspace
|
||||
[%ctl p=@ud] :: control-key
|
||||
[%del ~] :: true delete
|
||||
[%met p=@ud] :: meta-key
|
||||
[%ret ~] :: return
|
||||
[%txt p=(list ,@c)] :: utf32 text
|
||||
== ::
|
||||
++ blew ,[p=@ud q=@ud] :: columns rows
|
||||
++ blit :: raw console output
|
||||
$% [%bel ~] :: make a noise
|
||||
[%clr ~] :: clear the screen
|
||||
[%hop p=@ud] :: set cursor position
|
||||
[%lin p=(list ,@c)] :: set current line
|
||||
[%mor ~] :: newline
|
||||
[%sav p=path q=@] :: save to file
|
||||
== ::
|
||||
++ blot :: kill ring
|
||||
$: p=@ud :: length
|
||||
q=@ud :: depth
|
||||
r=(list (list ,@c)) :: kills
|
||||
== ::
|
||||
++ blur ,[p=@ud q=(unit bein) r=blot] :: columns, prompt
|
||||
++ boat ,[(list slip) tart] :: user stage
|
||||
++ boon :: fort output
|
||||
$% [%beer p=ship q=@uvG] :: gained ownership
|
||||
@ -2128,7 +2088,6 @@
|
||||
cip=(each ,@if ,@is) :: client IP
|
||||
cum=(map ,@tas ,*) :: custom dirt
|
||||
== ::
|
||||
++ cult (map duct rave) :: subscriptions
|
||||
++ cuff :: permissions
|
||||
$: p=(unit (set monk)) :: readers
|
||||
q=(set monk) :: authors
|
||||
@ -2141,7 +2100,6 @@
|
||||
hit=(list frog) :: changes in reverse
|
||||
lab=(map ,@tas ,@ud) :: labels
|
||||
== ::
|
||||
++ dojo ,[p=cult q=dome] :: domestic desk state
|
||||
++ door :: foreign contact
|
||||
$: wod=road :: connection to
|
||||
wyl=will :: inferred mirror
|
||||
@ -2388,10 +2346,6 @@
|
||||
bum=(map ,@ud ,%dead) ::
|
||||
mis=(map ,@ud ,[p=cape q=flap r=(unit)]) :: misordered
|
||||
== ::
|
||||
++ raft :: filesystem
|
||||
$: fat=(map ship room) :: domestic
|
||||
hoy=(map ship rung) :: foreign
|
||||
== ::
|
||||
++ rank ?(%czar %king %duke %earl %pawn) :: ship width class
|
||||
++ rant :: namespace binding
|
||||
$: p=[p=care q=case r=@tas] :: clade release book
|
||||
@ -2402,39 +2356,19 @@
|
||||
$% [& p=mood] :: single request
|
||||
[| p=moat] :: change range
|
||||
== ::
|
||||
++ rede :: universal project
|
||||
$: lim=@da :: complete to
|
||||
qyx=cult :: subscribers
|
||||
ref=(unit rind) :: outgoing requests
|
||||
dom=dome :: revision state
|
||||
== ::
|
||||
++ riff ,[p=desk q=(unit rave)] :: request/desist
|
||||
++ rill :: outbound stream
|
||||
$: sed=@ud :: sent
|
||||
san=(map ,@ud duct) :: outstanding
|
||||
== ::
|
||||
++ rind :: request manager
|
||||
$: nix=@ud :: request index
|
||||
bom=(map ,@ud ,[p=duct q=rave]) :: outstanding
|
||||
fod=(map duct ,@ud) :: current requests
|
||||
haw=(map mood (unit)) :: simple cache
|
||||
== ::
|
||||
++ riot (unit rant) :: response/complete
|
||||
++ road :: secured oneway route
|
||||
$: exp=@da :: expiration date
|
||||
lun=(unit lane) :: route to friend
|
||||
lew=will :: will of friend
|
||||
== ::
|
||||
++ room :: fs per ship (new)
|
||||
$: hun=duct :: terminal duct
|
||||
hez=(unit duct) :: sync duct
|
||||
dos=(map desk dojo) :: native desk
|
||||
== ::
|
||||
++ rock ,@uvO :: packet
|
||||
++ rout ,[p=(list host) q=path r=oryx s=path] :: http route (new)
|
||||
++ rump ,[p=care q=case r=@tas s=path] :: relative path
|
||||
++ rung $: rus=(map desk rede) :: neighbor desks
|
||||
== ::
|
||||
++ saba ,[p=ship q=@tas r=moar s=(list nori)] :: patch/merge
|
||||
++ sufi :: domestic host
|
||||
$: hoy=(list ship) :: hierarchy
|
||||
@ -2487,9 +2421,6 @@
|
||||
[%3 p=silk] :: build a %hoot
|
||||
== ::
|
||||
++ skit ,[p=(unit ,@ta) q=(list ,@ta) r=(list ,@ta)] :: tracking path
|
||||
++ sink :: incoming per server
|
||||
$: nes=(map flap ,[p=@da q=bait]) :: fragment actions
|
||||
== ::
|
||||
++ skin ?(%none %open %fast %full) :: encoding stem
|
||||
++ slip ,[p=path q=goal] :: traceable request
|
||||
++ snow ,[p=@ud q=@ud r=(set ,@ud)] :: window exceptions
|
||||
@ -2533,9 +2464,4 @@
|
||||
++ wund (list ,[p=life q=ring r=acru]) :: mace in action
|
||||
++ will (list deed) :: certificate
|
||||
++ worm ,* :: vase of tart
|
||||
++ yard :: terminal state
|
||||
$: p=? :: verbose
|
||||
q=blur :: display state
|
||||
r=(map path hist) :: history
|
||||
== ::
|
||||
--
|
||||
|
@ -7,15 +7,20 @@
|
||||
|= *
|
||||
|_ [hide foo=foobug-state]
|
||||
++ prep
|
||||
|= old=foobug-state
|
||||
+>(foo old)
|
||||
|= old=(unit foobug-state)
|
||||
?~ old +>
|
||||
+>(foo u.old)
|
||||
::
|
||||
++ save
|
||||
^- foobug-state
|
||||
foo
|
||||
::
|
||||
++ peer
|
||||
|= [ost=bone aud=kirk web=? hup=(unit (pair ,? path))]
|
||||
~& [%peer lat.seq]
|
||||
|= [ost=bone you=ship pax=path]
|
||||
~& %peer
|
||||
~& [%peer `*`[ost you pax]]
|
||||
~& [%peer-foo `*`foo]
|
||||
~& [%peer [ost you pax]]
|
||||
:_ +> :_ ~
|
||||
:+ ost %give
|
||||
:- %rust
|
||||
@ -26,7 +31,7 @@
|
||||
^- manx
|
||||
;html
|
||||
;head
|
||||
;title: Hi, Pi!
|
||||
;title: Hi, Philip!
|
||||
==
|
||||
;body
|
||||
;p: Yo, world.
|
||||
|
@ -1,8 +0,0 @@
|
||||
::
|
||||
:: /=main=/bin/tach/hoon
|
||||
::
|
||||
|= *
|
||||
|= ~
|
||||
^- bowl
|
||||
:_ ~ :_ ~
|
||||
[%la %leaf "you probably meant to run :chat."]
|
Loading…
Reference in New Issue
Block a user