mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-03 14:37:05 +03:00
Merge remote-tracking branch 'urbit/newnextbreach'
this obsoletes newnextbreach, nextbreach, newbreach, et cetera. Conflicts: gen164/4/in.c urb/zod/arvo/hoon.hoon
This commit is contained in:
commit
348f11255b
169
arvo/ames.hoon
169
arvo/ames.hoon
@ -5,19 +5,52 @@
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ flog :: error wrapper
|
||||
$% [%crud p=@tas q=(list tank)] ::
|
||||
[%text p=tape] ::
|
||||
== ::
|
||||
++ gift :: out result <-$
|
||||
card
|
||||
::
|
||||
$% [%hear p=lane q=@] :: receive packet
|
||||
[%init p=@p] :: report install
|
||||
[%send p=lane q=@] :: transmit packet
|
||||
[%waft p=sock q=*] :: response message
|
||||
[%wart p=sock q=@tas r=path s=*] :: network request
|
||||
[%went p=ship q=cape] :: reaction message
|
||||
== ::
|
||||
++ kiss :: in request ->$
|
||||
card
|
||||
::
|
||||
$% [%crud p=@tas q=(list tank)] :: error with trace
|
||||
[%cash p=@p q=buck] :: civil license
|
||||
[%hear p=lane q=@] :: receive packet
|
||||
[%hole p=lane q=@] :: packet failed
|
||||
[%junk p=@] :: entropy
|
||||
[%kick p=@da] :: wake up
|
||||
[%make p=(unit ,@t) q=@ud r=@ s=?] :: wild license
|
||||
[%sith p=@p q=@uw r=?] :: imperial generator
|
||||
[%wake ~] :: timer activate
|
||||
[%want p=sock q=path r=*] :: send message
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: local move
|
||||
::
|
||||
++ note :: out request $->
|
||||
card
|
||||
::
|
||||
++ sign :: in result $-<
|
||||
card
|
||||
$? $: %d :: to %dill
|
||||
$% [%flog p=flog] ::
|
||||
== == ::
|
||||
$: %a :: to %ames
|
||||
$% [%kick p=@da] ::
|
||||
== == ::
|
||||
$: @tas :: to any
|
||||
$% [%init p=@p] ::
|
||||
[%want p=sock q=path r=*] ::
|
||||
[%wart p=sock q=@tas r=path s=*] ::
|
||||
== == == ::
|
||||
++ sign :: in result $<-
|
||||
$? $: %a :: from %ames
|
||||
$% [%went p=ship q=cape] ::
|
||||
== == ::
|
||||
$: @tas ::
|
||||
$% [%crud p=@tas q=(list tank)] :: by any
|
||||
[%send p=lane q=@] :: transmit packet
|
||||
[%went p=ship q=cape] :: by %ames
|
||||
== == == ::
|
||||
--
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 4aA, identity logic ::
|
||||
@ -54,7 +87,8 @@
|
||||
|= [new=deed old=deed]
|
||||
^- ?
|
||||
=+ rac=(clan r.p.q.new)
|
||||
?& ?~ q.p.q.new
|
||||
?& =(r.new r.old) :: match fake
|
||||
?~ q.p.q.new
|
||||
?& =(r.p.q.old r.p.q.new)
|
||||
&(!=(%earl rac) =(p.p.q.old (dec p.p.q.new)))
|
||||
==
|
||||
@ -78,11 +112,12 @@
|
||||
?. =(i.wal i.ouf) ouf
|
||||
$(wal t.wal, ouf t.ouf)
|
||||
::
|
||||
++ pier :: initial deed
|
||||
++ pier !: :: initial deed
|
||||
|= wed=deed
|
||||
^- &
|
||||
?> =+ rac=(clan r.p.q.wed)
|
||||
=+ loy=(haul r.q.wed)
|
||||
?: &(r.wed =(rac %czar)) %&
|
||||
?> =(0 p.p.q.wed)
|
||||
?> =(fig:ex:loy ?+(rac !! %czar (zeno r.p.q.wed), %pawn r.p.q.wed))
|
||||
?> =((shaf %self (sham q.wed)) (need (sure:as:loy *code p.wed)))
|
||||
@ -445,17 +480,18 @@
|
||||
?. =(pub r.q.i.lew.wod.u.rad) [~ +>.$]
|
||||
[[~ lew.wod.u.rad] +>.$]
|
||||
=+ syp=[[0 [~ p.nes] her now] ges pub]
|
||||
=+ ded=[(sign:as:q.nes *code (shaf %meld (sham syp))) syp]
|
||||
=+ ded=[(sign:as:q.nes *code (shaf %meld (sham syp))) syp fak.ton]
|
||||
=+ wil=[ded law.saf]
|
||||
?> =(wil (grip wil ~))
|
||||
:- [~ wil]
|
||||
+>.$(hoc.saf (~(put by hoc.saf) her [[~31337.1.1 ~ wil] ~ *cask]))
|
||||
+>.$(hoc.saf (~(put by hoc.saf) her [[~31337.1.1 ~ wil] ~ *clot]))
|
||||
::
|
||||
++ lax :: lax:as:go
|
||||
|_ [her=ship dur=door] :: per client
|
||||
++ cluy :: cluy:lax:as:go
|
||||
^- [p=life q=gens r=acru] :: client crypto
|
||||
?~ lew.wod.dur !!
|
||||
?. =(fak.ton r.i.lew.wod.dur) ~|([%client-wrong-fake her] !!)
|
||||
:+ p.p.q.i.lew.wod.dur
|
||||
q.q.i.lew.wod.dur
|
||||
(haul r.q.i.lew.wod.dur)
|
||||
@ -523,9 +559,7 @@
|
||||
?: ?| ?=(~ lun.wod.dur)
|
||||
?=([%ix *] u.lun.wod.dur)
|
||||
?& ?=([%if *] u.lun.wod.dur)
|
||||
?| !=(q.ryn p.u.lun.wod.dur)
|
||||
!=(r.ryn q.u.lun.wod.dur)
|
||||
==
|
||||
(gth p.ryn (add ~s10 p.u.lun.wod.dur))
|
||||
==
|
||||
==
|
||||
[~ ryn]
|
||||
@ -647,8 +681,8 @@
|
||||
++ gur :: default door
|
||||
|= her=ship
|
||||
^- door
|
||||
=+ def=?.((lth her 256) ~ [~ %if 0 (mix her .0.0.1.0)])
|
||||
[[~2100.1.1 def ~] ~ *cask]
|
||||
=+ def=?.((lth her 256) ~ [~ %if ~2000.1.1 0 (mix her .0.0.1.0)])
|
||||
[[~2100.1.1 def ~] ~ *clot]
|
||||
::
|
||||
++ myx :: door by ship
|
||||
|= her=ship
|
||||
@ -698,7 +732,7 @@
|
||||
?:((lth her 256) ~ $(her (sein her)))
|
||||
-- :: --as:go
|
||||
::
|
||||
++ ha :: adopt new license
|
||||
++ ha !: :: adopt new license
|
||||
|= [our=ship mac=mace wil=will]
|
||||
^- toun
|
||||
?> !=(~ mac)
|
||||
@ -707,6 +741,7 @@
|
||||
?> =(wil (grip wil ~))
|
||||
?> (real mac wil)
|
||||
%_ ton
|
||||
fak r.i.wil
|
||||
urb
|
||||
%+ ~(put by urb.ton)
|
||||
our
|
||||
@ -967,7 +1002,7 @@
|
||||
==
|
||||
==
|
||||
++ come :: come:am
|
||||
|= [ges=(unit ,@t) wid=@ bur=@] :: instantiate pawn
|
||||
|= [ges=(unit ,@t) wid=@ bur=@ fak=?] :: instantiate pawn
|
||||
^- [p=[p=ship q=@uvG] q=furt]
|
||||
=+ loy=(bruw wid bur)
|
||||
=+ rig=sec:ex:loy
|
||||
@ -979,20 +1014,24 @@
|
||||
%^ ~(ha go ton.fox)
|
||||
our
|
||||
`mace`[[0 rig] ~]
|
||||
`will`[[(sign:as:loy _@ (shaf %self (sham syp))) syp] ~]
|
||||
`will`[[(sign:as:loy _@ (shaf %self (sham syp))) syp fak] ~]
|
||||
fak.ton
|
||||
fak
|
||||
==
|
||||
::
|
||||
++ czar :: czar:am
|
||||
|= [our=ship ger=@uw] :: instantiate emperor
|
||||
++ czar !: :: czar:am
|
||||
|= [our=ship ger=@uw fak=?] :: instantiate emperor
|
||||
^- [p=(list boon) q=furt]
|
||||
=+ loy=(bruw 2.048 ger)
|
||||
?> =(fig:ex:loy (zeno our))
|
||||
=+ loy=?:(fak (bruw 2.048 our) (bruw 2.048 ger)) :: fake uses carrier #
|
||||
=+ fim==(fig:ex:loy (zeno our))
|
||||
?: &(!fak !fim) !! :: not fake & bad fig
|
||||
=+ mac=`mace`[[0 sec:ex:loy] ~]
|
||||
=+ syp=`step`[`bray`[0 ~ our now] [%en %czar ~] pub:ex:loy]
|
||||
=+ ded=`deed`[(sign:as:loy _@ (shaf %self (sham syp))) syp]
|
||||
=+ ded=`deed`[(sign:as:loy _@ (shaf %self (sham syp))) syp fak]
|
||||
=+ buq=`buck`[mac [ded ~]]
|
||||
=: ton.fox (~(ha go ton.fox) our buq)
|
||||
zac.fox (~(put by zac.fox) our *corn)
|
||||
fak.ton.fox fak
|
||||
==
|
||||
[[[%beer our pac:ex:loy] ~] fox]
|
||||
::
|
||||
@ -1093,7 +1132,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 [~ +>.$]
|
||||
@ -1262,7 +1300,7 @@
|
||||
=+ ^= lyn ^- lane
|
||||
?~ q.fud ryn
|
||||
?. ?=(%if -.u.q.fud) u.q.fud
|
||||
[%ix now +.u.q.fud]
|
||||
[%ix +.u.q.fud]
|
||||
:: u.q.fud
|
||||
?: =(our p.fud)
|
||||
(emit %mead lyn r.fud)
|
||||
@ -1450,18 +1488,24 @@
|
||||
^? :: opaque core
|
||||
=<
|
||||
|% :: vane interface
|
||||
++ take
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
++ 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
|
||||
~& [%ames-call-flub (,@tas `*`-.q.hic)]
|
||||
((hard kiss) q.hic)
|
||||
==
|
||||
^- [p=(list move) q=_..^$]
|
||||
=^ duy ..knap
|
||||
(knap tea hen q.hin)
|
||||
=^ duy ..knob
|
||||
(knob hen q.hic)
|
||||
[duy ..^$]
|
||||
::
|
||||
++ call
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
(take ~ hen hic)
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
=+ doz=`(unit ,@da)`[~ (add now ~s32)]
|
||||
@ -1484,7 +1528,7 @@
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair lode ,*)))
|
||||
^- (unit (unit (pair logo ,*)))
|
||||
?~ tyl [~ ~]
|
||||
=+ hun=(slaw %p i.tyl)
|
||||
?~ hun [~ ~]
|
||||
@ -1506,6 +1550,12 @@
|
||||
==
|
||||
::
|
||||
++ stay fox
|
||||
++ take :: accept response
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=^ duy ..knap
|
||||
(knap tea hen q.hin)
|
||||
[duy ..^$]
|
||||
--
|
||||
|%
|
||||
++ claw |=(our=ship ^-(duct hen:(need (~(get by zac.fox) our))))
|
||||
@ -1515,10 +1565,12 @@
|
||||
?- -.bon
|
||||
%beer
|
||||
:_ fox(zac (~(put by zac.fox) p.bon `corn`[hen ~ ~ ~]))
|
||||
:: ~& [%ames-clop p.bon hen]
|
||||
:* [hen [%slip %c %init p.bon]]
|
||||
[hen [%give %init p.bon]]
|
||||
[hen [%slip %a %kick now]]
|
||||
[hen [%slip %e %init p.bon]]
|
||||
[hen [%slip %g %init p.bon]]
|
||||
~
|
||||
==
|
||||
::
|
||||
@ -1572,7 +1624,7 @@
|
||||
=. ton.fox (~(su go ton.fox) gus)
|
||||
:_ fox
|
||||
:~ :- hen
|
||||
[%toss %a ~ %want p.bon [%r %ta t.t.q.q.bon] `(unit will)`wyl]
|
||||
[%pass ~ %a %want p.bon [%r %ta t.t.q.q.bon] `(unit will)`wyl]
|
||||
==
|
||||
%re :: %re
|
||||
:_ fox
|
||||
@ -1589,7 +1641,7 @@
|
||||
%+ turn paz
|
||||
|= him=ship
|
||||
:- hen
|
||||
[%toss %a ~ %want [p.p.bon him] /q/yu [q.p.bon r.bon]]
|
||||
[%pass ~ %a %want [p.p.bon him] /q/yu [q.p.bon r.bon]]
|
||||
==
|
||||
::
|
||||
%ouzo
|
||||
@ -1614,41 +1666,46 @@
|
||||
==
|
||||
::
|
||||
++ knap
|
||||
|= [tea=wire hen=duct fav=card]
|
||||
|= [tea=wire hen=duct sih=sign]
|
||||
^- [(list move) _+>]
|
||||
?: ?=([%crud *] fav)
|
||||
[[[hen [%slip %d %flog fav]] ~] +>]
|
||||
?: ?=([%soft *] fav)
|
||||
$(fav ((hard card) p.fav))
|
||||
?- +<.sih
|
||||
%crud [[[hen [%slip %d %flog +.sih]] ~] +>]
|
||||
%send [[hen %give +.sih]~ +>]
|
||||
%went [~ +>]
|
||||
==
|
||||
::
|
||||
++ knob
|
||||
|= [hen=duct kyz=kiss]
|
||||
^- [(list move) _+>]
|
||||
?: ?=([%crud *] kyz)
|
||||
[[[hen [%slip %d %flog kyz]] ~] +>]
|
||||
=+ ^= fuy
|
||||
^- [p=(list boon) q=furt]
|
||||
?+ -.fav
|
||||
[~ fox]
|
||||
::
|
||||
?- -.kyz
|
||||
%cash
|
||||
(~(have am [now fox]) p.fav q.fav)
|
||||
(~(have am [now fox]) p.kyz q.kyz)
|
||||
::
|
||||
%hear
|
||||
(~(gnaw am [now fox]) %good p.fav q.fav)
|
||||
(~(gnaw am [now fox]) %good p.kyz q.kyz)
|
||||
::
|
||||
%hole
|
||||
(~(gnaw am [now fox]) %dead p.fav q.fav)
|
||||
(~(gnaw am [now fox]) %dead p.kyz q.kyz)
|
||||
::
|
||||
%junk
|
||||
[~ fox(any.ton (shax (mix any.ton.fox p.fav)))]
|
||||
[~ fox(any.ton (shax (mix any.ton.fox p.kyz)))]
|
||||
::
|
||||
%kick
|
||||
(~(kick am [now fox(hop p.fav)]) hen)
|
||||
(~(kick am [now fox(hop p.kyz)]) hen)
|
||||
::
|
||||
%make
|
||||
=+ vun=(~(come am [now fox]) p.fav (bex q.fav) r.fav)
|
||||
=+ vun=(~(come am [now fox]) p.kyz (bex q.kyz) r.kyz s.kyz)
|
||||
[[[%beer p.vun] ~] q.vun]
|
||||
::
|
||||
%sith
|
||||
(~(czar am [now fox]) p.fav q.fav)
|
||||
(~(czar am [now fox]) p.kyz q.kyz r.kyz)
|
||||
::
|
||||
%want
|
||||
(~(wise am [now fox]) p.fav hen q.fav r.fav)
|
||||
(~(wise am [now fox]) p.kyz hen q.kyz r.kyz)
|
||||
::
|
||||
%wake
|
||||
(~(wake am [now fox]) hen)
|
||||
|
432
arvo/batz.hoon
432
arvo/batz.hoon
@ -8,18 +8,84 @@
|
||||
::
|
||||
|%
|
||||
++ ghat :: out result <-$
|
||||
card
|
||||
::
|
||||
$% [%crud p=@tas q=(list tank)] :: error with trace
|
||||
[%hail ~] :: refresh
|
||||
[%helo p=path q=prod] :: trigger prompt
|
||||
[%init p=@p] :: report install
|
||||
[%line p=@t] :: source line
|
||||
[%logo p=@] :: logout
|
||||
[%note p=@tD q=tank] :: show message
|
||||
[%save p=path q=@] :: write atomic file
|
||||
[%send p=lane q=@] :: send packet
|
||||
[%talk p=tank] :: show on console
|
||||
[%tell p=(list ,@t)] :: dump lines
|
||||
[%veer p=@ta q=path r=@t] :: install vane
|
||||
[%vega p=path] :: reboot by path
|
||||
[%verb ~] :: reboot by path
|
||||
[%warn p=tape] :: syslog
|
||||
== ::
|
||||
++ kiss :: in request ->$
|
||||
card
|
||||
::
|
||||
$% [%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
|
||||
[%ling ~] :: rotate interface
|
||||
[%limn ~] :: rotate ship
|
||||
[%make p=(unit ,@t) q=@ud r=@ s=?] :: wild license
|
||||
[%noop ~] :: no operation
|
||||
[%sith p=@p q=@uw r=?] :: imperial generator
|
||||
[%wake ~] :: timer activate
|
||||
[%wart p=sock q=@tas r=path s=*] :: network request
|
||||
== ::
|
||||
++ flog :: sent to %dill
|
||||
$% [%crud p=@tas q=(list tank)] ::
|
||||
[%text p=tape] ::
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold newt ghat)] :: local move
|
||||
::
|
||||
++ newt :: out request $->
|
||||
card
|
||||
::
|
||||
++ newt ::
|
||||
$% $: %a :: to %ames
|
||||
$% [%make p=(unit ,@t) q=@ud r=@ s=?] ::
|
||||
[%sith p=@p q=@uw r=?] ::
|
||||
[%want p=sock q=path r=*] ::
|
||||
== == ::
|
||||
$: %b ::
|
||||
$% [%hail ~] :: to %batz
|
||||
[%line p=@t] ::
|
||||
== == ::
|
||||
$: %c :: to %clay
|
||||
$% [%info p=@p q=@tas r=nori] ::
|
||||
[%warp p=sock q=riff] ::
|
||||
== == ::
|
||||
$: %d :: to %dill
|
||||
$% [%flog p=flog] ::
|
||||
== == ::
|
||||
$: %e :: to %eyre
|
||||
$% [%band p=ship q=(list rout)] ::
|
||||
[%that p=@ud q=love] ::
|
||||
[%them p=(unit hiss)] ::
|
||||
== == == ::
|
||||
++ rave :: see %clay
|
||||
$% [& p=mood] :: single request
|
||||
[| p=moat] :: change range
|
||||
== ::
|
||||
++ riff ,[p=desk q=(unit rave)] :: see %clay
|
||||
++ sigh ,[@tas p=sign] :: sourced sign
|
||||
++ sign :: in result $-<
|
||||
card
|
||||
$% [%crud p=@tas q=(list tank)] :: by any
|
||||
[%hail ~] :: by any
|
||||
[%helo p=path q=prod] :: by %ames
|
||||
[%init p=@p] :: by %ames
|
||||
[%note p=@tD q=tank] :: by %clay
|
||||
[%pipe p=(unit ,[p=tutu q=(list)])] :: by %batz
|
||||
[%send p=lane q=@] :: by %ames
|
||||
[%thou p=httr] :: by %eyre
|
||||
[%waft p=sock q=*] :: by %ames
|
||||
[%went p=ship q=cape] :: by %ames
|
||||
[%writ p=riot] :: by %clay
|
||||
== ::
|
||||
--
|
||||
|%
|
||||
++ bard :: new session
|
||||
@ -32,6 +98,23 @@
|
||||
p.sur 1
|
||||
p.god 1
|
||||
==
|
||||
++ beau ,[p=(unit ,@ud) q=(map wire goal) r=boor] :: next/want/thread
|
||||
++ beef :: raw product
|
||||
$: p=(list gilt) :: actions
|
||||
q=(list slip) :: requests
|
||||
r=boar :: state
|
||||
== ::
|
||||
++ boar :: execution instance
|
||||
$% [%n p=(unit coal) q=claw r=lath] :: new/ready
|
||||
[%r p=(unit worm)] :: running/done
|
||||
[%t p=coal] :: simple filter
|
||||
== ::
|
||||
++ boor :: new thread
|
||||
$: p=(map ,@ud kite) :: dependencies
|
||||
q=(qeu ,[p=wire q=?(sign kiss)]) :: waiting cards
|
||||
r=(qeu ,[p=wire q=nose]) :: pending notes
|
||||
s=boar :: execution
|
||||
== ::
|
||||
++ brad :: session/dynamic
|
||||
$: fog=(list ,@ud) :: task consoles
|
||||
fen=(map ,@tas ,@ud) :: named tasks
|
||||
@ -86,6 +169,11 @@
|
||||
==
|
||||
++ brat ,[[who=ship bran] brad] :: don't ask why
|
||||
++ brim (list ,[p=ship q=brad]) :: session
|
||||
++ gyro ,[p=@ud q=wire r=prod] :: live prompt
|
||||
++ task ::
|
||||
$: paq=(qeu gyro) :: prompt queue
|
||||
wip=[p=@ud q=(map ,@ud beau)] :: processes
|
||||
== ::
|
||||
-- ::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 4bB, session engine ::
|
||||
@ -162,45 +250,61 @@
|
||||
[r.fat (past:(fest p.fat hen) q.fat)]
|
||||
::
|
||||
++ lean :: lean:be
|
||||
|= [tea=wire hen=duct fav=card] :: deliver card
|
||||
|= [tea=wire hen=duct sin=sign] :: deliver card
|
||||
^+ *fi
|
||||
=+ lay=(lead tea hen)
|
||||
?> ?=([%ma *] p.lay)
|
||||
abet:(glob:q.lay t.p.lay fav)
|
||||
abet:(glob:q.lay t.p.lay sin)
|
||||
::
|
||||
++ leap :: leap:be
|
||||
|= [tea=wire hen=duct fav=card] :: handle event
|
||||
|= [tea=wire hen=duct sin=sign] :: accept response
|
||||
^- [p=(list move) q=brat]
|
||||
?: ?=([%crud *] fav)
|
||||
[[[hen [%slip %d %flog fav]] ~] +<.^^$]
|
||||
?+ -.fav
|
||||
[[[hen %give fav] ~] +<.^^$]
|
||||
?- -.sin
|
||||
%crud [[[hen [%slip %d %flog sin]] ~] +<.^^$]
|
||||
%hail [[[hen %give sin] ~] +<.^^$]
|
||||
%helo [~ +<.^^$]
|
||||
%init [[[hen %give sin] ~] +<.^^$]
|
||||
%note [[[hen %give sin] ~] +<.^^$]
|
||||
%pipe !!
|
||||
%send [[[hen %give sin] ~] +<.^^$]
|
||||
%thou ?. (fear tea) :: legit
|
||||
[~ +<.^^$]
|
||||
abet:lash:(lean tea hen sin)
|
||||
%waft :: ~& [%leap-waft sin]
|
||||
abet:lash:(lean tea hen sin)
|
||||
%went ?. (fear tea)
|
||||
~& [%went-fear tea]
|
||||
[~ +<.^^$]
|
||||
abet:lash:(lean tea hen sin)
|
||||
%writ abet:lash:(loam tea hen +.sin)
|
||||
==
|
||||
::
|
||||
++ lear :: lear:be
|
||||
|= [hen=duct kyz=kiss] :: handle request
|
||||
^- [p=(list move) q=brat]
|
||||
?- -.kyz
|
||||
%crud [[[hen [%slip %d %flog kyz]] ~] +<.^^$]
|
||||
%hail [[[hen [%give %helo prot]] ~] +<.^^$]
|
||||
%harm [~ +<.^^$]
|
||||
%hook ~&(%batz-hook [~ +<.^^$])
|
||||
%line =+ gyp=?>(?=(^ fog) i.fog)
|
||||
?: &(=(0 gyp) =(%$ p.fav)) $(fav [%hail ~])
|
||||
?: &(=(0 gyp) =(%$ p.kyz)) $(kyz [%hail ~])
|
||||
=< abet
|
||||
?: =(0 gyp)
|
||||
lash:(gill:(fist hen) p.fav)
|
||||
lash:(como:(fest gyp hen) p.fav)
|
||||
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)
|
||||
?: =(~[/[%$]/term/1] ?>(?=(^ hen) t.hen)) :: XX gross
|
||||
[[[hen [%give %logo ~]] ~] +<.^^$]
|
||||
[~ +<.^^$]
|
||||
%ling ?> ?=(^ fog)
|
||||
=> .(fog (weld t.fog `(list ,@ud)`[i.fog ~]))
|
||||
[[[hen [%give %helo prot]] ~] +<.^^$]
|
||||
%noop [~ +<.^^$]
|
||||
%soft $(fav ((hard card) p.fav))
|
||||
%thou ?. (fear tea) :: legit
|
||||
[~ +<.^^$]
|
||||
abet:lash:(lean tea hen fav)
|
||||
%waft :: ~& [%leap-waft fav]
|
||||
abet:lash:(lean tea hen fav)
|
||||
%went ?. (fear tea)
|
||||
~& [%went-fear tea]
|
||||
[~ +<.^^$]
|
||||
abet:lash:(lean tea hen fav)
|
||||
%writ abet:lash:(loam tea hen +.fav)
|
||||
%wart (lion hen +.fav)
|
||||
%wart (lion hen +.kyz)
|
||||
?(%init %limn %make %sith %wake) !! :: handled earlier
|
||||
==
|
||||
::
|
||||
++ leon :: leon:be
|
||||
@ -269,7 +373,7 @@
|
||||
::
|
||||
++ fi :: fi:be
|
||||
|= [gyp=@ud hen=duct gyr=task] :: process task
|
||||
=| duv=(list ,[p=duct q=card])
|
||||
=| duv=(list move)
|
||||
|%
|
||||
++ abet :: abet:fi:be
|
||||
^- [(list move) brat] :: resolve
|
||||
@ -285,8 +389,8 @@
|
||||
==
|
||||
:_ +<.^^$
|
||||
%+ turn
|
||||
(flop `_duv`?:(sam duv [[~ [%helo prot]] duv]))
|
||||
|=([p=duct q=card] [(weld p hen) [%sick q]])
|
||||
(flop `_duv`?:(sam duv [[~ [%give %helo prot]] duv]))
|
||||
|=([p=duct q=(mold newt ghat)] [(weld p hen) q])
|
||||
::
|
||||
++ bitt |=(lap=path [(scot %ud gyp) lap]) :: bitt:fi:be
|
||||
++ como :: como:fi:be
|
||||
@ -312,7 +416,7 @@
|
||||
|= [lap=wire ted=@ud] :: XX ugly
|
||||
^+ +>
|
||||
%= +>
|
||||
duv :_(duv [[/b ~] [%hail ~]])
|
||||
duv :_(duv `move`[~ %pass ~ %b [%hail ~]])
|
||||
paq.gyr
|
||||
%- ~(gas to *(qeu gyro))
|
||||
%+ skip
|
||||
@ -324,7 +428,7 @@
|
||||
|= [lap=wire ted=@ud pod=prod] :: install prompt
|
||||
^+ +>
|
||||
%_ +>
|
||||
duv :_(duv [[/b ~] [%hail ~]])
|
||||
duv :_(duv [~ %pass ~ %b [%hail ~]])
|
||||
paq.gyr (~(put to paq.gyr) [ted lap pod])
|
||||
==
|
||||
::
|
||||
@ -375,7 +479,7 @@
|
||||
++ warn :: warn:fi:be
|
||||
|= txt=tape :: send warning
|
||||
^+ +>
|
||||
+>(duv :_(duv [~ [%warn txt]]))
|
||||
+>(duv :_(duv [~ [%give %warn txt]]))
|
||||
::
|
||||
++ ra :: ra:fi:be
|
||||
|_ $: ted=@ud :: thread id
|
||||
@ -460,9 +564,9 @@
|
||||
%_(+> r.orb (~(put to r.orb) [lap nob]))
|
||||
::
|
||||
++ glob :: extern
|
||||
|= [lap=wire fav=card]
|
||||
|= [lap=wire sik=?(sign kiss)]
|
||||
^+ +>
|
||||
%_(+> q.orb (~(put to q.orb) [lap fav]))
|
||||
%_(+> q.orb (~(put to q.orb) [lap sik]))
|
||||
::
|
||||
++ glum :: blocked thread
|
||||
|= [gez=(list path) hog=boar]
|
||||
@ -492,6 +596,7 @@
|
||||
|= sik=skit
|
||||
^+ +>
|
||||
%+ gram ~
|
||||
:- %give
|
||||
:+ %note '^'
|
||||
:- %leaf
|
||||
;: weld
|
||||
@ -523,11 +628,11 @@
|
||||
[%clsg (turn pax |=(a=@ta [%dtzy %ta a]))]
|
||||
::
|
||||
++ gram :: add action
|
||||
|= [hom=duct fav=card]
|
||||
%_(+> duv [[hom fav] duv])
|
||||
|= mov=move
|
||||
%_(+> duv [mov duv])
|
||||
::
|
||||
++ gran :: add actions
|
||||
|= vid=(list ,[p=duct q=card])
|
||||
|= vid=(list move)
|
||||
^+ +>
|
||||
?~(vid +> $(vid t.vid, +> (gram i.vid)))
|
||||
::
|
||||
@ -537,7 +642,7 @@
|
||||
?- -.ton
|
||||
%0 [[~ p.ton] +>]
|
||||
%1 [~ (glum ((list path) p.ton) s.orb)]
|
||||
%2 [~ (gram(orb [~ ~ ~ %r ~]) ~ [%crud %exit p.ton])]
|
||||
%2 [~ (gram(orb [~ ~ ~ %r ~]) ~ [%give %crud %exit p.ton])]
|
||||
==
|
||||
::
|
||||
++ grid :: process result
|
||||
@ -546,7 +651,7 @@
|
||||
?- -.ton
|
||||
%0 (fun p.ton)
|
||||
%1 (glum ((list path) p.ton) s.orb)
|
||||
%2 (gram(orb [~ ~ ~ %r ~]) ~ [%crud %exit p.ton])
|
||||
%2 (gram(orb [~ ~ ~ %r ~]) ~ [%give %crud %exit p.ton])
|
||||
==
|
||||
::
|
||||
++ grin :: process result
|
||||
@ -555,7 +660,7 @@
|
||||
?- -.ton
|
||||
%0 (haul (fret p.ton))
|
||||
%1 (glum ((list path) p.ton) hog)
|
||||
%2 (gram(orb [~ ~ ~ %r ~]) ~ [%crud %exit p.ton])
|
||||
%2 (gram(orb [~ ~ ~ %r ~]) ~ [%give %crud %exit p.ton])
|
||||
==
|
||||
::
|
||||
++ grip :: step to completion
|
||||
@ -709,7 +814,7 @@
|
||||
::
|
||||
++ gull :: request control
|
||||
|= [tea=wire him=ship ryf=riff]
|
||||
(gram ~[/c [%b tea]] [%warp [who him] ryf])
|
||||
(gram ~ %pass tea %c [%warp [who him] ryf])
|
||||
::
|
||||
++ gulf :: stop request
|
||||
|= [tea=wire kit=kite]
|
||||
@ -750,11 +855,11 @@
|
||||
^+ +>
|
||||
?~ nex
|
||||
?~ pun +>
|
||||
(gran (turn q.u.pun |=(a=* [~ (gyve p.u.pun a)])))
|
||||
(gran (turn q.u.pun |=(a=* [~ %give (gyve p.u.pun a)])))
|
||||
+>.$(..ra abet:(glob:(past u.nex) ~ [%pipe pun]))
|
||||
::
|
||||
++ gyve :: print vase
|
||||
|= [toy=tutu val=*] ^- card
|
||||
|= [toy=tutu val=*] ^- ghat
|
||||
=+ caf=((hard calf) (need (mang [felt:zu toy] sky)))
|
||||
:: ?: =([~ [%atom %t]] caf)
|
||||
:: [%tell ((hard ,@t) val) ~]
|
||||
@ -787,32 +892,42 @@
|
||||
+>.^$(loq p.gud)
|
||||
%ck +>.^$(cwd p.gud)
|
||||
%cs +>.^$(cws p.gud)
|
||||
%de (gram ~ %note '#' q.gud)
|
||||
%de (gram ~ %give %note '#' q.gud)
|
||||
%ex =. +>.^$ guff
|
||||
+>.^$(s.orb [%n p.gud *claw q.gud])
|
||||
%ha (gram ~ %crud %soft [p.gud ~])
|
||||
%ho (gram ~ %crud %soft p.gud)
|
||||
%la (gram ~ %talk p.gud)
|
||||
%lo (gran (turn p.gud |=(a=tank [~ %talk a])))
|
||||
%ha (gram ~ %give %crud %soft [p.gud ~])
|
||||
%ho (gram ~ %give %crud %soft p.gud)
|
||||
%la (gram ~ %give %talk p.gud)
|
||||
%lo (gran (turn p.gud |=(a=tank [~ %give %talk a])))
|
||||
%mu !!
|
||||
%mx |- ^+ +>.^^$
|
||||
?~ p.gud +>.^^$
|
||||
$(p.gud t.p.gud, +>.^^$ ^$(gud i.p.gud))
|
||||
%ok (gram [/c ~] %info who p.gud q.gud)
|
||||
%ok (gram ~ %pass ~ %c %info who p.gud q.gud)
|
||||
%sc good:+>.^$(sac ?~(p.gud ?~(sac ~ +.sac) [u.p.gud sac]))
|
||||
%sp !!
|
||||
%sq =+ tea=(bist %ma r.gud)
|
||||
%+ gram
|
||||
[/a [%b tea] ~]
|
||||
[%want [who p.gud] [%q q.gud %b tea] s.gud]
|
||||
%sr (gram [/a /b ~] [%want [who p.gud] [%r q.gud] r.gud])
|
||||
%te (gram ~ %tell p.gud)
|
||||
%th (gram [/e ~] %that p.gud q.gud)
|
||||
%+ gram ~
|
||||
[%pass tea %a [%want [who p.gud] [%q q.gud %b tea] s.gud]]
|
||||
%sr (gram ~ %pass ~ %a [%want [who p.gud] [%r q.gud] r.gud])
|
||||
%te (gram ~ %give %tell p.gud)
|
||||
%th (gram ~ %pass ~ %e %that p.gud q.gud)
|
||||
%tq =+ tea=(bist %ma p.gud)
|
||||
(gram [/e [%b tea] ~] [%them ~ q.gud])
|
||||
(gram ~ %pass tea %e [%them ~ q.gud])
|
||||
%va !!
|
||||
%xx (gram ~ p.gud)
|
||||
%xy (gram [p.gud /b ~] q.gud)
|
||||
%xx =+ gah=((soft ghat) p.gud)
|
||||
?~ gah
|
||||
~& [%batz-xx (,@tas -.p.gud)]
|
||||
!!
|
||||
(gram ~ %give u.gah)
|
||||
%xy ?. ?=([@ ~] p.gud)
|
||||
~& [%batz-xyz p.gud]
|
||||
!!
|
||||
=+ hug=((soft newt) [i.p.gud q.gud])
|
||||
?~ hug
|
||||
~& [%batz-xy (,@tas -.q.gud)]
|
||||
!!
|
||||
(gram ~ %pass ~ u.hug)
|
||||
==
|
||||
==
|
||||
::
|
||||
@ -838,7 +953,7 @@
|
||||
%es :: ~& %es-loss
|
||||
(gull (bist %ma lap) p.gal q.gal ~)
|
||||
%hp +>
|
||||
%ht (gram [/e [%b (bist [%ma lap])] ~] [%band who ~])
|
||||
%ht (gram ~ %pass (bist [%ma lap]) %e [%band who ~])
|
||||
%lq (gump | p.gal gyp ted lap)
|
||||
%ow +>
|
||||
%rt +>
|
||||
@ -856,7 +971,7 @@
|
||||
%es :: ~& %es-moor
|
||||
(gull (bist %ma lap) p.gal q.gal [~ r.gal])
|
||||
%hp +>
|
||||
%ht (gram [/e [%b (bist [%ma lap])] ~] [%band who p.gal])
|
||||
%ht (gram ~ %pass [%b (bist [%ma lap])] %e [%band who p.gal])
|
||||
%lq (gump & p.gal [gyp ted lap])
|
||||
%ow +>
|
||||
%rt +>
|
||||
@ -883,74 +998,74 @@
|
||||
++ pane |=(gal=goal %_(. lug [~ gal])) :: set goal
|
||||
++ pang %_(. lug ~) :: delete goal
|
||||
++ pong :: accept card
|
||||
|= fav=card
|
||||
|= sik=?(sign kiss)
|
||||
^+ +>
|
||||
?> ?=(^ lug)
|
||||
?- -.u.lug
|
||||
~
|
||||
?> ?=(%pipe -.fav)
|
||||
+>.$(+>.$ (glib lap [%$ p.fav]))
|
||||
?> ?=(%pipe -.sik)
|
||||
+>.$(+>.$ (glib lap [%$ p.sik]))
|
||||
::
|
||||
%do !!
|
||||
::
|
||||
%eg
|
||||
?> ?=(%writ -.fav)
|
||||
+>.$(lug ~, +>.$ (glib lap [%eg +.fav]))
|
||||
?> ?=(%writ -.sik)
|
||||
+>.$(lug ~, +>.$ (glib lap [%eg +.sik]))
|
||||
::
|
||||
%es
|
||||
?> ?=(%writ -.fav)
|
||||
?> ?=(%writ -.sik)
|
||||
=+ ^= goh ^- (unit goal)
|
||||
?~ p.fav `(unit goal)`~
|
||||
?~ p.sik `(unit goal)`~
|
||||
?- -.r.u.lug
|
||||
%& ~
|
||||
%|
|
||||
^- (unit goal)
|
||||
:- ~
|
||||
?> ?=(%ud -.q.p.u.p.fav)
|
||||
?> ?=(%ud -.q.p.u.p.sik)
|
||||
%= u.lug
|
||||
p.p.r
|
||||
?> ?| !=(%ud -.p.p.r.u.lug)
|
||||
=(p.p.p.r.u.lug p.q.p.u.p.fav)
|
||||
=(p.p.p.r.u.lug p.q.p.u.p.sik)
|
||||
==
|
||||
[%ud +(p.q.p.u.p.fav)]
|
||||
[%ud +(p.q.p.u.p.sik)]
|
||||
==
|
||||
==
|
||||
=. loz ?~(goh (~(del by loz) lap) (~(put by loz) lap u.goh))
|
||||
%= +>.$
|
||||
lug goh
|
||||
gul goh
|
||||
+>.$ (glib lap [%eg +.fav])
|
||||
+>.$ (glib lap [%eg +.sik])
|
||||
==
|
||||
::
|
||||
%hp
|
||||
?> ?=(%thou -.fav)
|
||||
+>.$(+>.$ (glib lap [%hp +.fav]))
|
||||
?> ?=(%thou -.sik)
|
||||
+>.$(+>.$ (glib lap [%hp +.sik]))
|
||||
::
|
||||
%ht !!
|
||||
:: ?> ?=(%thee -.fav)
|
||||
:: +>.$(+>.$ (glib lap [%ht +.fav]))
|
||||
:: ?> ?=(%thee -.sik)
|
||||
:: +>.$(+>.$ (glib lap [%ht +.sik]))
|
||||
::
|
||||
%lq
|
||||
?> ?=(%wart -.fav)
|
||||
+>.$(+>.$ (glib lap [%lq q.p.fav r.fav s.fav]))
|
||||
?> ?=(%wart -.sik)
|
||||
+>.$(+>.$ (glib lap [%lq q.p.sik r.sik s.sik]))
|
||||
::
|
||||
%rt
|
||||
?: ?=(%went -.fav)
|
||||
?. ?=(%dead q.fav) +>.$
|
||||
?: ?=(%went -.sik)
|
||||
?. ?=(%dead q.sik) +>.$
|
||||
+>.$(+>.$ (glib lap [%rt ~]))
|
||||
?> ?=(%waft -.fav)
|
||||
+>.$(+>.$ (glib lap [%rt ~ q.fav]))
|
||||
?> ?=(%waft -.sik)
|
||||
+>.$(+>.$ (glib lap [%rt ~ q.sik]))
|
||||
::
|
||||
%up
|
||||
?> ?=(%line -.fav)
|
||||
+>.$(+>.$ (glib lap [%up +.fav]))
|
||||
?> ?=(%line -.sik)
|
||||
+>.$(+>.$ (glib lap [%up +.sik]))
|
||||
::
|
||||
%ow
|
||||
?> ?=(%went -.fav)
|
||||
+>.$(+>.$ (glib lap [%ow q.fav]))
|
||||
?> ?=(%went -.sik)
|
||||
+>.$(+>.$ (glib lap [%ow q.sik]))
|
||||
::
|
||||
%wa
|
||||
?> ?=(%wake -.fav)
|
||||
?> ?=(%wake -.sik)
|
||||
+>.$(+>.$ (glib lap [%wa ~]))
|
||||
==
|
||||
--
|
||||
@ -1166,17 +1281,26 @@
|
||||
|= [now=@da eny=@ ski=sled] :: current invocation
|
||||
^? :: opaque core
|
||||
|% :: poke/peek pattern
|
||||
++ take :: process move
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
++ call :: handle request
|
||||
|= $: hen=duct
|
||||
hic=(hypo (hobo kiss))
|
||||
==
|
||||
=> %= . :: XX temporary
|
||||
q.hic
|
||||
^- kiss
|
||||
?: ?=(%soft -.q.hic)
|
||||
:: ~& [%dill-call-soft (,@tas `*`-.p.q.hic)]
|
||||
((hard kiss) p.q.hic)
|
||||
?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
|
||||
~& [%batz-call-flub (,@tas `*`-.q.hic)]
|
||||
((hard kiss) q.hic)
|
||||
==
|
||||
^- [p=(list move) q=_..^$]
|
||||
:: ~& [%batz-take -.q.hin [%tea tea] [%hen hen]]
|
||||
=+ ska=(slod ski)
|
||||
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
|
||||
?: ?=([%crud *] q.hin)
|
||||
[[[hen [%slip %d %flog q.hin]] ~] ..^$]
|
||||
?: ?=([%soft *] q.hin)
|
||||
$(q.hin ((hard card) p.q.hin))
|
||||
?: ?=(%wake -.q.hin)
|
||||
?: ?=([%crud *] q.hic)
|
||||
[[[hen [%slip %d %flog q.hic]] ~] ..^$]
|
||||
?: ?=(%wake -.q.hic)
|
||||
=+ ^= fiy
|
||||
=| fiy=(list ,[p=duct q=ship r=[p=@ud q=@ud r=wire]])
|
||||
|- ^+ fiy
|
||||
@ -1214,63 +1338,41 @@
|
||||
|- ^- [p=(list move) q=_..^^$]
|
||||
=+ dus=(~(get by dez) hen)
|
||||
?~ dus
|
||||
?+ -.q.hin
|
||||
~& [%take-none -.q.hin tea hen]
|
||||
~|([%take-none -.q.hin] !!)
|
||||
?+ -.q.hic
|
||||
~& [%take-none -.q.hic ~ hen]
|
||||
~|([%take-none -.q.hic] !!)
|
||||
::
|
||||
%hail
|
||||
?~ big
|
||||
~& [%take-hail-soon hen]
|
||||
~& [%call-hail-soon hen]
|
||||
[~ ..^^$]
|
||||
~& [%batz-hack-console hen]
|
||||
$(dez (~(put by dez) hen [[u.big (bard u.big)] ~]))
|
||||
::
|
||||
%init
|
||||
:: ~& [%take-init p.q.hin hen]
|
||||
:: ~& [%take-init p.q.hic hen]
|
||||
=. big ?~ big
|
||||
`p.q.hin
|
||||
`(min p.q.hin u.big)
|
||||
=+ bos=(sein p.q.hin)
|
||||
=. bos ?.(=(bos p.q.hin) bos ~zod)
|
||||
:- :- [hen [%give q.hin]]
|
||||
?: =(bos p.q.hin) ~
|
||||
`p.q.hic
|
||||
`(min p.q.hic u.big)
|
||||
=+ bos=(sein p.q.hic)
|
||||
:- :- [hen [%give q.hic]]
|
||||
?: =(bos p.q.hic) ~
|
||||
:_ ~
|
||||
[hen [%slip %b %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
|
||||
..^^$(dez (~(put by dez) hen [[p.q.hin (bard p.q.hin)] ~]))
|
||||
..^^$(dez (~(put by dez) hen [[p.q.hic (bard p.q.hic)] ~]))
|
||||
::
|
||||
?(%loin %make %sith)
|
||||
[[[hen [%toss %a tea q.hin]] ~] ..^^$]
|
||||
?(%make %sith)
|
||||
[[[hen [%pass ~ %a q.hic]] ~] ..^^$]
|
||||
==
|
||||
?> ?=(^ u.dus)
|
||||
?+ -.q.hin
|
||||
=+ beg=`brat`[[p.i.u.dus bred] q.i.u.dus]
|
||||
=+ yub=(leap:((be beg) now eny sky) tea hen q.hin)
|
||||
:- p.yub
|
||||
..^^$(dez (~(put by dez) hen [[p.i.u.dus +.q.yub] t.u.dus]))
|
||||
::
|
||||
%init
|
||||
=+ bos=(sein p.q.hin)
|
||||
=. bos ?.(=(bos p.q.hin) bos ~zod)
|
||||
:- :* [hen %give q.hin]
|
||||
[[[%b tea] hen] [%sick %hail ~]]
|
||||
?: =(bos p.q.hin) ~
|
||||
:_ ~
|
||||
[[/b hen] [%sick %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
|
||||
==
|
||||
..^^$(dez (~(put by dez) hen [[p.q.hin (bard p.q.hin)] u.dus]))
|
||||
::
|
||||
%limn
|
||||
$(q.hin [%hail ~], dez (~(put by dez) hen (weld t.u.dus `brim`[i.u.dus ~])))
|
||||
==
|
||||
::
|
||||
++ call :: process move
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
(take ~ hen hic)
|
||||
=+ beg=`brat`[[p.i.u.dus bred] q.i.u.dus]
|
||||
=+ yub=(lear:((be beg) now eny sky) hen q.hic)
|
||||
:- p.yub
|
||||
..^^$(dez (~(put by dez) hen [[p.i.u.dus +.q.yub] t.u.dus]))
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
=| doz=(unit ,@da)
|
||||
=| doz=(unit ,@da)
|
||||
|- ^+ doz
|
||||
?~ dez doz
|
||||
=. doz $(dez l.dez)
|
||||
@ -1294,8 +1396,54 @@
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair lode ,*)))
|
||||
^- (unit (unit (pair logo ,*)))
|
||||
~
|
||||
::
|
||||
++ stay [%0 big dez]
|
||||
++ take :: accept response
|
||||
|= [tea=wire hen=duct hin=(hypo sigh)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
:: ~& [%batz-take -.p.q.hin [%tea tea] [%hen hen]]
|
||||
=+ ska=(slod ski)
|
||||
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
|
||||
?: ?=([%crud *] p.q.hin)
|
||||
[[[hen [%slip %d %flog p.q.hin]] ~] ..^$]
|
||||
=+ dus=(~(get by dez) hen)
|
||||
?~ dus
|
||||
?+ -.p.q.hin
|
||||
~&([%take-none -.p.q.hin] !!)
|
||||
::
|
||||
?(%hail %send)
|
||||
?~ big
|
||||
~& [%take-hail-soon hen]
|
||||
[~ ..^$]
|
||||
:: ~& [%batz-take-console hen]
|
||||
$(dez (~(put by dez) hen [[u.big (bard u.big)] ~]))
|
||||
::
|
||||
%init
|
||||
:: ~& [%take-init p.p.q.hin hen]
|
||||
=. big ?~ big
|
||||
`p.p.q.hin
|
||||
`(min p.p.q.hin u.big)
|
||||
=+ bos=(sein p.p.q.hin)
|
||||
:- :- [hen [%give p.q.hin]]
|
||||
?: =(bos p.p.q.hin) ~
|
||||
:_ ~
|
||||
[hen [%slip %b %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
|
||||
..^$(dez (~(put by dez) hen [[p.p.q.hin (bard p.p.q.hin)] ~]))
|
||||
==
|
||||
?> ?=(^ u.dus)
|
||||
?: ?=(%init -.p.q.hin)
|
||||
=+ bos=(sein p.p.q.hin)
|
||||
:- :* [hen %give p.q.hin]
|
||||
[[[%b ~] hen] [%sick %hail ~]]
|
||||
?: =(bos p.p.q.hin) ~
|
||||
:_ ~
|
||||
[[/b hen] [%sick %line (rap 3 ":{(scow %p bos)}/main=/bin/update")]]
|
||||
==
|
||||
..^$(dez (~(put by dez) hen [[p.p.q.hin (bard p.p.q.hin)] u.dus]))
|
||||
=+ beg=`brat`[[p.i.u.dus bred] q.i.u.dus]
|
||||
=+ yub=(leap:((be beg) now eny sky) tea hen p.q.hin)
|
||||
:- p.yub
|
||||
..^$(dez (~(put by dez) hen [[p.i.u.dus +.q.yub] t.u.dus]))
|
||||
--
|
||||
|
236
arvo/clay.hoon
236
arvo/clay.hoon
@ -3,19 +3,75 @@
|
||||
::
|
||||
|= pit=vase
|
||||
=> |%
|
||||
++ cult (map duct rave) :: subscriptions
|
||||
++ dojo ,[p=cult q=dome] :: domestic desk state
|
||||
++ gift :: out result <-$
|
||||
card
|
||||
::
|
||||
$% [%ergo p=@p q=@tas r=@ud] :: version update
|
||||
[%note p=@tD q=tank] :: debug message
|
||||
[%send p=lane q=@] :: send packet
|
||||
[%writ p=riot] :: response
|
||||
== ::
|
||||
++ kiss :: in request ->$
|
||||
card
|
||||
::
|
||||
$% [%info p=@p q=@tas r=nori] :: internal edit
|
||||
[%ingo p=@p q=@tas r=nori] :: internal noun edit
|
||||
[%init p=@p] :: report install
|
||||
[%into p=@p q=@tas r=nori] :: external edit
|
||||
[%invo p=@p q=@tas r=nori] :: external noun edit
|
||||
[%wake ~] :: timer activate
|
||||
[%wart p=sock q=@tas r=path s=*] :: network request
|
||||
[%warp p=sock q=riff] :: file request
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: local move
|
||||
::
|
||||
++ note :: out request $->
|
||||
card
|
||||
::
|
||||
$% $: %a :: to %ames
|
||||
$% [%want p=sock q=path r=*] ::
|
||||
== == ::
|
||||
$: %c :: to %clay
|
||||
$% [%warp p=sock q=riff] ::
|
||||
== == ::
|
||||
$: %d ::
|
||||
$% [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill
|
||||
== == == ::
|
||||
++ sign :: in result $-<
|
||||
card
|
||||
$? $: %a :: by %ames
|
||||
$% [%send p=lane q=@] ::
|
||||
[%waft p=sock q=*] ::
|
||||
[%went p=ship q=cape] ::
|
||||
== == ::
|
||||
$: %c :: by %clay
|
||||
$% [%writ p=riot] ::
|
||||
== == ::
|
||||
$: @tas :: by any
|
||||
$% [%crud p=@tas q=(list tank)] ::
|
||||
== == == ::
|
||||
++ 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 ::
|
||||
@ -27,9 +83,9 @@
|
||||
|= [now=@da hun=duct hez=(unit duct)]
|
||||
|= [[who=@p for=@p] syd=@ta rede]
|
||||
=* red +<+>
|
||||
=| yel=(list ,[p=duct q=card])
|
||||
=| yel=(list ,[p=duct q=gift])
|
||||
=| byn=(list ,[p=duct q=riot])
|
||||
=| vag=(list ,[p=duct q=card])
|
||||
=| vag=(list ,[p=duct q=gift])
|
||||
=| say=(list ,[p=duct q=path r=ship s=[p=@ud q=riff]])
|
||||
|%
|
||||
++ abet
|
||||
@ -37,18 +93,18 @@
|
||||
:_ red
|
||||
;: weld
|
||||
%+ turn (flop yel)
|
||||
|=([a=duct b=card] [hun %give b])
|
||||
|=([a=duct b=gift] [hun %give b])
|
||||
::
|
||||
%+ turn (flop byn)
|
||||
|=([a=duct b=riot] [a %give [%writ b]])
|
||||
::
|
||||
%+ turn (flop vag)
|
||||
|=([a=duct b=card] [a %give b])
|
||||
|=([a=duct b=gift] [a %give b])
|
||||
::
|
||||
%+ turn (flop say)
|
||||
|= [a=duct b=path c=ship d=[p=@ud q=riff]]
|
||||
:- a
|
||||
[%toss %a b %want [who c] [%q %re p.q.d (scot %ud p.d) ~] q.d]
|
||||
[%pass b %a %want [who c] [%q %re p.q.d (scot %ud p.d) ~] q.d]
|
||||
==
|
||||
::
|
||||
++ aver :: read
|
||||
@ -344,96 +400,77 @@
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ take :: update
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
++ 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
|
||||
~& [%clay-call-flub (,@tas `*`-.q.hic)]
|
||||
((hard kiss) q.hic)
|
||||
==
|
||||
^- [p=(list move) q=_..^$]
|
||||
?+ -.q.hin [[[hen %give q.hin] ~] ..^$]
|
||||
%crud
|
||||
[[[hen %slip %d %flog q.hin] ~] ..^$]
|
||||
::
|
||||
%soft
|
||||
$(q.hin ((hard card) p.q.hin))
|
||||
::
|
||||
?- -.q.hic
|
||||
%init
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hin [hen ~ ~]))]
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~]))]
|
||||
::
|
||||
?(%info %into)
|
||||
?: =(%$ q.q.hin)
|
||||
?. ?=(%into -.q.hin) [~ ..^$]
|
||||
=+ yar=(need (~(get by fat.ruf) p.q.hin))
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hin yar(hez [~ hen])))]
|
||||
?: =(%$ q.q.hic)
|
||||
?. ?=(%into -.q.hic) [~ ..^$]
|
||||
=+ yar=(need (~(get by fat.ruf) p.q.hic))
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))]
|
||||
=^ mos ruf
|
||||
=+ une=(un p.q.hin now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hin) hen now r.q.hin)
|
||||
=+ une=(un p.q.hic now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hic) hen now r.q.hic)
|
||||
:- -.zot
|
||||
=. une (pish:une q.q.hin +.zot)
|
||||
abet:une(hez.yar ?.(=(%into -.q.hin) hez.yar.une [~ hen]))
|
||||
=. une (pish:une q.q.hic +.zot)
|
||||
abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen]))
|
||||
[mos ..^$]
|
||||
::
|
||||
?(%ingo %invo)
|
||||
?: =(%$ q.q.hin)
|
||||
?. ?=(%invo -.q.hin) [~ ..^$]
|
||||
=+ yar=(need (~(get by fat.ruf) p.q.hin))
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hin yar(hez [~ hen])))]
|
||||
?(%ingo %invo) :: not yet used
|
||||
?: =(%$ q.q.hic)
|
||||
?. ?=(%invo -.q.hic) [~ ..^$]
|
||||
=+ yar=(need (~(get by fat.ruf) p.q.hic))
|
||||
[~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))]
|
||||
=^ mos ruf
|
||||
=+ une=(un p.q.hin now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hin) hen now r.q.hin)
|
||||
=+ une=(un p.q.hic now ruf)
|
||||
=+ zot=abet:(exec:(di:wake:une q.q.hic) hen now r.q.hic)
|
||||
:- -.zot
|
||||
=. une (pish:une q.q.hin +.zot)
|
||||
abet:une(hez.yar ?.(=(%invo -.q.hin) hez.yar.une [~ hen]))
|
||||
[mos ..^$]
|
||||
::
|
||||
%waft
|
||||
?> ?=([@ @ ~] tea)
|
||||
=+ syd=(need (slaw %tas i.tea))
|
||||
=+ inx=(need (slaw %ud i.t.tea))
|
||||
=^ mos ruf
|
||||
=+ ^= zot
|
||||
abet:wake:(knit:(do now p.q.hin syd ruf) [inx ((hard riot) q.q.hin)])
|
||||
[-.zot (posh q.p.q.hin syd +.zot ruf)]
|
||||
=. une (pish:une q.q.hic +.zot)
|
||||
abet:une(hez.yar ?.(=(%invo -.q.hic) hez.yar.une [~ hen]))
|
||||
[mos ..^$]
|
||||
::
|
||||
%warp
|
||||
=^ mos ruf
|
||||
?: =(p.p.q.hin q.p.q.hin)
|
||||
=+ une=(un p.p.q.hin now ruf)
|
||||
=+ wex=(di:une p.q.q.hin)
|
||||
?: =(p.p.q.hic q.p.q.hic)
|
||||
=+ une=(un p.p.q.hic now ruf)
|
||||
=+ wex=(di:une p.q.q.hic)
|
||||
=+ ^= woo
|
||||
?~ q.q.q.hin
|
||||
?~ q.q.q.hic
|
||||
abet:(ease:wex hen)
|
||||
abet:(eave:wex hen u.q.q.q.hin)
|
||||
[-.woo abet:(pish:une p.q.q.hin +.woo)]
|
||||
=+ wex=(do now p.q.hin p.q.q.hin ruf)
|
||||
abet:(eave:wex hen u.q.q.q.hic)
|
||||
[-.woo abet:(pish:une p.q.q.hic +.woo)]
|
||||
=+ wex=(do now p.q.hic p.q.q.hic ruf)
|
||||
=+ ^= woo
|
||||
?~ q.q.q.hin
|
||||
?~ q.q.q.hic
|
||||
abet:(ease:wex hen)
|
||||
abet:(eave:wex hen u.q.q.q.hin)
|
||||
[-.woo (posh q.p.q.hin p.q.q.hin +.woo ruf)]
|
||||
abet:(eave:wex hen u.q.q.q.hic)
|
||||
[-.woo (posh q.p.q.hic p.q.q.hic +.woo ruf)]
|
||||
[mos ..^$]
|
||||
::
|
||||
%wart
|
||||
?> ?=(%re q.q.hin)
|
||||
=+ ryf=((hard riff) s.q.hin)
|
||||
?> ?=(%re q.q.hic)
|
||||
=+ ryf=((hard riff) s.q.hic)
|
||||
:_ ..^$
|
||||
:~ :- hen
|
||||
:^ %toss %c
|
||||
[(scot %p p.p.q.hin) (scot %p q.p.q.hin) r.q.hin]
|
||||
[%warp [p.p.q.hin p.p.q.hin] ryf]
|
||||
:^ %pass [(scot %p p.p.q.hic) (scot %p q.p.q.hic) r.q.hic]
|
||||
%c
|
||||
[%warp [p.p.q.hic p.p.q.hic] ryf]
|
||||
==
|
||||
::
|
||||
%writ
|
||||
?> ?=([@ @ *] tea)
|
||||
=+ our=(need (slaw %p i.tea))
|
||||
=+ him=(need (slaw %p i.t.tea))
|
||||
:_ ..^$
|
||||
:~ :- hen
|
||||
[%toss %a ~ [%want [our him] [%r %re %c t.t.tea] p.q.hin]]
|
||||
==
|
||||
::
|
||||
%went :: XX should actually propagate
|
||||
?: =(%good q.q.hin) [~ ..^$]
|
||||
~& [%clay-lost p.q.hin tea]
|
||||
[~ ..^$]
|
||||
::
|
||||
%wake
|
||||
=+ dal=(turn (~(tap by fat.ruf) ~) |=([a=@p b=room] a))
|
||||
@ -445,10 +482,6 @@
|
||||
$(dal t.dal, ruf abet:une, mos (weld som mos))
|
||||
==
|
||||
::
|
||||
++ call :: process move
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
(take ~ hen hic)
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
=| nex=(unit ,@da)
|
||||
@ -464,7 +497,7 @@
|
||||
::
|
||||
++ scry :: inspect
|
||||
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair lode ,*)))
|
||||
^- (unit (unit (pair logo ,*)))
|
||||
=+ got=(~(has by fat.ruf) his)
|
||||
=+ luk=?.(?=(%$ -.lot) ~ ((soft case) p.lot))
|
||||
?~ luk [~ ~]
|
||||
@ -479,4 +512,39 @@
|
||||
|=(a=(unit) (bind a |=(b=* [%noun b])))
|
||||
::
|
||||
++ stay [%0 ruf]
|
||||
++ take :: accept response
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
?- -.+.q.hin
|
||||
%crud
|
||||
[[[hen %slip %d %flog +.q.hin] ~] ..^$]
|
||||
::
|
||||
%send
|
||||
[[hen %give +.q.hin]~ ..^$]
|
||||
::
|
||||
%waft
|
||||
?> ?=([@ @ ~] tea)
|
||||
=+ syd=(need (slaw %tas i.tea))
|
||||
=+ inx=(need (slaw %ud i.t.tea))
|
||||
=^ mos ruf
|
||||
=+ ^= zot
|
||||
=< abet =< wake
|
||||
(knit:(do now p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)])
|
||||
[-.zot (posh q.p.+.q.hin syd +.zot ruf)]
|
||||
[mos ..^$]
|
||||
::
|
||||
%writ
|
||||
?> ?=([@ @ *] tea)
|
||||
=+ our=(need (slaw %p i.tea))
|
||||
=+ him=(need (slaw %p i.t.tea))
|
||||
:_ ..^$
|
||||
:~ :- hen
|
||||
[%pass ~ %a [%want [our him] [%r %re %c t.t.tea] p.+.q.hin]]
|
||||
==
|
||||
::
|
||||
%went
|
||||
?: =(%good q.+.q.hin) [~ ..^$]
|
||||
~& [%clay-lost p.+.q.hin tea]
|
||||
[~ ..^$]
|
||||
==
|
||||
--
|
||||
|
365
arvo/dill.hoon
365
arvo/dill.hoon
@ -2,43 +2,125 @@
|
||||
:: dill (4d), terminal handling
|
||||
::
|
||||
|= pit=vase
|
||||
=> |%
|
||||
=> |% :: interface tiles
|
||||
++ gift :: out result <-$
|
||||
card
|
||||
::
|
||||
$% [%bbye ~] :: reset prompt
|
||||
[%blit p=(list blit)] :: terminal output
|
||||
[%init p=@p] :: report install
|
||||
[%logo p=@] :: logout
|
||||
[%send p=lane q=@] :: transmit packet
|
||||
[%veer p=@ta q=path r=@t] :: install vane
|
||||
[%vega p=path] :: reboot by path
|
||||
[%verb ~] :: by %batz
|
||||
==
|
||||
++ kiss :: in request ->$
|
||||
card
|
||||
::
|
||||
$% [%belt p=belt] :: terminal input
|
||||
[%blew p=blew] :: terminal config
|
||||
[%boot p=*] :: weird %dill boot
|
||||
[%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] ::
|
||||
== ::
|
||||
++ flog :: sent to %dill
|
||||
$% [%crud p=@tas q=(list tank)] ::
|
||||
[%text p=tape] ::
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: local move
|
||||
::
|
||||
++ note :: out request $->
|
||||
card
|
||||
::
|
||||
++ sign :: in result $-<
|
||||
card
|
||||
--
|
||||
=| $: %0 ::
|
||||
dug=(map duct yard) ::
|
||||
== ::
|
||||
|= [now=@da eny=@ ski=sled] :: current invocation
|
||||
^? :: opaque core
|
||||
|% :: poke/peek pattern
|
||||
++ take :: process move
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
?: ?=(%flog -.q.hin)
|
||||
:_ ..^$
|
||||
%+ turn (~(tap by dug) *(list ,[p=duct q=yard]))
|
||||
|=([a=duct b=yard] [a %slip %d p.q.hin])
|
||||
?: ?=(%soft -.q.hin)
|
||||
$(q.hin ((hard card) p.q.hin))
|
||||
$% $: %b :: to %batz
|
||||
$% [%hail ~] ::
|
||||
[%harm ~] ::
|
||||
[%hook ~] ::
|
||||
[%kill p=~] ::
|
||||
[%line p=@t] ::
|
||||
[%ling ~] ::
|
||||
[%make p=(unit ,@t) q=@ud r=@ s=?] ::
|
||||
[%sith p=@p q=@uw r=?] ::
|
||||
== == ::
|
||||
$: %d :: to %dill
|
||||
$% [%crud p=@tas q=(list tank)] ::
|
||||
[%text p=tape] ::
|
||||
== == == ::
|
||||
++ sign :: in result $<-
|
||||
$? $: %b :: by %batz
|
||||
$% [%hail ~] ::
|
||||
[%helo p=path q=prod] ::
|
||||
[%logo p=@] ::
|
||||
[%save p=path q=@] ::
|
||||
[%talk p=tank] ::
|
||||
[%tell p=(list ,@t)] ::
|
||||
[%text p=tape] ::
|
||||
[%verb ~] ::
|
||||
[%veer p=@ta q=path r=@t] ::
|
||||
[%vega p=path] ::
|
||||
[%warn p=tape] ::
|
||||
== == ::
|
||||
$: @tas :: by any
|
||||
$% [%crud p=@tas q=(list tank)] ::
|
||||
[%init p=@p] ::
|
||||
[%note p=@tD q=tank] ::
|
||||
[%send p=lane q=@] ::
|
||||
== == == ::
|
||||
:::::::: :: 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)]
|
||||
=+ ^= yar ^- yard
|
||||
=+ yar=(~(get by dug) hen)
|
||||
?^ yar u.yar
|
||||
[& [80 ~ *blot] ~]
|
||||
=+ yur=(~(get by dug) hen)
|
||||
?^ yur u.yur
|
||||
[& [80 ~ *blot] ~]
|
||||
=| mos=(list move)
|
||||
=+ wip=|
|
||||
=< yerk:leap
|
||||
|%
|
||||
++ beep (curb [[%bel ~] ~]) :: send beep
|
||||
++ curb :: send blits
|
||||
@ -175,15 +257,71 @@
|
||||
(gore(hyr.u.q.q.yar [~ txt]) hup)
|
||||
$(hup +(hup))
|
||||
::
|
||||
++ leap :: terminal event
|
||||
|- ^+ +
|
||||
?+ -.q.hin +(mos :_(mos [hen %give q.hin]))
|
||||
%noop +
|
||||
++ leap :: accept response
|
||||
|= [tea=wire sih=sign]
|
||||
^+ +>
|
||||
?- -.+.sih
|
||||
%crud :: error trace
|
||||
=. q.+.sih [[%leaf (trip p.+.sih)] q.+.sih]
|
||||
|- ^+ +>.^$
|
||||
?~ q.+.sih +>.^$
|
||||
(fume:$(q.+.sih t.q.+.sih) '!' `tank`i.q.+.sih)
|
||||
::
|
||||
%helo :: trigger prompt
|
||||
%- edit
|
||||
=| bed=bein
|
||||
=+ ^= hyt ^- hist
|
||||
=+ hyt=(~(get by r.yar) p.+.sih)
|
||||
?~(hyt *hist u.hyt)
|
||||
?: &(?=(^ q.q.yar) =(p.+.sih hux.u.q.q.yar))
|
||||
%= u.q.q.yar
|
||||
hyt [+(p.hyt) [%$ q.hyt]]
|
||||
pot q.q.+.sih
|
||||
pol (lent q.q.+.sih)
|
||||
buy p.q.+.sih
|
||||
==
|
||||
=+ zon=(tuba r.q.+.sih)
|
||||
=+ zow=(lent zon)
|
||||
%= bed
|
||||
bul zow
|
||||
bus zow
|
||||
but zon
|
||||
buy p.q.+.sih
|
||||
hux p.+.sih
|
||||
hiz 0
|
||||
hyt [+(p.hyt) [%$ q.hyt]]
|
||||
pot q.q.+.sih
|
||||
pol (lent q.q.+.sih)
|
||||
==
|
||||
::
|
||||
?(%hail %make %sith)
|
||||
+>.$(mos :_(mos [hen %pass ~ %b +.sih]))
|
||||
::
|
||||
%note ?.(p.yar +>.$ (fume p.+.sih q.+.sih)) :: debug message
|
||||
%save :: write a file
|
||||
%= +>.$
|
||||
mos :_(mos [hen [%give %blit [%sav p.+.sih q.+.sih] ~]])
|
||||
==
|
||||
::
|
||||
%tell (furl (turn p.+.sih |=(a=@t (trip a)))) :: wall of text
|
||||
%talk (furl (~(win re p.+.sih) 0 p.q.yar)) :: program output
|
||||
%text $(+.sih [%talk %leaf p.+.sih]) :: simple message
|
||||
%warn (fume '~' [%leaf p.+.sih]) :: system message
|
||||
?(%init %logo %send %veer %vega %verb) :: drop-throughs
|
||||
+>(mos :_(mos [hen %give +.sih]))
|
||||
==
|
||||
::
|
||||
++ lear :: handle request
|
||||
|= kyz=kiss
|
||||
^+ +>
|
||||
?- -.kyz
|
||||
%flog !!
|
||||
%noop +>
|
||||
%belt :: terminal input
|
||||
?~ q.q.yar
|
||||
beep
|
||||
?^ hyr.u.q.q.yar :: live search
|
||||
?+ p.q.hin $(hiz.u.q.q.yar 0, hyr.u.q.q.yar ~)
|
||||
?+ p.kyz $(hiz.u.q.q.yar 0, hyr.u.q.q.yar ~)
|
||||
[%bac *]
|
||||
?: =(~ u.hyr.u.q.q.yar)
|
||||
(curb [[%bel ~] ~])
|
||||
@ -192,16 +330,16 @@
|
||||
hyr [~ (scag (dec (lent u.hyr.u.q.q.yar)) u.hyr.u.q.q.yar)]
|
||||
==
|
||||
::
|
||||
[%txt *] (look hiz.u.q.q.yar (weld u.hyr.u.q.q.yar p.p.q.hin))
|
||||
[%txt *] (look hiz.u.q.q.yar (weld u.hyr.u.q.q.yar p.p.kyz))
|
||||
[%ctl %g] (edit u.q.q.yar(bul 0, bus 0, but ~, hiz 0, hyr ~))
|
||||
[%ctl %r]
|
||||
?: =(p.hyt.u.q.q.yar hiz.u.q.q.yar)
|
||||
beep
|
||||
(look +(hiz.u.q.q.yar) u.hyr.u.q.q.yar)
|
||||
==
|
||||
?- -.p.q.hin
|
||||
?- -.p.kyz
|
||||
%aro :: arrow
|
||||
?- p.p.q.hin
|
||||
?- p.p.kyz
|
||||
%d :: down
|
||||
?: =(0 hiz.u.q.q.yar)
|
||||
beep
|
||||
@ -225,7 +363,7 @@
|
||||
==
|
||||
::
|
||||
%bac :: backspace
|
||||
^+ +.$
|
||||
^+ +>.$
|
||||
?: =(0 bus.u.q.q.yar)
|
||||
(curb `(list blit)`[[%bel ~] ~])
|
||||
%- edit
|
||||
@ -239,20 +377,20 @@
|
||||
==
|
||||
::
|
||||
%ctl :: control
|
||||
?+ p.p.q.hin
|
||||
?+ p.p.kyz
|
||||
beep
|
||||
%a (edit u.q.q.yar(bus 0))
|
||||
%b $(q.hin [%belt %aro %l])
|
||||
%b $(kyz [%belt %aro %l])
|
||||
%d ?: ?& =(0 bul.u.q.q.yar)
|
||||
=(0 bus.u.q.q.yar)
|
||||
==
|
||||
+.$(mos :_(mos [hen %toss %b ~ [%kill ~]]))
|
||||
$(q.hin [%belt %del ~])
|
||||
+>.$(mos :_(mos [hen %pass ~ %b [%kill ~]]))
|
||||
$(kyz [%belt %del ~])
|
||||
%e (edit u.q.q.yar(bus bul.u.q.q.yar))
|
||||
%f $(q.hin [%belt %aro %r])
|
||||
%f $(kyz [%belt %aro %r])
|
||||
%k ?: =(bul.u.q.q.yar bus.u.q.q.yar)
|
||||
beep
|
||||
=> .(+.$ (kill (slag bus.u.q.q.yar but.u.q.q.yar)))
|
||||
=> .(+>.$ (kill (slag bus.u.q.q.yar but.u.q.q.yar)))
|
||||
%- edit
|
||||
?> ?=(^ q.q.yar)
|
||||
%= u.q.q.yar
|
||||
@ -279,12 +417,12 @@
|
||||
~
|
||||
(slag (add 2 pos) but.u.q.q.yar)
|
||||
==
|
||||
%l +.$(mos :_(mos [hen %give %blit [[%clr ~] ~]]))
|
||||
%n $(q.hin [%belt %aro %d])
|
||||
%p $(q.hin [%belt %aro %u])
|
||||
%l +>.$(mos :_(mos [hen %give %blit [[%clr ~] ~]]))
|
||||
%n $(kyz [%belt %aro %d])
|
||||
%p $(kyz [%belt %aro %u])
|
||||
%u ?: =(0 bus.u.q.q.yar)
|
||||
beep
|
||||
=> .(+.$ (kill (scag bus.u.q.q.yar but.u.q.q.yar)))
|
||||
=> .(+>.$ (kill (scag bus.u.q.q.yar but.u.q.q.yar)))
|
||||
%- edit
|
||||
?> ?=(^ q.q.yar)
|
||||
%= u.q.q.yar
|
||||
@ -294,11 +432,11 @@
|
||||
==
|
||||
%r (edit u.q.q.yar(hyr [~ ~]))
|
||||
:: TODO
|
||||
:: %w +.$(mos :_(mos [hen %toss %b ~ [%limn ~]]))
|
||||
%x +.$(mos :_(mos [hen %toss %b ~ [%ling ~]]))
|
||||
:: %w +>.$(mos :_(mos [hen %pass ~ %b [%limn ~]]))
|
||||
%x +>.$(mos :_(mos [hen %pass ~ %b [%ling ~]]))
|
||||
%y ?: =(0 p.r.q.yar)
|
||||
beep
|
||||
$(q.hin [%belt %txt (snag q.r.q.yar r.r.q.yar)])
|
||||
$(kyz [%belt %txt (snag q.r.q.yar r.r.q.yar)])
|
||||
==
|
||||
::
|
||||
%del :: delete
|
||||
@ -314,7 +452,7 @@
|
||||
==
|
||||
::
|
||||
%met :: meta
|
||||
?+ p.p.q.hin
|
||||
?+ p.p.kyz
|
||||
beep
|
||||
%f
|
||||
?: =(bul.u.q.q.yar bus.u.q.q.yar)
|
||||
@ -354,7 +492,7 @@
|
||||
%ret :: return
|
||||
?: =(%none buy.u.q.q.yar) beep
|
||||
=+ jab=(rap 3 (tufa but.u.q.q.yar))
|
||||
%= +.$
|
||||
%= +>.$
|
||||
q.q.yar ~
|
||||
r.yar
|
||||
?: |(=(%$ jab) =(%pass buy.u.q.q.yar))
|
||||
@ -364,9 +502,9 @@
|
||||
[p.hyt.u.q.q.yar [jab ?~(q.hyt.u.q.q.yar ~ +.q.hyt.u.q.q.yar)]]
|
||||
::
|
||||
mos
|
||||
:* [hen %toss %b ~ [%hail ~]]
|
||||
:* [hen %pass ~ %b [%hail ~]]
|
||||
[hen %give [%bbye ~]]
|
||||
[hen %toss %b ~ [%line jab]]
|
||||
[hen %pass ~ %b [%line jab]]
|
||||
[hen %give [%blit [[%mor ~] ~]]]
|
||||
mos
|
||||
==
|
||||
@ -374,7 +512,7 @@
|
||||
::
|
||||
%txt :: text keys
|
||||
?: =(%none buy.u.q.q.yar) beep
|
||||
=+ let=(lent p.p.q.hin)
|
||||
=+ let=(lent p.p.kyz)
|
||||
%- edit
|
||||
%= u.q.q.yar
|
||||
bus (add let bus.u.q.q.yar)
|
||||
@ -382,77 +520,75 @@
|
||||
but
|
||||
;: weld
|
||||
(scag bus.u.q.q.yar but.u.q.q.yar)
|
||||
p.p.q.hin
|
||||
p.p.kyz
|
||||
(slag bus.u.q.q.yar but.u.q.q.yar)
|
||||
==
|
||||
==
|
||||
==
|
||||
::
|
||||
%blew +.$(p.q.yar p.p.q.hin) :: window size
|
||||
%blew +>.$(p.q.yar p.p.kyz) :: window size
|
||||
%boot
|
||||
%= +.$
|
||||
%= +>.$
|
||||
mos
|
||||
:_(mos [hen %toss %b tea p.q.hin])
|
||||
:_(mos [hen %pass ~ (note %b p.kyz)])
|
||||
==
|
||||
::
|
||||
%crud :: error trace
|
||||
=. q.q.hin [[%leaf (trip p.q.hin)] q.q.hin]
|
||||
|- ^+ +.^$
|
||||
?~ q.q.hin +.^$
|
||||
(fume:$(q.q.hin t.q.q.hin) '!' i.q.q.hin)
|
||||
=. q.kyz [[%leaf (trip p.kyz)] q.kyz]
|
||||
|- ^+ +>.^$
|
||||
?~ q.kyz +>.^$
|
||||
(fume:$(q.kyz t.q.kyz) '!' `tank`i.q.kyz)
|
||||
::
|
||||
%helo :: trigger prompt
|
||||
%- edit
|
||||
=| bed=bein
|
||||
=+ ^= hyt ^- hist
|
||||
=+ hyt=(~(get by r.yar) p.q.hin)
|
||||
?~(hyt *hist u.hyt)
|
||||
?: &(?=(^ q.q.yar) =(p.q.hin hux.u.q.q.yar))
|
||||
%= u.q.q.yar
|
||||
hyt [+(p.hyt) [%$ q.hyt]]
|
||||
pot q.q.q.hin
|
||||
pol (lent q.q.q.hin)
|
||||
buy p.q.q.hin
|
||||
==
|
||||
=+ zon=(tuba r.q.q.hin)
|
||||
=+ zow=(lent zon)
|
||||
%= bed
|
||||
bul zow
|
||||
bus zow
|
||||
but zon
|
||||
buy p.q.q.hin
|
||||
hux p.q.hin
|
||||
hiz 0
|
||||
hyt [+(p.hyt) [%$ q.hyt]]
|
||||
pot q.q.q.hin
|
||||
pol (lent q.q.q.hin)
|
||||
%hail :: refresh
|
||||
+>.$(mos :_(mos [hen %pass ~ %b kyz]))
|
||||
::
|
||||
%harm :: all terms hung up
|
||||
=+ nug=((map duct yard) [[hen (~(get by dug) hen)] ~ ~])
|
||||
^+ +>.$
|
||||
%= +>.$
|
||||
dug nug
|
||||
mos :_(mos [hen %pass ~ %b kyz])
|
||||
==
|
||||
::
|
||||
?(%hail %make %loin %sith)
|
||||
+.$(mos :_(mos [hen %toss %b ~ q.hin]))
|
||||
%hook :: this term hung up
|
||||
+>.$(dug (~(del by dug) hen), mos :_(mos [hen %pass ~ %b kyz]))
|
||||
::
|
||||
%note ?.(p.yar +.$ (fume p.q.hin q.q.hin)) :: debug message
|
||||
%save :: write a file
|
||||
%= +.$
|
||||
mos :_(mos [hen [%give %blit [%sav p.q.hin q.q.hin] ~]])
|
||||
==
|
||||
::
|
||||
%tell (furl (turn p.q.hin |=(a=@t (trip a)))) :: wall of text
|
||||
%text $(q.hin [%talk %leaf p.q.hin]) :: simple message
|
||||
%talk (furl (~(win re p.q.hin) 0 p.q.yar)) :: program output
|
||||
%warn (fume '~' [%leaf p.q.hin]) :: system message
|
||||
%wipe +.$(wip &) :: delete old
|
||||
%talk (furl (~(win re p.kyz) 0 p.q.yar)) :: program output
|
||||
%text $(kyz [%talk %leaf p.kyz]) :: simple message
|
||||
==
|
||||
::
|
||||
++ yerk :: complete core
|
||||
^- [p=(list move) q=_..^$]
|
||||
^- [p=(list move) q=(map duct yard)]
|
||||
:- (flop mos)
|
||||
..^$(dug ?.(wip (~(put by dug) hen yar) (~(del by dug) hen)))
|
||||
(~(put by dug) hen yar)
|
||||
--
|
||||
::
|
||||
++ call :: process move
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
(take ~ hen hic)
|
||||
--
|
||||
=| $: %0 ::
|
||||
dug=(map duct yard) ::
|
||||
== ::
|
||||
|= [now=@da eny=@ ski=sled] :: current invocation
|
||||
|% :: poke/peek pattern
|
||||
++ call :: handle request
|
||||
|= $: hen=duct
|
||||
hic=(hypo (hobo kiss))
|
||||
==
|
||||
^- [p=(list move) q=_..^$]
|
||||
=> %= . :: XX temporary
|
||||
q.hic
|
||||
^- kiss
|
||||
?: ?=(%soft -.q.hic)
|
||||
:: ~& [%dill-call-soft (,@tas `*`-.p.q.hic)]
|
||||
((hard kiss) p.q.hic)
|
||||
?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic
|
||||
~& [%dill-call-flub (,@tas `*`-.q.hic)]
|
||||
((hard kiss) q.hic)
|
||||
==
|
||||
?: ?=(%flog -.q.hic)
|
||||
:_ ..^$
|
||||
%+ turn (~(tap by dug) *(list ,[p=duct q=yard]))
|
||||
|=([a=duct b=yard] [a %slip %d p.q.hic])
|
||||
=^ moz dug yerk:(lear:(dy hen dug) q.hic)
|
||||
[moz ..^$]
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
@ -466,8 +602,13 @@
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair lode ,*)))
|
||||
~
|
||||
^- (unit (unit (pair logo ,*)))
|
||||
[~ ~ [%tank >dug<]]
|
||||
::
|
||||
++ stay [%0 dug]
|
||||
++ take :: process move
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=^ moz dug yerk:(leap:(dy hen dug) tea q.hin)
|
||||
[moz ..^$]
|
||||
--
|
||||
|
1257
arvo/eyre.hoon
1257
arvo/eyre.hoon
File diff suppressed because it is too large
Load Diff
120
arvo/ford.hoon
120
arvo/ford.hoon
@ -1,24 +1,31 @@
|
||||
!: :: %ford, new execution control
|
||||
:: :: %ford, new execution control
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: structures
|
||||
|%
|
||||
++ bead ,[p=(set beam) q=cage] :: computed result
|
||||
++ gift :: out result <-$
|
||||
$% [%made p=(each beet (list tank))] :: computed result
|
||||
$% [%made p=(each bead (list tank))] :: computed result
|
||||
== ::
|
||||
++ kiss :: in request ->$
|
||||
$% [%exec p=@p q=(unit silk)] :: make / kill
|
||||
[%soft p=*] :: typeless kiss
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: local move
|
||||
++ note :: out request $->
|
||||
$% [%warp p=sock q=riff] :: see %clay
|
||||
== ::
|
||||
++ sign :: in result $-<
|
||||
$% [%writ p=riot] :: see %clay
|
||||
$% $: %c :: to %clay
|
||||
$% [%warp p=sock q=riff] ::
|
||||
== == == ::
|
||||
++ rave :: see %clay
|
||||
$% [& p=mood] :: single request
|
||||
[| p=moat] :: change range
|
||||
== ::
|
||||
++ riff ,[p=desk q=(unit rave)] :: see %clay
|
||||
++ sign :: in result $<-
|
||||
$% $: %c :: by %clay
|
||||
$% [%writ p=riot] ::
|
||||
== == == ::
|
||||
-- ::
|
||||
|% :: structures
|
||||
++ axle :: all %ford state
|
||||
@ -34,8 +41,8 @@
|
||||
|* a=$+(* *) :: product clam
|
||||
$: p=cafe :: cache
|
||||
$= q ::
|
||||
$% [%0 p=(set bead) q=a] :: depends/product
|
||||
[%1 p=(set ,[p=bead q=(list tank)])] :: blocks
|
||||
$% [%0 p=(set beam) q=a] :: depends/product
|
||||
[%1 p=(set ,[p=beam q=(list tank)])] :: blocks
|
||||
[%2 p=(list tank)] :: error
|
||||
== ::
|
||||
== ::
|
||||
@ -51,7 +58,7 @@
|
||||
:: ::
|
||||
++ calm :: cache metadata
|
||||
$: laz=@da :: last accessed
|
||||
dep=(set bead) :: dependencies
|
||||
dep=(set beam) :: dependencies
|
||||
== ::
|
||||
++ calx :: concrete cache line
|
||||
$% [%comp p=calm q=cage r=twig] :: compile by text
|
||||
@ -60,7 +67,7 @@
|
||||
++ task :: problem in progress
|
||||
$: nah=duct :: cause
|
||||
kas=silk :: problem
|
||||
kig=[p=@ud q=(map ,@ud bead)] :: blocks
|
||||
kig=[p=@ud q=(map ,@ud beam)] :: blocks
|
||||
== ::
|
||||
-- ::
|
||||
|% ::
|
||||
@ -101,7 +108,7 @@
|
||||
==
|
||||
::
|
||||
++ fine |* [a=cafe b=*] :: bolt from data
|
||||
[p=`cafe`a q=[%0 p=*(set bead) q=b]] ::
|
||||
[p=`cafe`a q=[%0 p=*(set beam) q=b]] ::
|
||||
++ flaw |=([a=cafe b=(list tank)] [p=a q=[%2 p=b]]) :: bolt from error
|
||||
::
|
||||
++ grom :: merge sets
|
||||
@ -147,37 +154,41 @@
|
||||
~(exec zo [num `task`[hen u.kus 0 ~]])
|
||||
::
|
||||
++ axon :: take
|
||||
|= [num=@ud tik=@ud sin=sign]
|
||||
|= [num=@ud tik=@ud sih=sign]
|
||||
^+ +>
|
||||
?- -.sin
|
||||
?- -.+.sih
|
||||
%writ
|
||||
=+ tus=(~(get by q.tad.bay) num)
|
||||
?~ tus
|
||||
~& [%ford-lost num]
|
||||
+>.$
|
||||
(~(resp zo [num u.tus]) tik p.sin)
|
||||
(~(resp zo [num u.tus]) tik p.+.sih)
|
||||
==
|
||||
::
|
||||
++ zo
|
||||
|_ [num=@ud task]
|
||||
++ abet %_(..zo q.tad.bay (~(put by q.tad.bay) num +<+))
|
||||
++ amok %_(..zo q.tad.bay (~(del by q.tad.bay) num))
|
||||
++ amok
|
||||
%_ ..zo
|
||||
q.tad.bay (~(del by q.tad.bay) num)
|
||||
dym.bay (~(del by dym.bay) nah)
|
||||
==
|
||||
++ camo :: stop requests
|
||||
^+ .
|
||||
=+ kiz=(~(tap by q.kig) *(list ,[p=@ud q=bead]))
|
||||
=+ kiz=(~(tap by q.kig) *(list ,[p=@ud q=beam]))
|
||||
|- ^+ +>
|
||||
?~ kiz +>
|
||||
%= $
|
||||
kiz t.kiz
|
||||
mow :_ mow
|
||||
:- hen
|
||||
:^ %toss %c
|
||||
[(scot %p our) (scot %ud num) (scot %ud p.i.kiz) ~]
|
||||
:^ %pass [(scot %p our) (scot %ud num) (scot %ud p.i.kiz) ~]
|
||||
%c
|
||||
[%warp [our p.q.i.kiz] q.q.i.kiz ~]
|
||||
==
|
||||
::
|
||||
++ camp :: request a file
|
||||
|= [ren=care bem=bead]
|
||||
|= [ren=care bem=beam]
|
||||
^+ +>
|
||||
=+ tik=(scot %ud p.kig)
|
||||
=: p.kig +(p.kig)
|
||||
@ -186,8 +197,8 @@
|
||||
%= $
|
||||
mow :_ mow
|
||||
:- hen
|
||||
:^ %toss %c
|
||||
[(scot %p our) (scot %ud num) (scot %ud tik) ~]
|
||||
:^ %pass [(scot %p our) (scot %ud num) (scot %ud tik) ~]
|
||||
%c
|
||||
[%warp [our p.bem] q.bem [~ %& %x r.bem s.bem]]
|
||||
==
|
||||
::
|
||||
@ -257,13 +268,13 @@
|
||||
^= q
|
||||
?- -.ton
|
||||
%2 [%2 p=p.ton]
|
||||
%0 [%0 p=*(set bead) q=(fun p.ton)]
|
||||
%0 [%0 p=*(set beam) q=(fun p.ton)]
|
||||
%1 =- ?- faw
|
||||
& [%1 p=(turn p.faw |=(a=bead [a *(list tank)]))]
|
||||
& [%1 p=(turn p.faw |=(a=beam [a *(list tank)]))]
|
||||
| [%2 p=p.faw]
|
||||
==
|
||||
^= faw
|
||||
|- ^- (each (list bead) (list tank))
|
||||
|- ^- (each (list beam) (list tank))
|
||||
?~ p.ton [%& ~]
|
||||
=+ nex=$(p.ton t.p.ton)
|
||||
=+ pax=(path i.p.ton)
|
||||
@ -294,7 +305,7 @@
|
||||
=< abet
|
||||
|- ^+ ..exec
|
||||
?~ zuk ..exec
|
||||
=+ foo=`_..exec`(camp %x `bead`p.i.zuk)
|
||||
=+ foo=`_..exec`(camp %x `beam`p.i.zuk)
|
||||
$(zuk t.zuk, ..exec foo)
|
||||
==
|
||||
::
|
||||
@ -359,7 +370,7 @@
|
||||
(fine cof p.cay vax)
|
||||
::
|
||||
++ krab :: load to twig
|
||||
|= [cof=cafe for=logo how=logo rem=spur bem=bead]
|
||||
|= [cof=cafe for=logo how=logo rem=spur bem=beam]
|
||||
^- (bolt vase)
|
||||
%+ cope (fade cof %bake how bem)
|
||||
|= [cof=cafe gen=twig]
|
||||
@ -368,7 +379,7 @@
|
||||
(maul cof gat !>([`beak`[p.bem q.bem r.bem] for +:s.bem rem]))
|
||||
::
|
||||
++ lace :: load and check
|
||||
|= [cof=cafe for=logo rem=spur bem=bead]
|
||||
|= [cof=cafe for=logo rem=spur bem=beam]
|
||||
^- (bolt (unit vase))
|
||||
=+ bek=`beak`[p.bem q.bem r.bem]
|
||||
%+ cope (lend cof bem)
|
||||
@ -403,15 +414,14 @@
|
||||
(fine cof ~ pro)
|
||||
::
|
||||
++ lair :: metaload
|
||||
|= [for=logo bem=bead]
|
||||
|= [for=logo bem=beam]
|
||||
|= [cof=cafe vax=vase]
|
||||
^- (bolt vase)
|
||||
?. (~(nest ut -:!>(*silk)) | p.vax)
|
||||
(flaw cof (smyt (tope bem)) ~)
|
||||
%+ cope (make cof ((hard silk) q.vax))
|
||||
|= [cof=cafe cay=cage]
|
||||
=+ too=`logo`?@(p.cay p.cay %noun)
|
||||
(link cof for too [p.bem q.bem r.bem] q.cay)
|
||||
(link cof for p.cay [p.bem q.bem r.bem] q.cay)
|
||||
::
|
||||
++ lane :: type infer
|
||||
|= [cof=cafe typ=type gen=twig]
|
||||
@ -419,14 +429,14 @@
|
||||
|=(ref=type ref)
|
||||
::
|
||||
++ lend :: load arch
|
||||
|= [cof=cafe bem=bead]
|
||||
|= [cof=cafe bem=beam]
|
||||
^- (bolt arch)
|
||||
=+ von=(ska %cy (tope bem))
|
||||
?~ von [p=cof q=[%1 [bem ~] ~ ~]]
|
||||
(fine cof ((hard arch) (need u.von)))
|
||||
::
|
||||
++ liar :: load vase
|
||||
|= [cof=cafe bem=bead]
|
||||
|= [cof=cafe bem=beam]
|
||||
^- (bolt vase)
|
||||
=+ von=(ska %cx (tope bem))
|
||||
?~ von
|
||||
@ -446,7 +456,7 @@
|
||||
(fine cof ?.(=(%hoon for) all [%hoot all]))
|
||||
::
|
||||
++ lima :: load at depth
|
||||
|= [cof=cafe for=logo rem=spur bem=bead]
|
||||
|= [cof=cafe for=logo rem=spur bem=beam]
|
||||
^- (bolt (unit vase))
|
||||
%+ cope (lend cof bem)
|
||||
|= [cof=cafe arc=arch]
|
||||
@ -468,8 +478,8 @@
|
||||
|= [cof=cafe vax=vase]
|
||||
(fine cof ~ vax)
|
||||
::
|
||||
++ lime :: load bead
|
||||
|= [cof=cafe for=logo bem=bead]
|
||||
++ lime :: load beam
|
||||
|= [cof=cafe for=logo bem=beam]
|
||||
=+ [mob=bem rem=*path]
|
||||
|- ^- (bolt vase)
|
||||
%+ cope (lima cof for rem bem)
|
||||
@ -533,7 +543,7 @@
|
||||
++ make :: reduce silk
|
||||
|= [cof=cafe kas=silk]
|
||||
^- (bolt cage)
|
||||
~& [%ford-make kas]
|
||||
:: ~& [%ford-make -.kas]
|
||||
?- -.kas
|
||||
^
|
||||
%. [cof p.kas q.kas]
|
||||
@ -544,7 +554,7 @@
|
||||
==
|
||||
::
|
||||
|= [cof=cafe bor=cage heg=cage] ^- (bolt cage)
|
||||
[p=cof q=[%0 ~ [[p.bor p.heg] (slop q.bor q.heg)]]]
|
||||
[p=cof q=[%0 ~ [%$ (slop q.bor q.heg)]]]
|
||||
==
|
||||
::
|
||||
%bake
|
||||
@ -577,12 +587,20 @@
|
||||
%cast
|
||||
%+ cope $(kas r.kas)
|
||||
|= [cof=cafe cay=cage]
|
||||
=+ for=`logo`?@(p.cay p.cay %noun)
|
||||
%+ cope (link cof p.kas for q.kas q.cay)
|
||||
%+ cope (link cof p.kas p.cay q.kas q.cay)
|
||||
|= [cof=cafe vax=vase]
|
||||
(fine cof [p.kas vax])
|
||||
::
|
||||
%done [cof %0 p.kas q.kas]
|
||||
%dude
|
||||
=+ dog=$(kas q.kas)
|
||||
?. ?=(%2 -.q.dog) dog
|
||||
dog(p.q [p.kas p.q.dog])
|
||||
::
|
||||
%dune
|
||||
?~ q.kas [cof [%2 [%leaf "no data"]~]]
|
||||
$(kas [%done p.kas u.q.kas])
|
||||
::
|
||||
%mute (kale cof p.kas q.kas)
|
||||
%pass
|
||||
%+ cope $(kas p.kas)
|
||||
@ -637,13 +655,18 @@
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
?. (~(nest ut -:!>(q.hic)) | p.hic) :: XX temporary
|
||||
~& [%ford-call-flub -.q.hic]
|
||||
!!
|
||||
|= [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
|
||||
~& [%ford-call-flub (,@tas `*`-.q.hic)]
|
||||
((hard kiss) q.hic)
|
||||
==
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ ska=(slod ski)
|
||||
?: ?=(%soft -.q.hic)
|
||||
$(q.hic ((hard kiss) p.q.hic))
|
||||
=+ ^= our ^- @p
|
||||
?- -.q.hic
|
||||
%exec p.q.hic
|
||||
@ -667,15 +690,12 @@
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair lode ,*)))
|
||||
^- (unit (unit (pair logo ,*)))
|
||||
~
|
||||
::
|
||||
++ stay `axle`+>-.$
|
||||
++ take :: response
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
?. (~(nest ut -:!>(q.hin)) | p.hin) :: XX temporary
|
||||
~& [%ford-take-flub -.q.hin]
|
||||
!!
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ ska=(slod ski)
|
||||
?> ?=([@ @ @ ~] tea)
|
||||
|
517
arvo/gall.hoon
517
arvo/gall.hoon
@ -1,4 +1,4 @@
|
||||
!: :: %gall, user-level applications
|
||||
:: :: %gall, user-level applications
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
@ -8,42 +8,53 @@
|
||||
$: %0 :: state version
|
||||
pol=(map ship mast) :: apps by ship
|
||||
== ::
|
||||
++ bead ,[p=(set beam) q=cage] :: computed result
|
||||
++ bone ,@ud :: opaque duct
|
||||
++ gift :: out result <-$
|
||||
$% [%back p=?] :: %mess ack good/bad
|
||||
[%bust ~] :: reset duct
|
||||
[%crud p=@tas q=(list tank)] :: error
|
||||
[%rash p=json] :: web reaction
|
||||
[%rasp p=cage] :: urbit reaction
|
||||
[%rush p=@da q=json] :: web result
|
||||
[%rust p=@da q=cage] :: urbit result
|
||||
[%crud p=@tas q=(list tank)] :: physical error
|
||||
[%dumb ~] :: close duct
|
||||
[%rasp ~] :: message failure
|
||||
[%meta p=vase] :: meta-gift
|
||||
== ::
|
||||
++ hasp ,[p=ship q=term] :: app identity
|
||||
++ kiss :: in request ->$
|
||||
$% [%cuff p=(unit cuff) q=kiss] :: controlled kiss
|
||||
[%mesh p=hasp q=path r=json] :: web message (json)
|
||||
[%mess p=hasp q=cage] :: urbit message
|
||||
[%mush p=hasp q=path r=cage] :: web message (mime)
|
||||
[%nuke p=hasp] :: reset this duct
|
||||
:: [%puke p=(list tank) q=kiss] :: kiss will fail
|
||||
[%shah p=hasp q=(unit hope)] :: web subscribe
|
||||
[%show p=hasp q=(unit hope)] :: urbit subscribe
|
||||
[%soft p=*] :: soft kiss
|
||||
$% [%init p=ship] :: initialize owner
|
||||
[%show p=hasp q=ship r=path] :: subscribe
|
||||
:: [%cuff p=(unit cuff) q=kiss] :: controlled kiss
|
||||
[%mess p=hasp q=ship r=cage] :: message
|
||||
[%nuke p=hasp] :: clear duct
|
||||
== ::
|
||||
++ knob :: pending action
|
||||
$% [%boot ~] :: boot/reboot
|
||||
$% [%boot ~] :: begin boot
|
||||
[%crud p=@tas q=(list tank)] :: error
|
||||
[%mess p=cage] :: message
|
||||
[%nuke ~] :: reboot
|
||||
[%show p=(unit hope)] :: subscription
|
||||
[%load p=cage] :: continue boot
|
||||
[%mess p=ship q=cage] :: message
|
||||
[%show p=ship q=path] :: subscribe
|
||||
[%nuke ~] :: clear duct
|
||||
[%take p=path q=vase] :: user result
|
||||
== ::
|
||||
++ mast :: apps by ship
|
||||
$: bum=(map ,@ta seat) :: apps by name
|
||||
$: hun=duct :: control duct
|
||||
bum=(map ,@ta seat) :: apps by name
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: typed move
|
||||
++ note curd :: out request $->
|
||||
++ note :: out request $->
|
||||
$? $: %c :: to %clay
|
||||
$% [%warp p=sock q=riff] ::
|
||||
== == ::
|
||||
$: %f :: to %ford
|
||||
$% [%exec p=@p q=(unit silk)] ::
|
||||
== == ::
|
||||
$: @tas :: to any
|
||||
$% [%meta p=vase] ::
|
||||
== == == ::
|
||||
++ 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
|
||||
@ -51,17 +62,26 @@
|
||||
== ::
|
||||
++ seat :: the living app
|
||||
$: huv=(unit vase) :: application vase
|
||||
qic=(unit toil) :: project
|
||||
vey=(qeu toil) :: pending calls
|
||||
orm=(unit ,@da) :: last buildtime
|
||||
ped=(set (pair ship desk)) :: dependencies
|
||||
qic=(unit toil) :: current project
|
||||
onz=(unit (pair duct path)) :: live fords
|
||||
vey=(qeu toil) :: pending projects
|
||||
nuc=(set duct) :: nuked ducts
|
||||
tik=@ud :: build number
|
||||
act=@ud :: action number
|
||||
lat=@da :: last change
|
||||
orm=(unit ,@da) :: build date
|
||||
sup=(map bone (pair ship path)) :: subscribers
|
||||
peq=(map bone ,@uvI) :: peekers
|
||||
ped=(set (pair ship desk)) :: active depends
|
||||
zam=scar :: opaque ducts
|
||||
== ::
|
||||
++ sign :: in result $-<
|
||||
$% [%made p=(each beet (list tank))] :: computed result
|
||||
[%ruse p=curd] :: user wrapper
|
||||
[%writ p=riot] :: version result
|
||||
== ::
|
||||
$% $: %c :: by %clay
|
||||
$% [%writ p=riot] ::
|
||||
== == ::
|
||||
$: %f :: by %ford
|
||||
$% [%made p=(each bead (list tank))] ::
|
||||
== == == ::
|
||||
++ toil (pair duct knob) :: work in progress
|
||||
-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: functions
|
||||
@ -126,10 +146,10 @@
|
||||
=< ^?
|
||||
|% :: vane interface
|
||||
++ call :: handle request
|
||||
|= [hen=duct hic=(hypo kiss)]
|
||||
?. (~(nest ut -:!>(q.hic)) | p.hic) :: XX temporary
|
||||
~& [%gall-call-flub -.q.hic]
|
||||
$(q.hic ((hard kiss) q.hic))
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
|
||||
?: ?=(%init -.q.hic)
|
||||
[p=~ q=..^$(pol.all (~(put by pol.all) p.q.hic hen ~))]
|
||||
|- ^- [p=(list move) q=_..^^$]
|
||||
=+ =| law=(unit cuff)
|
||||
|- ^- $: law=(unit cuff)
|
||||
@ -137,22 +157,15 @@
|
||||
kon=knob
|
||||
==
|
||||
?- -.q.hic
|
||||
%cuff $(q.hic q.q.hic, law (limp p.q.hic law))
|
||||
%mesh !!
|
||||
%mess [law p.q.hic %mess q.q.hic]
|
||||
%mush !!
|
||||
%shah !!
|
||||
%show [law p.q.hic %show q.q.hic]
|
||||
%soft $(q.hic ((hard kiss) p.q.hic))
|
||||
:: %cuff $(q.hic q.q.hic, law (limp p.q.hic law))
|
||||
%mess [law p.q.hic %mess q.q.hic r.q.hic]
|
||||
%show [law p.q.hic %show q.q.hic r.q.hic]
|
||||
%nuke [law p.q.hic %nuke ~]
|
||||
==
|
||||
abet:work:(quem:(boar:(goat hap) hen law) kon)
|
||||
::
|
||||
++ take :: accept response
|
||||
|= [pax=path hen=duct hin=(hypo sign)] ::
|
||||
?. (~(nest ut -:!>(q.hin)) | p.hin) :: XX temporary
|
||||
~& [%gall-take-flub -.q.hin]
|
||||
$(q.hin ((hard sign) q.hin))
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ lum=(lump pax)
|
||||
=< abet =< work
|
||||
@ -166,13 +179,13 @@
|
||||
lot=coin
|
||||
tyl=path
|
||||
==
|
||||
^- (unit (unit (pair lode ,*)))
|
||||
^- (unit (unit (pair logo ,*)))
|
||||
=+ ^= vew ^- lens :: XX future scry
|
||||
%. :- use
|
||||
:- [who syd ((hard case) p.lot)]
|
||||
(flop tyl)
|
||||
|= $: use=(unit (set monk)) :: observers
|
||||
bid=bead :: position
|
||||
bid=beam :: position
|
||||
== ::
|
||||
(beef:(gaur p.bid q.bid) use r.bid s.bid)
|
||||
%+ bind
|
||||
@ -207,17 +220,17 @@
|
||||
::
|
||||
++ goat :: call and go
|
||||
|= [our=@p app=@tas]
|
||||
=+ ^= mat ^- mast
|
||||
=+ mat=(~(get by pol.all) our)
|
||||
?~(mat *mast u.mat)
|
||||
=+ mat=(need (~(get by pol.all) our))
|
||||
=+ ^= sat ^- seat
|
||||
=+ sat=(~(get by bum.mat) app)
|
||||
?^ sat u.sat
|
||||
*seat
|
||||
:: %* . *seat
|
||||
:: eny (shax (mix now eny))
|
||||
:: lat now
|
||||
:: ==
|
||||
=+ syt=(~(get by bum.mat) app)
|
||||
?^ syt u.syt
|
||||
%* . *seat
|
||||
zam
|
||||
^- scar
|
||||
:+ 1
|
||||
[[hun.mat 0 ~] ~ ~]
|
||||
[[0 hun.mat] ~ ~]
|
||||
==
|
||||
~(. go [our app] mat sat)
|
||||
::
|
||||
++ go :: application core
|
||||
@ -285,7 +298,7 @@
|
||||
((hard null) q.vax)
|
||||
=+ ^= yob
|
||||
|= vax=vase ^- cage
|
||||
[((hard lode) -.q.vax) (slot 3 vax)]
|
||||
[((hard logo) -.q.vax) (slot 3 vax)]
|
||||
=+ ^= yar
|
||||
|= vax=vase ^- arch
|
||||
((hard arch) q.vax)
|
||||
@ -309,14 +322,14 @@
|
||||
mow=(list move) :: actions
|
||||
==
|
||||
++ abet [(flop mow) ^abet] :: resolve
|
||||
++ apex
|
||||
++ apex :: enter
|
||||
^+ .
|
||||
?. &(=(~ 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
|
||||
|= neh=duct
|
||||
=+ orf=(need (~(get by q.zam.sat) hen))
|
||||
=+ orf=(need (~(get by q.zam.sat) neh))
|
||||
%_ +>.$
|
||||
hen neh
|
||||
ost p.orf
|
||||
@ -329,10 +342,10 @@
|
||||
[%done ~ %$ vax]
|
||||
::
|
||||
++ conf :: configured core
|
||||
|= vax=vase
|
||||
|= kas=silk
|
||||
^- silk
|
||||
:+ %mute (core vax)
|
||||
:~ [[%$ 6]~ (cave !>([[our app] now eny]))]
|
||||
:+ %mute kas
|
||||
:~ [[%$ 12]~ (cave !>([[our app] sup.sat [act.sat eny now]]))]
|
||||
==
|
||||
++ core |=(vax=vase (cove %core vax)) :: core as silk
|
||||
++ cove :: cage as silk
|
||||
@ -340,29 +353,46 @@
|
||||
^- silk
|
||||
[%done ~ cay]
|
||||
::
|
||||
++ deal :: reboot
|
||||
^+ .
|
||||
=. tik.sat +(tik.sat)
|
||||
=+ pys=(~(tap by sup.sat) ~)
|
||||
:: ~& [%gall-deal tik.sat pys]
|
||||
|- ^+ +>.$
|
||||
?~ pys +>.$
|
||||
=. +>.$ $(pys t.pys)
|
||||
%= +>.$
|
||||
vey.sat
|
||||
%- ~(put to vey.sat)
|
||||
:- (need (~(get by r.zam.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
|
||||
%+ skip (~(tap in pen) ~)
|
||||
|=(a=(pair ship desk) (~(has in ped.sat) a))
|
||||
|= a=(pair ship desk)
|
||||
:- hen
|
||||
:^ %toss %c (away %s %drug (scot %p p.a) q.a ~)
|
||||
`card`[%warp [our p.a] q.a ~ %| [%da now] [%da (add now ~d1000)]]
|
||||
:- hun.mat
|
||||
:^ %pass (away %w %drug (scot %p p.a) q.a ~) %c
|
||||
[%warp [our p.a] q.a ~ %| [%da now] [%da (add now ~d1000)]]
|
||||
=+ ^= old ^- (list move)
|
||||
%+ turn
|
||||
%+ skip (~(tap in ped.sat) ~)
|
||||
|=(a=(pair ship desk) (~(has in pen) a))
|
||||
|= a=(pair ship desk)
|
||||
:- hen
|
||||
:^ %toss %c (away %s %drug (scot %p p.a) q.a ~)
|
||||
`card`[%warp [our p.a] q.a ~]
|
||||
:- hun.mat
|
||||
:^ %pass (away %w %drug (scot %p p.a) q.a ~) %c
|
||||
[%warp [our p.a] q.a ~]
|
||||
%_(+>.$ ped.sat pen, mow :(weld new old mow))
|
||||
::
|
||||
++ drum :: raw dependencies
|
||||
|= dep=(set bead)
|
||||
|= dep=(set beam)
|
||||
^+ +>
|
||||
?> ?=(^ orm.sat)
|
||||
%- drug
|
||||
@ -375,90 +405,201 @@
|
||||
$(mav t.mav)
|
||||
::
|
||||
++ ford :: exec to ford
|
||||
|= [pan=term kas=silk]
|
||||
%_ +>.$
|
||||
mow
|
||||
:_(mow [hen [%toss %f (away [%s pan ~]) [%exec our `kas]]])
|
||||
|= [pax=path kas=silk]
|
||||
^+ +>
|
||||
%_ +>
|
||||
mow :_(mow [hen %pass (away pax) %f [%exec our `kas]])
|
||||
onz.sat `[hen pax]
|
||||
==
|
||||
::
|
||||
++ gate :: gate as silk
|
||||
++ give :: give a gift
|
||||
|= gip=gift
|
||||
%_(+> mow [[hen %give gip] mow])
|
||||
::
|
||||
++ harm :: arm as silk
|
||||
|= [arm=term kas=silk]
|
||||
^- silk
|
||||
[%pass kas [%1 [%cnzy arm]]]
|
||||
::
|
||||
++ give :: return card
|
||||
|= gip=gift
|
||||
%_(+> mow [[hen %give gip] mow])
|
||||
::
|
||||
++ gone %_(. qic.sat ~) :: done work
|
||||
++ game :: invoke core
|
||||
|= [[pan=term arm=term] vax=vase sam=vase]
|
||||
%+ ford pan
|
||||
[%call (gate arm (conf vax)) (cove %$ sam)]
|
||||
::
|
||||
++ home :: load application
|
||||
^- silk
|
||||
:+ %boil %core
|
||||
[[our %main [%da now]] %app ~]
|
||||
[[our %main [%da now]] app %app ~]
|
||||
::
|
||||
++ mack :: apply standard
|
||||
|= sih=sign
|
||||
?> ?=(%made -.+.sih)
|
||||
^- [(unit (list tank)) _+>]
|
||||
?- -.p.+.sih
|
||||
& :- ~
|
||||
%- obey:(morn (slot 3 q.q.p.p.+.sih))
|
||||
(slot 2 q.q.p.p.+.sih)
|
||||
| [`p.p.+.sih (give %crud %made p.p.+.sih)]
|
||||
==
|
||||
::
|
||||
++ meek :: apply peek
|
||||
|= sih=sign
|
||||
^- [(unit cage) _+>]
|
||||
?> ?=(%made -.+.sih)
|
||||
?- -.p.+.sih
|
||||
& =+ vax=`vase`q.q.p.p.+.sih
|
||||
?. &(?=(^ q.vax) ?=(@ -.q.vax))
|
||||
[~ (give %crud %peek-lame *(list tank))]
|
||||
:: ~> %slog.[0 (skol p:(slot 3 vax))]
|
||||
:- `[((hard logo) -.q.vax) (slot 3 vax)]
|
||||
+>.$
|
||||
| [~ (give %crud %made p.p.+.sih)]
|
||||
==
|
||||
::
|
||||
++ mick :: apply w/depends
|
||||
|= sih=sign
|
||||
?> ?=(%made -.+.sih)
|
||||
^- [(unit (set beam)) _+>]
|
||||
?- -.p.+.sih
|
||||
& :- `p.p.p.+.sih
|
||||
%- obey:(morn (slot 3 q.q.p.p.+.sih))
|
||||
(slot 2 q.q.p.p.+.sih)
|
||||
| [~ (give %crud %made p.p.+.sih)]
|
||||
==
|
||||
::
|
||||
++ murk :: apply park
|
||||
|= sih=sign
|
||||
^- [(unit cage) _+>]
|
||||
?> ?=(%made -.+.sih)
|
||||
?- -.p.+.sih
|
||||
& [`q.p.p.+.sih +>.$]
|
||||
| [~ (give %crud %made p.p.+.sih)]
|
||||
==
|
||||
::
|
||||
++ more :: accept result
|
||||
|= $: pax=path :: internal position
|
||||
hin=(hypo sign) :: urbit event
|
||||
hin=(hypo sign) :: typed event
|
||||
==
|
||||
^+ +>
|
||||
?: ?=([%u *] pax)
|
||||
?. ?=(%ruse -.q.hin)
|
||||
~& [%more-card -.q.hin pax]
|
||||
!!
|
||||
?+ -.pax !!
|
||||
%s :: core operation
|
||||
?> ?& ?=([@ *] t.pax)
|
||||
!=(~ qic.sat)
|
||||
=(`[hen pax] onz.sat)
|
||||
==
|
||||
=: onz.sat ~
|
||||
qic.sat ~
|
||||
==
|
||||
?+ i.t.pax !!
|
||||
%park
|
||||
=^ gyd +>.$ (murk q.hin)
|
||||
?~ gyd
|
||||
+>.$
|
||||
(quen %load u.gyd)
|
||||
::
|
||||
%peek
|
||||
?> ?=([@ *] t.t.pax)
|
||||
=+ you=(need (slaw %p i.t.t.pax))
|
||||
=^ gyd +>.$ (meek q.hin)
|
||||
?~ gyd
|
||||
(give [%dumb ~])
|
||||
=+ kee=[you t.t.t.pax]
|
||||
=+ ash=(sham q.q.u.gyd)
|
||||
?: =(`ash (~(get by peq.sat) ost))
|
||||
+>.$
|
||||
%- %= give
|
||||
peq.sat (~(put by peq.sat) ost ash)
|
||||
sup.sat (~(put by sup.sat) ost kee)
|
||||
==
|
||||
:- %meta
|
||||
^- vase
|
||||
:- :+ %cell [%cube %rust %atom %tas]
|
||||
[%cell [%atom %tas] p.q.u.gyd]
|
||||
[%rust p.u.gyd q.q.u.gyd]
|
||||
::
|
||||
%peer
|
||||
?> ?=([@ *] t.t.pax)
|
||||
=+ you=(need (slaw %p i.t.t.pax))
|
||||
=^ gud +>.$ (mack q.hin)
|
||||
?^ gud
|
||||
(give [%dumb ~])
|
||||
+>.$(sup.sat (~(put by sup.sat) ost [you t.t.t.pax]))
|
||||
::
|
||||
%poke
|
||||
=^ gud +>.$ (mack q.hin)
|
||||
?^ gud (give %rasp ~)
|
||||
+>.$
|
||||
::
|
||||
%prep
|
||||
=^ gad +>.$ (mick q.hin)
|
||||
?~ gad (drum ~)
|
||||
deal:(drum u.gad)
|
||||
::
|
||||
%pull
|
||||
=^ gud +>.$ (mack q.hin)
|
||||
?^ gud +>.$
|
||||
+>.$(sup.sat (~(del by sup.sat) ost))
|
||||
==
|
||||
::
|
||||
%u :: user request
|
||||
%_ +>.$
|
||||
vey.sat
|
||||
%- ~(put to vey.sat)
|
||||
[hen [%take t.pax (spec (slot 3 hin))]]
|
||||
==
|
||||
?> ?=([%s @ ~] pax)
|
||||
?> !=(~ qic.sat)
|
||||
?+ i.t.pax !!
|
||||
%boot
|
||||
~& %more-boot
|
||||
?> ?=([~ * %boot ~] qic.sat)
|
||||
?> ?=(%made -.q.hin)
|
||||
?- -.p.q.hin
|
||||
& (drum:(morn:gone q.q.p.p.q.hin) p.p.p.q.hin)
|
||||
| (mort p.p.q.hin)
|
||||
(~(put to vey.sat) [hen [%take t.pax hin]])
|
||||
==
|
||||
::
|
||||
%drug
|
||||
~& %more-drug
|
||||
?> ?=(%writ -.q.hin)
|
||||
?~ p.q.hin +>.$
|
||||
%w :: autoboot
|
||||
?> ?& ?=([%drug @ @ ~] t.pax)
|
||||
?=(%writ -.+.q.hin)
|
||||
==
|
||||
=+ :* 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
|
||||
~& %more-step
|
||||
?> ?=(%made -.q.hin)
|
||||
?- -.p.q.hin
|
||||
& %- obey:(morn:gone (slot 3 q.q.p.p.q.hin))
|
||||
(slot 2 q.q.p.p.q.hin)
|
||||
| (give %crud %made p.p.q.hin)
|
||||
==
|
||||
==
|
||||
::
|
||||
++ morn :: successful boot
|
||||
++ morn :: install core
|
||||
|= vax=vase
|
||||
%_(+> huv.sat `vax)
|
||||
^+ +>
|
||||
=+ new=?~(huv.sat & !=(+<+.q.vax +<+.q.u.huv.sat))
|
||||
=. huv.sat `vax
|
||||
?. new +>.$
|
||||
=: act.sat +(act.sat)
|
||||
lat.sat now
|
||||
==
|
||||
=+ pex=(~(tap by peq.sat) ~)
|
||||
|- ^+ +>.^$
|
||||
?~ pex +>.^$
|
||||
:: ~& [%morn-peek p.i.pex (need (~(get by sup.sat) p.i.pex))]
|
||||
%= $
|
||||
pex t.pex
|
||||
+>.^$ %- quem(hen (need (~(get by r.zam.sat) p.i.pex)))
|
||||
[%show (need (~(get by sup.sat) p.i.pex))]
|
||||
==
|
||||
::
|
||||
++ mort :: failed boot
|
||||
|= tan=(list tank)
|
||||
(give %crud %boot-lost tan)
|
||||
::
|
||||
++ nile [%done ~ [%$ [%atom %n] ~]] :: null silk
|
||||
++ obey :: process result
|
||||
++ nile [%done ~ [%$ [%cube 0 [%atom %n]] ~]] :: null silk
|
||||
++ obey :: process app moves
|
||||
|= vax=vase
|
||||
%_(+> mow (weld (flop (said vax)) mow))
|
||||
::
|
||||
++ quem :: queue action
|
||||
|= kon=knob :: content
|
||||
%_(+> vey.sat (~(put to vey.sat) hen kon))
|
||||
^+ +>
|
||||
=. +> ?. ?=(%nuke -.kon) +>
|
||||
?. &(?=(^ onz.sat) =(hen p.u.onz.sat)) +>
|
||||
%= +>
|
||||
onz.sat ~
|
||||
mow
|
||||
:_(mow [hen %pass (away q.u.onz.sat) %f [%exec our ~]])
|
||||
==
|
||||
+>.$(vey.sat (~(put to vey.sat) hen kon))
|
||||
::
|
||||
++ quen :: push on front
|
||||
|= kon=knob
|
||||
^+ +>
|
||||
=+ yov=(~(tap by vey.sat) ~) :: XX ++pun
|
||||
+>.$(vey.sat (~(gas to *(qeu toil)) `_yov`[[hen kon] yov]))
|
||||
::
|
||||
++ said
|
||||
|= vud=vase
|
||||
@ -467,89 +608,123 @@
|
||||
[(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))
|
||||
::
|
||||
++ nuke :: end
|
||||
%_(. vey.sat (~(put to vey.sat) hen %nuke ~))
|
||||
::
|
||||
++ sumo :: standard gift
|
||||
|= vig=vase
|
||||
^- gift
|
||||
[%meta vig]
|
||||
::
|
||||
++ sump
|
||||
|= wec=vase
|
||||
^- move
|
||||
:- ((hard duct) -.q.wec)
|
||||
:- (need (~(get by r.zam.sat) ((hard bone) -.q.wec)))
|
||||
=+ caq=(spec (slot 3 wec))
|
||||
?+ q.caq ~&(%sump-bad !!)
|
||||
::
|
||||
[%toss p=@tas q=* r=[p=@tas q=*]]
|
||||
:^ %toss (need ((sand %tas) ((hard ,@) p.q.caq)))
|
||||
((hard path) q.q.caq)
|
||||
[%pass p=* q=@tas r=[p=@tas q=*]]
|
||||
:^ %pass [%u ((hard path) p.q.caq)]
|
||||
(need ((sand %tas) ((hard ,@) q.q.caq)))
|
||||
[%meta (spec (slot 15 caq))]
|
||||
::
|
||||
[%give p=[p=@tas q=*]]
|
||||
[%give [%meta (spec (slot 3 caq))]]
|
||||
::
|
||||
[%slip p=@tas q=[p=@tas q=*]]
|
||||
:+ %slip
|
||||
(need ((sand %tas) ((hard ,@) p.q.caq)))
|
||||
[%meta (spec (slot 7 caq))]
|
||||
[%give (sumo (spec (slot 3 caq)))]
|
||||
==
|
||||
::
|
||||
++ warm :: vase has arm
|
||||
|= cog=@tas
|
||||
^- ?
|
||||
?~ huv.sat |
|
||||
!=(~ q:(~(fino ut p.u.huv.sat) 0 %free cog))
|
||||
::
|
||||
++ work :: eat queue
|
||||
^+ .
|
||||
~& %gall-work
|
||||
?: |(?=(^ qic.sat) =(~ vey.sat)) . :: nothing to do
|
||||
|- ^+ +
|
||||
?: |(?=(^ qic.sat) =(~ vey.sat)) +.$ :: nothing to do
|
||||
=^ yev vey.sat [p q]:~(get to vey.sat)
|
||||
?: (~(has in nuc.sat) p.yev) $
|
||||
work:(yawn:(bing p.yev) q.yev)
|
||||
::
|
||||
++ yawl :: invoke core
|
||||
|= [[arm=term pax=path] vax=vase sam=vase]
|
||||
^+ +>
|
||||
%+ ford [%s arm pax]
|
||||
[%call (harm arm (conf (core vax))) (cove %$ sam)]
|
||||
::
|
||||
++ yawn :: start event
|
||||
|= kon=knob
|
||||
^+ +>
|
||||
:: ~& [%gall-yawn ost -.kon]
|
||||
=. qic.sat `[hen kon]
|
||||
?- -.kon
|
||||
%boot
|
||||
~& %yawn-boot
|
||||
=. orm.sat `now
|
||||
%+ ford %boot
|
||||
%+ ford /s/park
|
||||
^- silk
|
||||
:+ %call
|
||||
(gate %prep home)
|
||||
:- home
|
||||
?~ huv.sat nile
|
||||
[nile (gate %save (conf u.huv.sat))]
|
||||
?: =(~ q.u.huv.sat) nile
|
||||
:- nile
|
||||
?. (warm %park)
|
||||
[%done ~ %$ (slot 13 u.huv.sat)]
|
||||
(harm %park (conf (core u.huv.sat)))
|
||||
::
|
||||
%load
|
||||
=+ [hom=(slot 2 q.p.kon) old=(slot 3 q.p.kon)]
|
||||
%+ ford /s/prep
|
||||
?. (warm(huv.sat `hom) %prep)
|
||||
:- nile
|
||||
?: =(~ q.old)
|
||||
(core hom)
|
||||
:+ %mute `silk`(core hom)
|
||||
:~ [[%$ 13]~ (cave (slot 3 old))]
|
||||
==
|
||||
[%call (harm %prep (conf (core hom))) [nile (cave old)]]
|
||||
::
|
||||
%crud
|
||||
~& %yawn-crud
|
||||
?~ huv.sat
|
||||
~& [%crud-none our app]
|
||||
gone:(give %crud p.kon q.kon)
|
||||
%^ game [%step %pain] u.huv.sat
|
||||
!>([ost use p.kon])
|
||||
::
|
||||
%mess
|
||||
~& %yawn-mess
|
||||
?~ huv.sat
|
||||
~& [%mess-none our app]
|
||||
gone:(give %back |)
|
||||
%^ game [%step %poke] u.huv.sat
|
||||
:(slop [[%atom %ud] ost] !>((ride use say)) q.p.kon)
|
||||
(give(qic.sat ~) %crud p.kon q.kon)
|
||||
::
|
||||
%nuke
|
||||
~& %yawn-mess
|
||||
?~ huv.sat
|
||||
~& [%nuke-none our app]
|
||||
gone
|
||||
(game [%step %punk] u.huv.sat !>([ost ~]))
|
||||
?. (warm %pull)
|
||||
+>.$(qic.sat ~)
|
||||
?> ?=(^ huv.sat)
|
||||
(yawl [%pull ~] u.huv.sat [[%atom %ud] ost])
|
||||
::
|
||||
%mess
|
||||
=+ ^= cog ^- term
|
||||
?: =(%$ p.q.kon) %poke
|
||||
=+ goc=(cat 3 'poke-' p.q.kon)
|
||||
?:((warm goc) goc %poke)
|
||||
?. (warm cog)
|
||||
(give(qic.sat ~) %rasp ~)
|
||||
?> ?=(^ huv.sat)
|
||||
=+ sam=:(slop [[%atom %ud] ost] [[%atom %p] p.kon] q.q.kon)
|
||||
:: ~& [%mess-poke cog]
|
||||
%+ ford /s/poke
|
||||
[%call (harm cog (conf (core u.huv.sat))) (cove %$ sam)]
|
||||
::
|
||||
%show
|
||||
~& %yawn-show
|
||||
?~ huv.sat
|
||||
~& [%show-none our app]
|
||||
gone:(give %bust ~)
|
||||
%^ game [%step %peer] u.huv.sat
|
||||
!>([ost use p.kon])
|
||||
?: (warm %peer)
|
||||
=+ sam=!>([ost p.kon q.kon])
|
||||
?> ?=(^ huv.sat)
|
||||
=. peq.sat (~(del by peq.sat) ost)
|
||||
(yawl [%peer (scot %p p.kon) q.kon] u.huv.sat sam)
|
||||
?: (warm %peek)
|
||||
=+ sam=!>([p.kon q.kon])
|
||||
?> ?=(^ huv.sat)
|
||||
(yawl [%peek (scot %p p.kon) q.kon] u.huv.sat sam)
|
||||
(give(qic.sat ~) %dumb ~)
|
||||
::
|
||||
%take
|
||||
~& %yawn-take
|
||||
?. (warm %pour)
|
||||
+>.$(qic.sat ~)
|
||||
?> ?=(^ huv.sat)
|
||||
%^ game [%step %peck] u.huv.sat
|
||||
:(slop [[%atom %ud] ost] !>((ride use say)) !>(p.kon) q.kon)
|
||||
=+ sam=(slop !>(p.kon) q.kon)
|
||||
%+ ford /s/take
|
||||
[%call (harm %pour (conf (core u.huv.sat))) (cove %$ sam)]
|
||||
==
|
||||
--
|
||||
--
|
||||
|
746
arvo/hoon.hoon
746
arvo/hoon.hoon
File diff suppressed because it is too large
Load Diff
416
arvo/zuse.hoon
416
arvo/zuse.hoon
@ -811,16 +811,17 @@
|
||||
(weld (turn q.i.puy |=(a=miso [p.i.puy a])) $(puy t.puy))
|
||||
::
|
||||
++ alto :: alto:ze
|
||||
|= $: wek=(map path woof)
|
||||
|= $: wek=waks
|
||||
yop=(map path (list miso)) :: yop before peq
|
||||
peq=(map path (list miso))
|
||||
==
|
||||
=+ puy=(~(tap by yop) ~)
|
||||
=+ puy=(~(tap by (~(gas by yop) (~(tap by peq) ~))) ~)
|
||||
|- ^+ [wek peq]
|
||||
?~ puy [wek peq]
|
||||
=+ wof=(~(get by wek) p.i.puy)
|
||||
=+ yoq=(~(get by yop) p.i.puy)
|
||||
=+ peb=(~(get by peq) p.i.puy)
|
||||
=+ lyr=(lyre wof q.i.puy ?~(peb ~ u.peb))
|
||||
=+ lyr=(lyre wof ?~(yoq ~ u.yoq) ?~(peb ~ u.peb))
|
||||
%= $
|
||||
wek ?~(-.lyr wek (~(put by wek) p.i.puy u.-.lyr))
|
||||
puy t.puy
|
||||
@ -832,6 +833,12 @@
|
||||
|* wig=(urge)
|
||||
|= dog=woof
|
||||
^+ [p=dog q=wig]
|
||||
?@ dog
|
||||
!!
|
||||
=+ dog=+.dog
|
||||
=- [[%chan -.res] +.res]
|
||||
^= res
|
||||
|- ^+ [p=dog q=wig]
|
||||
?~ wig :: no more urges
|
||||
=+ woo=(wode dog) :: dimensions
|
||||
?> =(p.woo 0) :: line
|
||||
@ -870,6 +877,14 @@
|
||||
++ lide :: merge dogs
|
||||
|= [wig=woof dog=woof]
|
||||
^- woof
|
||||
?@ dog
|
||||
%know
|
||||
?@ wig
|
||||
%know
|
||||
=+ dog=`(list $|(@ud [p=@ud q=@ud]))`+.dog
|
||||
=+ wig=`(list $|(@ud [p=@ud q=@ud]))`+.dog
|
||||
:- %chan
|
||||
|- ^- (list $|(@ud [p=@ud q=@ud]))
|
||||
?~ dog wig
|
||||
?~ wig dog
|
||||
?^ i.dog
|
||||
@ -907,7 +922,7 @@
|
||||
==
|
||||
:: :: woof dimensions
|
||||
++ wode
|
||||
|= dog=woof
|
||||
|= dog=(list $|(@ud [p=@ud q=@ud]))
|
||||
^- [p=@ q=@]
|
||||
=+ woo=[q=0 q=0]
|
||||
|- ^- [p=@ q=@]
|
||||
@ -923,6 +938,8 @@
|
||||
++ lith :: initial merge points
|
||||
|= wig=(urge)
|
||||
^- woof
|
||||
:- %chan
|
||||
|- ^- (list $|(@ud [p=@ud q=@ud]))
|
||||
?~ wig ~
|
||||
?- -.i.wig
|
||||
& [p.i.wig $(wig t.wig)]
|
||||
@ -933,19 +950,28 @@
|
||||
|= [wof=woof mad=(list miso)]
|
||||
^- [woof (list miso)]
|
||||
?~ mad [wof ~]
|
||||
?. &(?=(%mut -.i.mad) ?=(%c -.q.p.i.mad))
|
||||
=+ rec=$(mad t.mad)
|
||||
?: &(?=(%mut -.i.mad) ?=(%c -.q.p.i.mad))
|
||||
=+ wug=((lisp p.q.p.i.mad) wof)
|
||||
=+ rec=$(mad t.mad, wof p.wug)
|
||||
[-.rec [[%mut [p.p.i.mad [%c q.wug]]] +.rec]]
|
||||
?: ?=(%mut -.i.mad)
|
||||
~| "Cannot generate merge with non textfile changes"
|
||||
!!
|
||||
?: ?=(%del -.i.mad)
|
||||
=+ rec=$(wof %know, mad t.mad)
|
||||
[-.rec [i.mad +.rec]]
|
||||
=+ wug=((lisp p.q.p.i.mad) wof)
|
||||
=+ rec=$(mad t.mad, wof p.wug)
|
||||
[-.rec [[%mut [p.p.i.mad [%c q.wug]]] +.rec]]
|
||||
=+ rec=$(wof %know, mad t.mad)
|
||||
[-.rec [i.mad +.rec]]
|
||||
::
|
||||
++ lobo :: update woof, miso
|
||||
|= [wof=woof don=miso]
|
||||
^- woof
|
||||
?. &(?=(%mut -.don) ?=(%c -.q.p.don))
|
||||
wof
|
||||
(lide wof (lith p.q.p.don))
|
||||
?: &(?=(%mut -.don) ?=(%c -.q.p.don))
|
||||
(lide wof (lith p.q.p.don))
|
||||
?: ?=(%mut -.don)
|
||||
~| "Cannot generate merge with non textfile changes"
|
||||
!!
|
||||
%know
|
||||
::
|
||||
++ lyre :: put yeb before zeq
|
||||
|= [wof=(unit woof) yeb=(list miso) zeq=(list miso)]
|
||||
@ -957,7 +983,10 @@
|
||||
?~ wof
|
||||
?: &(?=(%mut -.i.yeb) ?=(%c -.q.p.i.yeb))
|
||||
$(wof (some (lith p.q.p.i.yeb)), yeb t.yeb)
|
||||
$(yeb t.yeb)
|
||||
?: ?=(%mut -.i.yeb)
|
||||
~| "Cannot generate merge with non textfile changes"
|
||||
!!
|
||||
$(yeb t.yeb, wof (some %know))
|
||||
$(wof (some (lobo u.wof i.yeb)), yeb t.yeb)
|
||||
::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@ -997,8 +1026,8 @@
|
||||
++ arum :: arum:ze
|
||||
|= [wak=waks tak=(list tako) kat=(list tako)] :: hard merge
|
||||
^- [waks (list tako)]
|
||||
=+ alt=(alto (awba wak) (alda tak) (alda kat))
|
||||
[(awoe -.alt) (alot +.alt)]
|
||||
=+ alt=(alto wak (alda tak) (alda kat))
|
||||
[-.alt (alot +.alt)]
|
||||
::
|
||||
++ clen
|
||||
|= [shp=ship des=desk]
|
||||
@ -1040,8 +1069,7 @@
|
||||
%+ turn (scag (sub let p.viq) hit) :: remove excess
|
||||
|=(a=frog q.a)
|
||||
?: &(?=(%fine gem) |(!=(tak ~) !=(r.viq ~)))
|
||||
~| "Changes to local desk, to attempt automatic merge, use %mate"
|
||||
!!
|
||||
~
|
||||
?- gem
|
||||
%fine
|
||||
[~ ~ lem]
|
||||
@ -1049,13 +1077,17 @@
|
||||
=+ tig=(mang [arum r.viq tak kat] |=(* *(unit))) :: moves
|
||||
?@ tig ~
|
||||
=+ res=((hard ,[waks (list tako)]) u.tig)
|
||||
[~ ~ lem(q.q +.res)] ::, t.u.p -.res)] :: update takos, woof
|
||||
[~ ~ lem(q.q +.res, t.u.p -.res)] :: update takos, woof
|
||||
%that
|
||||
=+ tig=(mang [arum r.viq ~ kat] |=(* *(unit)))
|
||||
?~ tig !!
|
||||
[~ ~ lem(q.q (weld (acid p.viq) q.q.lem))]
|
||||
%this
|
||||
=+ tig=(need (mang [arum r.viq tak ~] |=(* *(unit))))
|
||||
=+ typ=((hard ,[waks (list tako)]) tig)
|
||||
[~ ~ lem(q.q ~)] ::, t.u.p -.typ)]
|
||||
[~ ~ lem(q.q ~, t.u.p -.typ)]
|
||||
%conf
|
||||
!!
|
||||
==
|
||||
::
|
||||
++ auto :: auto:ze
|
||||
@ -1092,21 +1124,6 @@
|
||||
:: ~& [%avon p.u.mys q.u.mys [%haz ted] [%too r.u.mys] [%fro s.u.mys]]
|
||||
+>.$(ang ?:(=([0 0 ~] det) (~(del by ang) yek) (~(put by ang) yek det)))
|
||||
::
|
||||
++ awba :: awba:ze
|
||||
|= hoe=(list wako) :: deconstruct
|
||||
|- ^- (map path woof)
|
||||
?~ hoe ~
|
||||
=+ hom=$(hoe t.hoe)
|
||||
(~(put by hom) p.i.hoe q.i.hoe)
|
||||
::
|
||||
++ awoe :: awoe:ze
|
||||
|= yop=(map path woof) :: reconstruct
|
||||
^- (list wako)
|
||||
=+ puy=(~(tap by yop) ~)
|
||||
|- ^- (list wako)
|
||||
?~ puy ~
|
||||
[[p.i.puy q.i.puy] $(puy t.puy)]
|
||||
::
|
||||
++ axel :: axel:ze
|
||||
|= [wen=@da lem=nori] :: edit
|
||||
^+ +>
|
||||
@ -1210,7 +1227,7 @@
|
||||
^+ +>
|
||||
?^ pax
|
||||
dosh:(dose:$(pax t.pax, +> (dent i.pax)) i.pax ank)
|
||||
~| "Failed to apply clay affect"
|
||||
~| %clay-fail
|
||||
?- -.mis
|
||||
%del
|
||||
?> &(?=(^ q.ank) =(q.u.q.ank p.mis))
|
||||
@ -1951,7 +1968,7 @@
|
||||
::
|
||||
++ tome :: parse path
|
||||
|= pax=path
|
||||
^- (unit bead)
|
||||
^- (unit beam)
|
||||
?. ?=([* * * *] pax) ~
|
||||
%+ biff (slaw %p i.pax)
|
||||
|= who=ship
|
||||
@ -1960,10 +1977,10 @@
|
||||
%+ biff (slay i.t.t.pax)
|
||||
|= cis=coin
|
||||
?. ?=([%$ case] cis) ~
|
||||
`(unit bead)`[~ [who dex `case`p.cis] (flop t.t.t.pax)]
|
||||
`(unit beam)`[~ [who dex `case`p.cis] (flop t.t.t.pax)]
|
||||
::
|
||||
++ tope :: bead to path
|
||||
|= bem=bead
|
||||
++ tope :: beam to path
|
||||
|= bem=beam
|
||||
^- path
|
||||
[(scot %p p.bem) q.bem (scot r.bem) (flop s.bem)]
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@ -1992,7 +2009,7 @@
|
||||
++ com |=(a=@ ^?(..nu)) :: from naked pass
|
||||
--
|
||||
--
|
||||
++ agon (map ,[p=ship q=desk] ,[p=@ud q=@ud r=(list wako)]) :: mergepts
|
||||
++ agon (map ,[p=ship q=desk] ,[p=@ud q=@ud r=waks]) :: mergepts
|
||||
++ ankh :: fs node (new)
|
||||
$: p=cash :: recursive hash
|
||||
q=(unit ,[p=cash q=*]) :: file
|
||||
@ -2006,31 +2023,8 @@
|
||||
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
|
||||
== ::
|
||||
== ::
|
||||
++ beau ,[p=(unit ,@ud) q=(map wire goal) r=boor] :: next/want/thread
|
||||
++ beam ,[[p=ship q=desk r=case] s=path] :: global name
|
||||
++ beak ,[p=ship q=desk r=case] :: garnish with beak
|
||||
++ bear ,[p=(map path goal) q=boar] :: thread with slips
|
||||
++ beef :: raw product
|
||||
$: p=(list gilt) :: actions
|
||||
q=(list slip) :: requests
|
||||
r=boar :: state
|
||||
== ::
|
||||
++ beet ,[p=(set bead) q=cage] :: computed result
|
||||
++ bird :: packet in travel
|
||||
$: gom=soap :: message identity
|
||||
mup=@ud :: pktno in msg
|
||||
@ -2038,41 +2032,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
|
||||
++ boar :: execution instance
|
||||
$% [%n p=(unit coal) q=claw r=lath] :: new/ready
|
||||
[%r p=(unit worm)] :: running/done
|
||||
[%t p=coal] :: simple filter
|
||||
== ::
|
||||
++ boor :: new thread
|
||||
$: p=(map ,@ud kite) :: dependencies
|
||||
q=(qeu ,[p=wire q=card]) :: incoming cards
|
||||
r=(qeu ,[p=wire q=nose]) :: pending notes
|
||||
s=boar :: execution
|
||||
== ::
|
||||
++ boat ,[(list slip) tart] :: user stage
|
||||
++ boon :: fort output
|
||||
$% [%beer p=ship q=@uvG] :: gained ownership
|
||||
@ -2083,17 +2042,6 @@
|
||||
[%wine p=sock q=tape] :: notify user
|
||||
== ::
|
||||
++ bowl ,[p=(list gift) q=(unit boat)] :: app product
|
||||
++ brad :: shell state
|
||||
$: who=ship :: identity
|
||||
fog=(list ,@ud) :: virtual consoles
|
||||
hox=@ta :: identity text
|
||||
cwd=@tas :: working desk
|
||||
cws=path :: working spur
|
||||
way=(map ,@tas vase) :: variables
|
||||
hit=[p=@ud q=(list ,@t)] :: command history
|
||||
sur=[p=@ud q=(qeu vase)] :: result history
|
||||
god=[p=@ud q=(map ,@ud task)] :: tasks
|
||||
== ::
|
||||
++ bray ,[p=life q=(unit life) r=ship s=@da] :: our parent us now
|
||||
++ brow ,[p=@da q=@tas] :: browser version
|
||||
++ buck ,[p=mace q=will] :: all security data
|
||||
@ -2102,102 +2050,6 @@
|
||||
$? %good :: delivered
|
||||
%dead :: rejected
|
||||
== ::
|
||||
++ card :: event
|
||||
$% [%bbye ~] :: reset prompt
|
||||
[%band p=ship q=(list rout)] :: internal http bind
|
||||
[%bind p=(unit ship) q=host] :: external http open
|
||||
[%belt p=belt] :: terminal input
|
||||
[%blew p=blew] :: terminal config
|
||||
[%blit p=(list blit)] :: terminal output
|
||||
[%boot p=card] :: christen terminal
|
||||
[%born ~] :: new unix process
|
||||
[%cash p=@p q=buck] :: civil license
|
||||
[%crud p=@tas q=(list tank)] :: error with trace
|
||||
[%deem p=ship q=card] :: external identity
|
||||
[%dire p=@tas q=dram] :: apply directory
|
||||
[%dump p=(list ,@t)] :: raw text lines
|
||||
[%ergo p=@p q=@tas r=@ud] :: version update
|
||||
[%exec p=@p q=(unit silk)] :: make / kill
|
||||
[%file p=@tas q=@] :: apply atomic file
|
||||
[%fail p=tape] :: report failure
|
||||
[%grab ~] :: collect grabage
|
||||
[%hail ~] :: refresh
|
||||
[%hear p=lane q=@] :: receive packet
|
||||
[%hemp p=path] :: cancel request
|
||||
[%helo p=path q=prod] :: trigger prompt
|
||||
[%hole p=lane q=@] :: packet failed
|
||||
[%hoop p=(unit)] :: namespace response
|
||||
[%info p=@p q=@tas r=nori] :: internal edit
|
||||
[%ingo p=@p q=@tas r=nori] :: internal noun edit
|
||||
[%init p=@p] :: report install
|
||||
[%into p=@p q=@tas r=nori] :: external edit
|
||||
[%invo p=@p q=@tas r=nori] :: external noun edit
|
||||
[%flog p=card] :: log to terminal
|
||||
[%junk p=@] :: entropy
|
||||
[%kick p=@da] :: wake up
|
||||
[%kill p=~] :: kill a task
|
||||
[%lane p=lane] :: set public route
|
||||
[%made p=(each beet (list tank))] :: computed result
|
||||
[%nuke p=hasp] :: reset this duct
|
||||
[%line p=@t] :: source line
|
||||
[%limn ~] :: rotate ship
|
||||
[%ling ~] :: rotate interface
|
||||
[%load p=@tas q=path] :: request atomic file
|
||||
[%loin p=@p q=chum] :: name hashed-pass
|
||||
[%logo p=@] :: logout
|
||||
[%loot p=@tas q=path] :: request directory
|
||||
[%make p=(unit ,@t) q=@ud r=@] :: wild license
|
||||
[%mean p=ship q=term r=cuff s=vase] :: application event
|
||||
[%meta p=vase] :: meta-card
|
||||
[%meat p=ship q=card] :: concrete app action
|
||||
[%mess p=hasp q=(disk)] :: urbit message
|
||||
[%mine p=@ud q=@t] :: query matched line
|
||||
[%noop ~] :: no operation
|
||||
[%note p=@tD q=tank] :: debug message
|
||||
[%nuke p=~] :: kill all processes
|
||||
[%pace p=@ud] :: compute background
|
||||
[%pipe p=(unit ,[p=tutu q=(list)])] :: pipeline data
|
||||
[%pour p=path q=dram] :: write directory
|
||||
[%pull p=ship q=desk r=(list desk)] :: pull remote desk
|
||||
[%pump ~] :: produce packets
|
||||
[%quid p=ship q=path r=(unit ,*)] :: delivery
|
||||
[%rein p=? q=path] :: push/replace kernel
|
||||
[%rend ~] :: pop kernel
|
||||
[%rest ~] :: reset to factory
|
||||
[%save p=path q=@] :: write atomic file
|
||||
[%send p=lane q=@] :: transmit packet
|
||||
[%show p=hasp q=(unit hope)] :: urbit subscribe
|
||||
[%sith p=@p q=@uw] :: imperial generator
|
||||
[%soft p=*] :: untyped card
|
||||
[%sync ~] :: reset soft state
|
||||
[%talk p=tank] :: show on console
|
||||
[%tell p=(list ,@t)] :: dump lines
|
||||
[%text p=tape] :: talk leaf
|
||||
[%that p=@ud q=love] :: cooked htresp
|
||||
:: [%thee p=@ud q=scab r=cred s=moth] :: cooked htreq
|
||||
[%them p=(unit hiss)] :: internal client req
|
||||
[%they p=@ud q=httr] :: response to %them
|
||||
[%this p=? q=clip r=httq] :: secure/src/req
|
||||
[%thou p=httr] :: raw http response
|
||||
[%thud ~] :: cancel http request
|
||||
[%thug p=@p q=@p] :: sign in client
|
||||
[%thus p=@ud q=(unit hiss)] :: http request/cancel
|
||||
[%tory p=(list ,@t)] :: history dump
|
||||
[%veer p=@ta q=path r=@t] :: install vane
|
||||
[%vega p=path] :: reboot by path
|
||||
[%volt p=*] :: current kernel
|
||||
[%wait p=@da q=path] :: timer wait
|
||||
[%wake ~] :: timer activate
|
||||
[%waft p=sock q=*] :: response message
|
||||
[%want p=sock q=path r=*] :: send message
|
||||
[%warn p=tape] :: syslog
|
||||
[%warp p=sock q=riff] :: file request
|
||||
[%wart p=sock q=@tas r=path s=*] :: service request
|
||||
[%went p=ship q=cape] :: reaction message
|
||||
[%wipe ~] :: clean to sequence
|
||||
[%word p=chum] :: set password
|
||||
[%writ p=riot] :: response
|
||||
== ::
|
||||
++ cart ,[p=cash q=cash] :: hash change
|
||||
++ care ?(%v %w %x %y %z) :: clay submode
|
||||
++ case :: ship desk case spur
|
||||
@ -2206,7 +2058,7 @@
|
||||
[%ud p=@ud] :: number
|
||||
== ::
|
||||
++ cash ,@uvH :: ankh hash
|
||||
++ cask :: symmetric record
|
||||
++ clot :: symmetric record
|
||||
$: yed=(unit ,[p=hand q=code]) :: outbound
|
||||
heg=(map hand code) :: proposed
|
||||
qim=(map hand code) :: inbound
|
||||
@ -2235,12 +2087,11 @@
|
||||
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
|
||||
== ::
|
||||
++ deed ,[p=@ q=step] :: signature, stage
|
||||
++ deed ,[p=@ q=step r=?] :: sig, stage, fake?
|
||||
++ dome :: project state
|
||||
$: ang=agon :: pedigree
|
||||
ank=ankh :: state
|
||||
@ -2248,11 +2099,10 @@
|
||||
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
|
||||
caq=cask :: symmetric key state
|
||||
caq=clot :: symmetric key state
|
||||
== ::
|
||||
++ dove ,[p=@ud q=(map ,@ud ,@)] :: count hash 13-blocks
|
||||
++ epic :: FCGI parameters
|
||||
@ -2303,12 +2153,12 @@
|
||||
[%th p=@ud q=love] :: http response
|
||||
[%tq p=path q=hiss] :: http request
|
||||
[%va p=@tas q=(unit vase)] :: set/clear variable
|
||||
[%xx p=card] :: return card
|
||||
[%xy p=path q=card] :: push card
|
||||
[%xx p=curd] :: return card
|
||||
[%xy p=path q=curd] :: push card
|
||||
== ::
|
||||
++ gilt ,[@tas *] :: presumed gift
|
||||
++ gens ,[p=lang q=gcos] :: general identity
|
||||
++ germ ?(%fine %that %this %mate) :: merge style
|
||||
++ germ ?(%fine %that %this %mate %conf) :: merge style
|
||||
++ gcos :: id description
|
||||
$% [%czar ~] :: 8-bit ship
|
||||
[%duke p=what] :: 32-bit ship
|
||||
@ -2342,21 +2192,16 @@
|
||||
[%wa p=@da] :: alarm
|
||||
== ::
|
||||
++ govt path :: country/postcode
|
||||
++ gram ,@uw :: physical datagram
|
||||
++ gyro ,[p=@ud q=wire r=prod] :: live prompt
|
||||
++ hand ,@uvH :: hash of code
|
||||
++ hart ,[p=? q=(unit ,@ud) r=host] :: http sec/port/host
|
||||
++ hasp ,[p=ship q=term] :: app identity
|
||||
++ hate ,[p=purl q=@p r=moth] :: semi-cooked request
|
||||
++ heir ,[p=@ud q=mess r=(unit love)] :: status/headers/data
|
||||
++ hiss ,[p=purl q=moth] :: outbound request
|
||||
++ hist ,[p=@ud q=(list ,@t)] :: depth texts
|
||||
++ hole ,@t :: session identity
|
||||
++ hope (pair ,? path) :: view/subscribe
|
||||
++ hook path :: request origin
|
||||
++ hoot ,[p=? q=? r=(unit ,@ud) s=host] :: secure/mapped/host
|
||||
++ hoot ,[p=? q=(unit ,@ud) r=host] :: secure/mapped/host
|
||||
++ hort ,[p=(unit ,@ud) q=host] :: http port/host
|
||||
++ hose ,[p=(list tank) q=(unit vase) r=seam s=heir] :: http environment
|
||||
++ host $%([& p=(list ,@t)] [| p=@if]) :: http host
|
||||
++ httq :: raw http request
|
||||
$: p=meth :: method
|
||||
@ -2371,24 +2216,25 @@
|
||||
r=httq ::
|
||||
== ::
|
||||
++ kite ,[p=care q=case r=ship s=desk t=spur] :: parsed global name
|
||||
++ json :: json top level
|
||||
$% [%a p=(list jval)] :: array
|
||||
[%o p=(map ,@t jval)] :: object
|
||||
++ json :: normal json value
|
||||
$| ~ ::
|
||||
$% [%a p=(list json)] :: array
|
||||
[%b p=?] :: boolean
|
||||
[%o p=(map ,@t json)] :: object
|
||||
[%n p=@ta] :: number
|
||||
[%s p=@ta] :: string
|
||||
== ::
|
||||
++ jval :: json value
|
||||
$| ~ :: null
|
||||
$? json ::
|
||||
$% [%b p=?] :: boolean
|
||||
[%n p=@ta] :: number
|
||||
[%s p=@ta] :: string
|
||||
== ::
|
||||
++ jsot :: strict JSON top
|
||||
$% [%a p=(list json)] :: array
|
||||
[%o p=(map ,@t json)] :: object
|
||||
== ::
|
||||
++ jval json :: XX compatibility
|
||||
++ lamb :: short path
|
||||
$% [& p=@tas] :: auto
|
||||
[| p=twig] :: manual
|
||||
== ::
|
||||
++ lane :: packet route
|
||||
$% [%if p=@ud q=@if] :: IP4/public UDP/addr
|
||||
$% [%if p=@da q=@ud r=@if] :: IP4/public UDP/addr
|
||||
[%is p=@ud q=(unit lane) r=@is] :: IPv6 w/alternates
|
||||
[%ix p=@da q=@ud r=@if] :: IPv4 provisional
|
||||
== ::
|
||||
@ -2447,7 +2293,6 @@
|
||||
++ moar ,[p=@ud q=@ud] :: normal change range
|
||||
++ moat ,[p=case q=case] :: change range
|
||||
++ mood ,[p=care q=case r=path] :: request in desk
|
||||
++ move ,[p=duct q=(mold card card)] :: new move
|
||||
++ moth ,[p=meth q=math r=(unit octs)] :: http operation
|
||||
++ name ,[p=@t q=(unit ,@t) r=(unit ,@t) s=@t] :: first mid/nick last
|
||||
++ newt ?(%boot %kick %mess %slay %wake) :: lifecycle events
|
||||
@ -2500,10 +2345,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
|
||||
@ -2514,40 +2355,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
|
||||
== ::
|
||||
++ sash (pair term (unit hope)) :: web subscribe
|
||||
++ saba ,[p=ship q=@tas r=moar s=(list nori)] :: patch/merge
|
||||
++ sufi :: domestic host
|
||||
$: hoy=(list ship) :: hierarchy
|
||||
@ -2564,20 +2384,6 @@
|
||||
foy=(unit ,[p=ship q=hole]) :: partner to notify
|
||||
pus=(unit ,@ta) :: password
|
||||
== ::
|
||||
++ seam :: logical request
|
||||
$% [%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
|
||||
[%cog p=@ud q=@ud] :: console get
|
||||
[%con p=@ud] :: console face
|
||||
[%cop p=@ud q=@ud r=json] :: console put
|
||||
[%det p=desk q=moat] :: load changes
|
||||
[%fun p=term q=tube r=(list manx)] :: functional
|
||||
[%lon p=seal] :: authentication flow
|
||||
[%red p=purl] :: redirect
|
||||
== ::
|
||||
++ sect ?(%black %blue %red %orange %white) :: banner
|
||||
++ shed :: packet flow
|
||||
$: $: rtt=@dr :: smoothed rtt
|
||||
@ -2598,11 +2404,13 @@
|
||||
== ::
|
||||
++ silk :: construction layer
|
||||
$& [p=silk q=silk] :: cons
|
||||
$% [%bake p=logo q=bead] :: local synthesis
|
||||
[%boil p=logo q=bead] :: general synthesis
|
||||
$% [%bake p=logo q=beam] :: local synthesis
|
||||
[%boil p=logo q=beam] :: general synthesis
|
||||
[%call p=silk q=silk] :: slam
|
||||
[%cast p=logo q=beak r=silk] :: translate
|
||||
[%done p=(set bead) q=cage] :: literal
|
||||
[%done p=(set beam) q=cage] :: literal
|
||||
[%dude p=tank q=silk] :: error wrap
|
||||
[%dune p=(set beam) q=(unit cage)] :: unit literal
|
||||
[%mute p=silk q=(list (pair wing silk))] :: mutant
|
||||
[%pass p=silk q=sill] :: twig construction
|
||||
[%reef ~] :: kernel reef
|
||||
@ -2610,13 +2418,10 @@
|
||||
++ sill :: code construction
|
||||
$% [%0 p=@] :: direct text
|
||||
[%1 p=twig] :: direct twig
|
||||
[%2 p=bead] :: bead over %hoon
|
||||
[%2 p=beam] :: beam over %hoon
|
||||
[%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
|
||||
@ -2635,10 +2440,6 @@
|
||||
++ step ,[p=bray q=gens r=pass] :: identity stage
|
||||
++ tako ,[p=path q=miso] :: change detail
|
||||
++ tart $+([@da path note] bowl) :: process core
|
||||
++ task ::
|
||||
$: paq=(qeu gyro) :: prompt queue
|
||||
wip=[p=@ud q=(map ,@ud beau)] :: processes
|
||||
== ::
|
||||
++ taxi ,[p=lane q=rock] :: routed packet
|
||||
++ tick ,@ud :: process id
|
||||
++ toro ,[p=@ta q=nori] :: general change
|
||||
@ -2646,51 +2447,12 @@
|
||||
$: lit=@ud :: imperial modulus
|
||||
any=@ :: entropy
|
||||
urb=(map ship sufi) :: all keys and routes
|
||||
fak=?
|
||||
== ::
|
||||
++ tube ,[p=@ta q=@ta r=@ta s=path] :: canonical path
|
||||
++ tutu ,* :: presumed type
|
||||
++ vane $_ :: kernel actor
|
||||
|+ $: now=@da ::
|
||||
eny=@ ::
|
||||
ska=$+(* (unit (unit))) :: activate
|
||||
== ::
|
||||
^? |% ::
|
||||
++ call :: update
|
||||
|= $: hen=duct :: channel
|
||||
typ=type :: event type
|
||||
fav=card :: event
|
||||
== ::
|
||||
:- p=*(list move) :: actions
|
||||
q=*vane :: consequence
|
||||
++ doze :: next wakeup
|
||||
|= [now=@da hen=duct] :: channel
|
||||
*(unit ,@da) :: alarm if any
|
||||
++ load :: load state, fresh
|
||||
|= old=vase ::
|
||||
*vane ::
|
||||
++ scry :: inspect
|
||||
|= $: fur=(unit (set monk)) :: observers
|
||||
ren=@tas :: submode
|
||||
who=ship :: target
|
||||
syd=@tas :: project
|
||||
lot=coin :: version
|
||||
tyl=path :: location
|
||||
== ::
|
||||
*(unit (unit)) :: record
|
||||
++ stay *vase :: save state, new
|
||||
++ take :: update
|
||||
|= $: pax=wire :: pretext
|
||||
hen=duct :: cause
|
||||
typ=type :: event type
|
||||
fav=card :: event
|
||||
== ::
|
||||
:- p=*(list move) :: actions
|
||||
q=*vane :: consequence
|
||||
-- ::
|
||||
++ view ?(%u %v %w %x %y %z) :: view mode
|
||||
++ wund (list ,[p=life q=ring r=acru]) :: mace in action
|
||||
++ wako ,[p=path q=woof] :: merge file state
|
||||
++ waks (list wako) :: list file states
|
||||
++ waks (map path woof) :: list file states
|
||||
++ what :: logical identity
|
||||
$% [%anon ~] :: anonymous
|
||||
[%lady p=whom] :: female person ()
|
||||
@ -2698,11 +2460,9 @@
|
||||
[%punk p=sect q=@t] :: opaque handle ""
|
||||
== ::
|
||||
++ whom ,[p=@ud q=govt r=sect s=name] :: year/govt/id
|
||||
++ woof $| %know :: udon transform
|
||||
[%chan (list $|(@ud [p=@ud q=@ud]))] ::
|
||||
++ 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
|
||||
== ::
|
||||
--
|
||||
|
37
main/app/appbug-2/core.hoon
Normal file
37
main/app/appbug-2/core.hoon
Normal file
@ -0,0 +1,37 @@
|
||||
!: |= *
|
||||
::::::::: Foobug: a simple application.
|
||||
::
|
||||
|_ [hid=hide vat=[%0 p=@ud]]
|
||||
++ poke
|
||||
|= [ost=bone *]
|
||||
:_ +>(p.vat +(p.vat))
|
||||
:~ [ost %give %rasp ~ %json *json]
|
||||
==
|
||||
::
|
||||
++ peek
|
||||
|= [you=ship pax=path]
|
||||
:- %hymn
|
||||
^- manx
|
||||
;html
|
||||
;head
|
||||
;title: Foobug!
|
||||
==
|
||||
;body
|
||||
;p: Dude, a better answer is {<p.vat>}.
|
||||
;button(onclick "bump()"): (bump.)
|
||||
;script
|
||||
; var mess = 0;
|
||||
;
|
||||
; function bump() {
|
||||
; xhr = new XMLHttpRequest();
|
||||
; xhr.onload = function() { mess++; }
|
||||
; xhr.open("PUT", "/tim/"+user+"/"+appl+"/"+port+"/"+mess);
|
||||
; xhr.setRequestHeader("content-type", "text/json");
|
||||
; xhr.send(JSON.stringify({oryx: oryx, xyro: {}}));
|
||||
; }
|
||||
==
|
||||
==
|
||||
==
|
||||
--
|
||||
|
||||
|
104
main/app/foobug/core.hoon
Normal file
104
main/app/foobug/core.hoon
Normal file
@ -0,0 +1,104 @@
|
||||
!:
|
||||
=> |%
|
||||
++ axle
|
||||
$% [%0 p=@ud]
|
||||
==
|
||||
++ gult
|
||||
$% [%json p=json]
|
||||
:: [%hymn p=manx]
|
||||
==
|
||||
++ gilt
|
||||
$% :: [%json p=json]
|
||||
[%hymn p=manx]
|
||||
==
|
||||
++ gift
|
||||
$% [%rust gilt]
|
||||
[%rasp gult]
|
||||
==
|
||||
++ move ,[p=bone q=[%give p=gift]]
|
||||
--
|
||||
|= *
|
||||
|_ [hid=hide vat=axle]
|
||||
++ page
|
||||
^- manx
|
||||
;html
|
||||
;head
|
||||
;title: Foobug!
|
||||
==
|
||||
;body
|
||||
;p: Word: {<p.vat>}.
|
||||
;button(onclick "goof()"): Goof!
|
||||
;script
|
||||
; var c = 0;
|
||||
; var d = 1;
|
||||
; var x = 0;
|
||||
;
|
||||
; function pickup() {
|
||||
; xhr = new XMLHttpRequest();
|
||||
;
|
||||
; console.log("WTF???");
|
||||
; xhr.open("GET", "/zod/goe/foobug/"+port+"/frog/"+d);
|
||||
; xhr.onload = function() {
|
||||
; console.log("pickup");
|
||||
; console.log(this)
|
||||
; change(JSON.parse(this.responseText))
|
||||
; update();
|
||||
; d++;
|
||||
; pickup();
|
||||
; }
|
||||
; xhr.send();
|
||||
; }
|
||||
;
|
||||
; function dude() {
|
||||
; xhr = new XMLHttpRequest();
|
||||
;
|
||||
; xhr.open("POST", "/zod/pos/foobug/"+port+"/frog/goof");
|
||||
; xhr.setRequestHeader("content-type", "text/json")
|
||||
; xhr.onload = function() {
|
||||
; console.log("dude");
|
||||
; console.log(this)
|
||||
; change(JSON.parse(this.responseText))
|
||||
; update();
|
||||
; pickup();
|
||||
; }
|
||||
; xhr.send("{\"a\":1}")
|
||||
; }
|
||||
; dude();
|
||||
;
|
||||
; function change(jon) {
|
||||
; x = jon.x;
|
||||
; }
|
||||
;
|
||||
; function update() {
|
||||
; document.getElementsByTagName("p")[0].innerHTML = "WORD: " + x;
|
||||
; }
|
||||
;
|
||||
; function goof() {
|
||||
; xhr = new XMLHttpRequest();
|
||||
; xhr.onload = function() {
|
||||
; console.log("hi");
|
||||
; console.log(arguments)
|
||||
; c++
|
||||
; }
|
||||
; xhr.open("POST",
|
||||
; "/zod/pom/foobug/"+port+"/"+c)
|
||||
; xhr.setRequestHeader("content-type", "text/json")
|
||||
; xhr.send("{\"a\":1}")
|
||||
; }
|
||||
==
|
||||
==
|
||||
==
|
||||
::
|
||||
++ peer
|
||||
|= [ost=bone you=ship pax=path]
|
||||
^- [(list move) _+>]
|
||||
[[ost %give %rust %hymn page]~ +>]
|
||||
::
|
||||
++ poke-json
|
||||
|= [ost=bone you=ship jon=json]
|
||||
^- [(list move) _+>]
|
||||
~& [%poke [%state p.vat] ost you jon]
|
||||
:_ +>(p.vat +(p.vat))
|
||||
:~ [ost %give %rasp %json jon]
|
||||
==
|
||||
--
|
45
main/app/philbug/app.js
Normal file
45
main/app/philbug/app.js
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
window.onload = function() {
|
||||
var data = {}
|
||||
|
||||
change = function(_data) {
|
||||
for(i in _data) {
|
||||
data[i] = _data[i]
|
||||
}
|
||||
}
|
||||
|
||||
update = function() {
|
||||
for (var i in data) {
|
||||
if ($('#'+i).length < 1) {
|
||||
var e = document.createElement('tr')
|
||||
e.id = i
|
||||
$('#cont tbody').append(e)
|
||||
}
|
||||
$('#'+i).html("<td>~"+i+"</td><td>"+data[i]+"</td>")
|
||||
}
|
||||
$('#cont tbody').append([].sort.call($('#cont tr'), function (a, b) {
|
||||
return parseInt(b.childNodes[1].innerText) -
|
||||
parseInt(a.childNodes[1].innerText)
|
||||
}))
|
||||
}
|
||||
|
||||
goof = function(e) {
|
||||
d = $.map($(".sel"), function(el) {return el.id})
|
||||
window.urb.send(d)
|
||||
}
|
||||
|
||||
window.urb.send(null);
|
||||
window.urb.subscribe("frog","goof", function(err,res) {
|
||||
if(err)
|
||||
return console.log('cannot connect to frog/goof')
|
||||
change(res.data)
|
||||
update()
|
||||
|
||||
return true
|
||||
})
|
||||
|
||||
$('#cont').on('click', 'tr', function (e) {
|
||||
if (!e.ctrlKey) { $('.sel').removeClass('sel') }
|
||||
$(this).addClass('sel')
|
||||
})
|
||||
}
|
117
main/app/philbug/core.hoon
Normal file
117
main/app/philbug/core.hoon
Normal file
@ -0,0 +1,117 @@
|
||||
!:
|
||||
=> |%
|
||||
++ axle
|
||||
$% [%0 p=(map ,@p ,@ud)]
|
||||
==
|
||||
++ gilt
|
||||
$% [%json p=json]
|
||||
[%hymn p=manx]
|
||||
==
|
||||
++ gift
|
||||
$% [%rust gilt]
|
||||
[%rasp gilt]
|
||||
==
|
||||
++ move ,[p=bone q=[%give p=gift]]
|
||||
++ phil
|
||||
$% [%new ~]
|
||||
[%add p=(list ,@p)]
|
||||
==
|
||||
--
|
||||
|= *
|
||||
|_ [hid=hide vat=axle]
|
||||
++ incl
|
||||
|= wal=wall
|
||||
%+ turn wal
|
||||
|= tape ;script(type "text/javascript", src +<);
|
||||
::
|
||||
++ root
|
||||
/(scot %p our.hid)/main/(scot %da lat.hid)/app/[app.hid]
|
||||
::
|
||||
++ respond :: respond to message
|
||||
|= ost=bone
|
||||
`move`[ost %give %rasp %json *json]
|
||||
::
|
||||
++ update :: update subscribers
|
||||
^- (list move)
|
||||
%+ turn
|
||||
^- (list bone)
|
||||
%+ ~(rep by sup.hid) *(list bone)
|
||||
|= [p=[p=bone q=[ship path]] q=(list bone)] ^- (list bone)
|
||||
?. =(/goof +.q.p) q
|
||||
[p.p q]
|
||||
send-vat
|
||||
::
|
||||
++ render
|
||||
^- manx
|
||||
;html
|
||||
;head
|
||||
;title: Foobug!
|
||||
;style
|
||||
; .sel {background: lightgray}
|
||||
; #cont {border-collapse: collapse}
|
||||
==
|
||||
;* %- incl :~
|
||||
"//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"
|
||||
==
|
||||
;script ;- (trip ;;(,@ .^(%cx (welp root /urb/js))))
|
||||
==
|
||||
;script ;- (trip ;;(,@ .^(%cx (welp root /app/js))))
|
||||
==
|
||||
==
|
||||
;body
|
||||
;p: Yo.
|
||||
;table#cont:tbody;
|
||||
;p: Select a ship
|
||||
;button(onclick "goof()"): Give 5 points
|
||||
==
|
||||
==
|
||||
::
|
||||
++ peer
|
||||
|= [ost=bone you=ship pax=path]
|
||||
^- [(list move) _+>]
|
||||
:_ +>
|
||||
?: =(/ pax)
|
||||
[ost %give %rust %hymn render]~
|
||||
[(send-vat ost) ~]
|
||||
::
|
||||
++ poke-phil
|
||||
|= [ost=bone you=ship pil=phil]
|
||||
=. p.vat
|
||||
?- -.pil
|
||||
%new (~(put by p.vat) you (fall (~(get by p.vat) you) _@ud))
|
||||
%add %- ~(urn by p.vat)
|
||||
|= [u=@p n=@ud]
|
||||
?. (lien p.pil |=(a=@p =(a u)))
|
||||
n
|
||||
(add 5 n)
|
||||
==
|
||||
[[(respond ost) update] +>.$]
|
||||
::
|
||||
++ poke-json
|
||||
|= [ost=bone you=ship jon=json]
|
||||
~& [%poke-json jon]
|
||||
%^ poke-phil ost you
|
||||
^- phil
|
||||
?+ -.jon !!
|
||||
%o [%new ~]
|
||||
%a :- %add
|
||||
%+ turn p.jon
|
||||
|= a=json
|
||||
?> ?=([%s *] a)
|
||||
(slav %p (cat 3 '~' p.a))
|
||||
==
|
||||
::
|
||||
++ send-vat
|
||||
|= ost=bone
|
||||
=+ luz=(~(tap by p.vat) ~)
|
||||
^- move
|
||||
:* ost %give %rust %json %o
|
||||
^- (map ,@t jval)
|
||||
%- mo
|
||||
%+ turn luz
|
||||
|= [a=@p b=@ud]
|
||||
:- (rsh 3 1 (scot %p a))
|
||||
:- %n
|
||||
(rsh 3 2 (scot %ui b))
|
||||
==
|
||||
--
|
111
main/app/philbug/urb.js
Normal file
111
main/app/philbug/urb.js
Normal file
@ -0,0 +1,111 @@
|
||||
window.urb = {
|
||||
ship: ship,
|
||||
port: port,
|
||||
auto: auto,
|
||||
oryx: oryx,
|
||||
user: user,
|
||||
appn: appn,
|
||||
seqn: 0,
|
||||
seqp: 1,
|
||||
dely: 0,
|
||||
|
||||
req: function(method,url,data,json,cb) {
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.open(method.toUpperCase(), url)
|
||||
if(json)
|
||||
xhr.setRequestHeader("content-type", "text/json")
|
||||
if(data)
|
||||
xhr.send(JSON.stringify(data))
|
||||
else
|
||||
xhr.send()
|
||||
if(cb) {
|
||||
xhr.onload = function() {
|
||||
cb(null,{
|
||||
"status":this.status,
|
||||
"data":JSON.parse(this.responseText)
|
||||
})
|
||||
}
|
||||
xhr.onerror = function() {
|
||||
cb({
|
||||
"status":this.status,
|
||||
"data":this.responseText
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
subscribe: function(stream,path,cb) {
|
||||
if(!cb)
|
||||
throw new Error("You must supply a callback to urb.subscribe.")
|
||||
|
||||
var method, perm, url, $this
|
||||
|
||||
method = "post"
|
||||
perm = "pis"
|
||||
url = [this.ship,perm,this.user,this.appn,this.port]
|
||||
if(stream) {
|
||||
url.push(stream)
|
||||
if(path)
|
||||
url.push(path)
|
||||
}
|
||||
url = "/"+url.join("/")
|
||||
|
||||
|
||||
$this = this
|
||||
this.req(method,url,{},true,function(err,data) {
|
||||
cb.apply(this,arguments)
|
||||
if(!err) { $this.poll(stream,cb); }
|
||||
})
|
||||
},
|
||||
|
||||
send: function(data,cb) {
|
||||
if(!data) { data = {}; }
|
||||
if(!cb) { cb = function() {}; }
|
||||
|
||||
var method, perm, url, $this
|
||||
|
||||
method = "post"
|
||||
perm = "pim"
|
||||
url = [this.ship,perm,this.user,this.appn,this.port,this.seqn]
|
||||
url = "/"+url.join("/")
|
||||
|
||||
this.seqn++
|
||||
|
||||
$this = this
|
||||
this.req(method,url,data,true,function(err,data) {
|
||||
if(err) { $this.seqn--; }
|
||||
cb.apply(this,arguments)
|
||||
})
|
||||
},
|
||||
|
||||
poll: function(stream,cb) {
|
||||
if(!stream)
|
||||
throw new Error("You must supply a stream to urb.poll.")
|
||||
if(!cb)
|
||||
throw new Error("You must supply a callback to urb.poll.")
|
||||
|
||||
var method, perm, url, $this
|
||||
|
||||
method = "get"
|
||||
perm = "gie"
|
||||
if(!stream) { return false; }
|
||||
url = [this.ship,perm,this.user,this.appn,this.port,stream,this.seqp]
|
||||
url = "/"+url.join("/")
|
||||
|
||||
$this = this
|
||||
this.req(method,url,null,false,function(err,data) {
|
||||
if(cb.apply(this,arguments) === false) { return; }
|
||||
|
||||
if(err)
|
||||
$this.dely += 1000
|
||||
else {
|
||||
$this.dely = 0
|
||||
$this.seqp++
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
$this.poll(stream,cb)
|
||||
},$this.dely)
|
||||
})
|
||||
}
|
||||
}
|
@ -188,6 +188,6 @@
|
||||
:~ [%la %leaf "request rejected - invalid ticket"]
|
||||
==
|
||||
:~ [%la %leaf "request approved"]
|
||||
[%xy /a `card`[%cash mig mac u.wil]]
|
||||
[%xy /a [%cash mig mac u.wil]]
|
||||
==
|
||||
--
|
||||
|
@ -1,8 +0,0 @@
|
||||
::
|
||||
:: /=main=/bin/tach/hoon
|
||||
::
|
||||
|= *
|
||||
|= ~
|
||||
^- bowl
|
||||
:_ ~ :_ ~
|
||||
[%la %leaf "you probably meant to run :chat."]
|
@ -15,7 +15,7 @@
|
||||
?~ lum
|
||||
^- gift
|
||||
:+ %la %leaf
|
||||
"{(trip des)} failed to merge, please rerun with a merge option"
|
||||
"{(trip des)} failed to apply, please rerun with a merge option"
|
||||
?~ u.lum
|
||||
`gift`[%la %leaf "{(trip des)} is up to date"]
|
||||
`gift`[%ok des u.u.lum]
|
||||
|
8
main/bin/verb.hoon
Normal file
8
main/bin/verb.hoon
Normal file
@ -0,0 +1,8 @@
|
||||
!:
|
||||
:: /=main=/bin/verb/hoon
|
||||
::
|
||||
=> .(-< `who=@p`-<)
|
||||
|= [est=time *]
|
||||
|= ~
|
||||
^- bowl
|
||||
[[%xx %verb ~]~ ~]
|
3
main/sys/hoon/ref/gate.hoon
Normal file
3
main/sys/hoon/ref/gate.hoon
Normal file
@ -0,0 +1,3 @@
|
||||
|= rem=spur
|
||||
~& [%html rem]
|
||||
,@
|
2
main/sys/html/ref/gate.hoon
Normal file
2
main/sys/html/ref/gate.hoon
Normal file
@ -0,0 +1,2 @@
|
||||
|= *
|
||||
,@
|
4
main/sys/html/tan/mime/gate.hoon
Normal file
4
main/sys/html/tan/mime/gate.hoon
Normal file
@ -0,0 +1,4 @@
|
||||
!:
|
||||
|= *
|
||||
|= htm=@
|
||||
[/text/html (met 3 htm) htm]
|
1
main/sys/hymn/ref/gate.hoon
Normal file
1
main/sys/hymn/ref/gate.hoon
Normal file
@ -0,0 +1 @@
|
||||
manx
|
4
main/sys/hymn/tan/html/gate.hoon
Normal file
4
main/sys/hymn/tan/html/gate.hoon
Normal file
@ -0,0 +1,4 @@
|
||||
!:
|
||||
|= *
|
||||
|= man=manx
|
||||
(crip (xmlt | man ~))
|
4
main/sys/hymn/tan/mime/gate.hoon
Normal file
4
main/sys/hymn/tan/mime/gate.hoon
Normal file
@ -0,0 +1,4 @@
|
||||
|= *
|
||||
|= man=manx
|
||||
=+ htm=(crip (xmlt | man ~))
|
||||
[/text/html (met 3 htm) htm]
|
1
main/sys/json/ref/gate.hoon
Normal file
1
main/sys/json/ref/gate.hoon
Normal file
@ -0,0 +1 @@
|
||||
json
|
4
main/sys/json/tan/mime/gate.hoon
Normal file
4
main/sys/json/tan/mime/gate.hoon
Normal file
@ -0,0 +1,4 @@
|
||||
|= *
|
||||
|= jon=json
|
||||
=+ txt=(crip (pojo jon))
|
||||
[/text/json (met 3 txt) txt]
|
1
main/sys/md/ref/gate.hoon
Normal file
1
main/sys/md/ref/gate.hoon
Normal file
@ -0,0 +1 @@
|
||||
|=(* ,@)
|
342
main/sys/md/tan/html/gate.hoon
Normal file
342
main/sys/md/tan/html/gate.hoon
Normal file
@ -0,0 +1,342 @@
|
||||
!:
|
||||
|= *
|
||||
=> %= .
|
||||
+
|
||||
=> +
|
||||
=>
|
||||
|%
|
||||
++ down
|
||||
$& [p=down q=down]
|
||||
$% [%$ p=tape]
|
||||
[%code p=tape]
|
||||
[%inco p=tape]
|
||||
[%head p=haxe q=down]
|
||||
[%link p=tape q=tape r=(unit tape)]
|
||||
[%lord p=(list down)]
|
||||
[%lund p=(list down)]
|
||||
[%parg p=down]
|
||||
[%quot p=down]
|
||||
[%rong p=down]
|
||||
[%emph p=down]
|
||||
[%hrul ~]
|
||||
[%html p=tape]
|
||||
==
|
||||
++ haxe
|
||||
|= a=*
|
||||
?@ a
|
||||
?:(&(!=(0 a) (lth a 6)) a 6)
|
||||
6
|
||||
--
|
||||
|%
|
||||
++ cott
|
||||
;~ pose
|
||||
(shim 0 8)
|
||||
(shim 11 37)
|
||||
(shim 39 59)
|
||||
(just `@`61)
|
||||
(shim 63 95)
|
||||
(shim 97 255)
|
||||
==
|
||||
++ copt
|
||||
;~ pose
|
||||
(shim 0 9)
|
||||
(shim 11 37)
|
||||
(shim 39 39)
|
||||
(shim 43 59)
|
||||
(just `@`61)
|
||||
(shim 63 90)
|
||||
(shim 94 94)
|
||||
(shim 97 255)
|
||||
==
|
||||
++ urlc ;~(pose (shim 0 9) (shim 11 31) (shim 33 39) (shim 42 255))
|
||||
++ uctt ;~(pose (shim 0 9) (shim 11 91) (shim 94 255))
|
||||
++ uctc ;~(pose (shim 0 9) (shim 11 33) (shim 35 39) (shim 42 255))
|
||||
++ htmc ;~(pose (shim 0 9) (shim 11 255))
|
||||
++ escp (mask "\\`*_\{}[]()#+-.!")
|
||||
++ escd ;~(pfix bas escp)
|
||||
++ whit (mask (tape 9 32 ~))
|
||||
++ dent ;~(pose (jest ' ') (just `@`9))
|
||||
++ blan (cold ~ ;~(plug (star whit) (just `@`10)))
|
||||
++ mcat (bend |=([a=tape b=tape] (some (weld a b))))
|
||||
++ wcat |*(a=_rule (cook |=([a=tape b=tape] (weld a b)) a))
|
||||
++ codt
|
||||
%+ knee *tape |. ~+
|
||||
;~ pose
|
||||
(wcat ;~(plug (plus cott) codt))
|
||||
(cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose codt (easy ~))))
|
||||
(cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose codt (easy ~))))
|
||||
(cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose codt (easy ~))))
|
||||
(plus cott)
|
||||
==
|
||||
++ inlt
|
||||
%+ knee *tape |. ~+
|
||||
;~ pose
|
||||
;~(mcat (plus copt) inlt)
|
||||
;~(mcat (plus escd) inlt)
|
||||
;~ mcat
|
||||
%- wcat
|
||||
;~ plug
|
||||
;~(plug gal (cook trip inle))
|
||||
;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar)
|
||||
==
|
||||
inlt
|
||||
==
|
||||
;~ mcat
|
||||
%- wcat
|
||||
;~ plug
|
||||
;~(plug gal fas (cook trip inle))
|
||||
;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar)
|
||||
==
|
||||
inlt
|
||||
==
|
||||
;~ mcat
|
||||
(wcat ;~(plug ;~(plug pam hax ;~(sfix (plus nud) sem)) (easy ";")))
|
||||
inlt
|
||||
==
|
||||
;~ mcat
|
||||
(wcat ;~(plug ;~(plug pam ;~(sfix (plus alf) sem)) (easy ";")))
|
||||
inlt
|
||||
==
|
||||
(cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose inlt (easy ~))))
|
||||
(cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose inlt (easy ~))))
|
||||
(cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose inlt (easy ~))))
|
||||
==
|
||||
++ kite
|
||||
|= bud=(list ,@t)
|
||||
|= tub=nail
|
||||
|- ^- (like ,@t)
|
||||
?@ bud
|
||||
(fail tub)
|
||||
=+ foo=((jest i.bud) tub)
|
||||
?~ q.foo
|
||||
$(bud t.bud)
|
||||
foo
|
||||
++ bloc
|
||||
%+ knee *@t |. ~+
|
||||
%- kite
|
||||
:~ '<address>' '<article>' '<aside>' '<audio>' '<blockquote>'
|
||||
'<canvas>' '<dd>' '<div>' '<dl>' '<fieldset>' '<figcaption>'
|
||||
'<figure>' '<footer>' '<form>' '<h1>' '<h2>' '<h3>' '<h4>'
|
||||
'<h5>' '<h6>' '<header>' '<hgroup>' '<hr>' '<noscript>'
|
||||
'<ol>' '<output>' '<p>' '<pre>' '<section>' '<table>'
|
||||
'<tfoot>' '<ul>' '<video>' '<style>'
|
||||
==
|
||||
++ inle
|
||||
%+ knee *@t |. ~+
|
||||
%- kite
|
||||
:~ 'b' 'big' 'i' 'small' 'tt' 'abbr' 'acronym'
|
||||
'cite' 'code' 'dfn' 'em' 'kbd' 'strong' 'samp'
|
||||
'var' 'a' 'bdo' 'br' 'img' 'map' 'object' 'q'
|
||||
'script' 'span' 'sub' 'sup' 'button' 'input'
|
||||
'label' 'select' 'textarea' 'link'
|
||||
==
|
||||
++ htmb
|
||||
%+ knee *tape |. ~+
|
||||
%+ cook |=(a=(list tape) (reel a |=([p=tape q=tape] (weld p q))))
|
||||
(plus (cook |=(a=tape (weld a "\0a")) ;~(sfix (plus htmc) (just '\0a'))))
|
||||
++ blok
|
||||
%+ knee *tape |. ~+
|
||||
%+ cook |=(a=[tape tape] (weld a))
|
||||
;~(plug (cook trip bloc) ;~(plug (just '\0a') htmb))
|
||||
++ intt
|
||||
%+ knee *down |. ~+
|
||||
;~ pose
|
||||
(ifix [(jest '**') (jest '**')] (stag %rong intt))
|
||||
(ifix [(jest '__') (jest '__')] (stag %rong intt))
|
||||
(ifix [tar tar] (stag %emph intt))
|
||||
(ifix [cab cab] (stag %emph intt))
|
||||
(ifix [tec tec] (stag %inco codt))
|
||||
(stag %$ inlt)
|
||||
link
|
||||
(stag %$ ;~(plug tar (easy ~)))
|
||||
(stag %$ ;~(plug cab (easy ~)))
|
||||
(stag %$ ;~(plug pel (easy ~)))
|
||||
(stag %$ ;~(plug per (easy ~)))
|
||||
(stag %$ ;~(plug sel (easy ~)))
|
||||
(stag %$ ;~(plug ser (easy ~)))
|
||||
==
|
||||
++ inli
|
||||
|= tub=nail
|
||||
^- (like down)
|
||||
?~ q.tub
|
||||
(fail tub)
|
||||
?: |(=(i.q.tub 10) =(i.q.tub '>'))
|
||||
(fail tub)
|
||||
=+ ^= foo
|
||||
;~ pose
|
||||
dent
|
||||
;~(plug (mask "+*-") (plus whit))
|
||||
;~(plug dim:ag dot (plus whit))
|
||||
==
|
||||
=+ bar=(foo tub)
|
||||
?~ q.bar
|
||||
%-
|
||||
%+ cook |=(a=(list down) (reel a |=([p=down q=down] [p q])))
|
||||
;~(sfix (plus intt) (just `@`10))
|
||||
tub
|
||||
(fail tub)
|
||||
++ parg
|
||||
|= [a=@ b=@]
|
||||
%+ knee *down |. ~+
|
||||
;~ plug
|
||||
inli
|
||||
%+ cook |=(a=(list down) (reel a |=([p=down q=down] [p q])))
|
||||
(plus ;~(plug (easy [%$ "\0a"]) (colk a b inli)))
|
||||
==
|
||||
++ link
|
||||
%+ knee *down |. ~+
|
||||
%+ stag %link
|
||||
;~ plug
|
||||
(ifix [sel ser] (plus ;~(pose uctt escd)))
|
||||
;~(pfix pel (star ;~(pose urlc escd)))
|
||||
;~ pose
|
||||
%+ cook |=(a=tape (some a))
|
||||
(ifix [ace per] (ifix [doq doq] (plus ;~(pose uctc escd))))
|
||||
(cold ~ per)
|
||||
==
|
||||
==
|
||||
++ barg
|
||||
|= a=@
|
||||
%+ knee *haxe |. ~+
|
||||
;~ pfix (stun [a a] (jest '> '))
|
||||
;~ pose
|
||||
(cold 1 ;~(plug (plus tis) (star whit) (just `@`10)))
|
||||
(cold 2 ;~(plug (plus hep) (star whit) (just `@`10)))
|
||||
==
|
||||
==
|
||||
++ neck
|
||||
%+ knee *[haxe down] |. ~+
|
||||
;~ pose
|
||||
;~(pfix (jest '######') (stag 6 ;~(pfix (star whit) inli)))
|
||||
;~(pfix (jest '#####') (stag 5 ;~(pfix (star whit) inli)))
|
||||
;~(pfix (jest '####') (stag 4 ;~(pfix (star whit) inli)))
|
||||
;~(pfix (jest '###') (stag 3 ;~(pfix (star whit) inli)))
|
||||
;~(pfix (jest '##') (stag 2 ;~(pfix (star whit) inli)))
|
||||
;~(pfix (jest '#') (stag 1 ;~(pfix (star whit) inli)))
|
||||
==
|
||||
++ mark
|
||||
|= p=tape
|
||||
(scan p park)
|
||||
++ hrul
|
||||
%+ knee *down |. ~+
|
||||
%+ sear
|
||||
|=(a=(list tape) ?:((gte (lent (zing a)) 3) (some [%hrul ~]) ~))
|
||||
;~ sfix
|
||||
(more (star whit) ;~(pose (plus cab) (plus tar) (plus hep)))
|
||||
(just `@`10)
|
||||
==
|
||||
++ colk
|
||||
|* [a=@ b=@ fel=_rule]
|
||||
;~(pfix (stun [a a] (jest '> ')) (stun [b b] dent) fel)
|
||||
++ code
|
||||
|= [a=@ b=@]
|
||||
%+ knee *tape |. ~+
|
||||
%+ cook weld
|
||||
;~ plug
|
||||
(ifix [dent (just '\0a')] codt)
|
||||
%+ cook |=(a=(list tape) (reel a |=([p=tape q=tape] (weld p q))))
|
||||
%- star
|
||||
;~(plug (easy '\0a') (colk a b (ifix [dent (just '\0a')] codt)))
|
||||
==
|
||||
++ lelm
|
||||
|= [a=@ b=@]
|
||||
%+ knee *down |. ~+
|
||||
;~ pose
|
||||
inli
|
||||
hrul
|
||||
;~(pfix (just `@`10) (lmel a b))
|
||||
==
|
||||
++ lmel
|
||||
|= [a=@ b=@]
|
||||
%+ knee *down |. ~+
|
||||
;~ pose
|
||||
;~((bend) (stag %lund (plus (lulm a b))) (lmel a b))
|
||||
;~((bend) (stag %lord (plus (lolm a b))) (lmel a b))
|
||||
;~((bend) (stag %code (colk a b (code a b))) (lmel a b))
|
||||
;~((bend) (stag %head (colk a b neck)) (lmel a b))
|
||||
;~((bend) (stag %parg (colk a b (parg a b))) (lmel a b))
|
||||
(colk a b inli)
|
||||
(colk a b hrul)
|
||||
;~(pfix (plus (colk a b blan)) (lmel a b))
|
||||
==
|
||||
++ lulm
|
||||
|= [a=@ b=@]
|
||||
%+ knee *down |. ~+
|
||||
(colk a b ;~(pfix (mask "+*-") (plus whit) (lelm a +(b))))
|
||||
++ lolm
|
||||
|= [a=@ b=@]
|
||||
%+ knee *down |. ~+
|
||||
(colk a b ;~(pfix dim:ag dot (plus whit) (lelm a +(b))))
|
||||
++ bark
|
||||
|= a=@
|
||||
%+ knee *down |. ~+
|
||||
;~ pose
|
||||
(stag %html blok)
|
||||
(stag %lund (plus (lulm a 0)))
|
||||
(stag %lord (plus (lolm a 0)))
|
||||
(stag %code (colk a 0 (code a 0)))
|
||||
(stag %head (colk a 0 neck))
|
||||
%+ cook |=([a=down b=haxe] [%head b a])
|
||||
(colk a 0 ;~(plug inli (barg a)))
|
||||
(colk a 0 hrul)
|
||||
(stag %parg (colk a 0 (parg a 0)))
|
||||
(colk a 0 inli)
|
||||
(cold [%$ ""] (colk a 0 (plus blan)))
|
||||
==
|
||||
++ dark
|
||||
|= a=@
|
||||
%+ knee *down |. ~+
|
||||
|= tub=nail
|
||||
^- (like down)
|
||||
=+ vex=((cook lent (star (jest '> '))) tub)
|
||||
?~ q.vex
|
||||
vex
|
||||
?: (lth p.u.q.vex a)
|
||||
(fail tub)
|
||||
?: (gth p.u.q.vex a)
|
||||
(;~((bend) (stag %quot (dark +(a))) (dark a)) tub)
|
||||
(;~((bend) (bark a) (dark a)) tub)
|
||||
++ park
|
||||
%+ knee *down |. ~+
|
||||
%+ cook |=(a=(list down) (reel a |=([p=down q=down] [p q])))
|
||||
;~(sfix (plus (dark 0)) (star blan))
|
||||
++ appd
|
||||
|= [p=@ q=@]
|
||||
^- @
|
||||
(cat 3 p q)
|
||||
++ wtag
|
||||
|= [a=@ b=@]
|
||||
^- @
|
||||
:(appd '<' a '>' b '</' a '>')
|
||||
++ sett
|
||||
|= [a=@ b=tape]
|
||||
^- @
|
||||
:(appd a '="' (rap 3 b) '"')
|
||||
++ hark
|
||||
|= a=down
|
||||
^- @
|
||||
?- a
|
||||
[%$ *] (rap 3 p.a)
|
||||
[%code *] (wtag 'pre' (wtag 'code' (rap 3 p.a)))
|
||||
[%inco *] (wtag 'code' (rap 3 p.a))
|
||||
[%head *] (wtag (cat 3 'h' (add '0' p.a)) (hark q.a))
|
||||
[%link *]
|
||||
?~ r.a
|
||||
:(appd '<a ' (sett 'href' q.a) '>' (rap 3 p.a) '</a>')
|
||||
:(appd '<a ' (sett 'href' q.a) ' ' (sett 'title' u.r.a) '>' (rap 3 p.a) '</a>')
|
||||
[%lord *] (wtag 'ol' (reel (turn p.a |=(a=down (wtag 'li' (hark a)))) appd))
|
||||
[%lund *] (wtag 'ul' (reel (turn p.a |=(a=down (wtag 'li' (hark a)))) appd))
|
||||
[%parg *] (wtag 'p' (hark p.a))
|
||||
[%quot *] (wtag 'blockquote' (hark p.a))
|
||||
[%rong *] (wtag 'strong' (hark p.a))
|
||||
[%emph *] (wtag 'em' (hark p.a))
|
||||
[%hrul *] '<hr>'
|
||||
[%html *] (rap 3 p.a)
|
||||
^ (cat 3 (hark p.a) (hark q.a))
|
||||
==
|
||||
--
|
||||
==
|
||||
|= txt=@
|
||||
=+ tpt=(trip txt)
|
||||
=+ mdp=(mark tpt)
|
||||
:(appd '<html><body>' (hark mdp) '</body></html>')
|
3
main/sys/md/tan/mime/gate.hoon
Normal file
3
main/sys/md/tan/mime/gate.hoon
Normal file
@ -0,0 +1,3 @@
|
||||
|= *
|
||||
|= htm=@
|
||||
[/text/html (met 3 htm) htm]
|
@ -26,7 +26,7 @@
|
||||
?~ lum
|
||||
^- gift
|
||||
:* %la %leaf
|
||||
"{(trip des.pes)} failed to merge, please rerun with a merge option"
|
||||
"{(trip des.pes)} failed to apply, please rerun with a merge option"
|
||||
==
|
||||
?~ u.lum
|
||||
`gift`[%la %leaf "{(trip den.pen)} is up to date"]
|
||||
|
Loading…
Reference in New Issue
Block a user