mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 04:48:00 +03:00
%gall's vane shell compiles.
This commit is contained in:
parent
8f598f10f4
commit
26c6c5868b
@ -33,7 +33,7 @@
|
||||
+>(mos [[hen [%give %blit (flop wab)]] mos])
|
||||
::
|
||||
++ wod :: word forward
|
||||
|= bed=bead
|
||||
|= bed=bean
|
||||
^- @ud
|
||||
?: =(bul.bed bus.bed)
|
||||
bus.bed
|
||||
@ -48,7 +48,7 @@
|
||||
$(bus.bed +(bus.bed))
|
||||
::
|
||||
++ wob :: word backward
|
||||
|= bed=bead
|
||||
|= bed=bean
|
||||
^- @ud
|
||||
?: =(0 bus.bed)
|
||||
bus.bed
|
||||
@ -63,7 +63,7 @@
|
||||
$(bus.bed (dec bus.bed))
|
||||
::
|
||||
++ edit :: change the bed
|
||||
|= bed=bead
|
||||
|= bed=bean
|
||||
^+ +>
|
||||
=. q.q.yar [~ bed]
|
||||
?> ?=(^ q.q.yar)
|
||||
@ -388,7 +388,7 @@
|
||||
::
|
||||
%helo :: trigger prompt
|
||||
%- edit
|
||||
=| bed=bead
|
||||
=| bed=bean
|
||||
=+ ^= hyt ^- hist
|
||||
=+ hyt=(~(get by r.yar) p.fav)
|
||||
?~(hyt *hist u.hyt)
|
||||
|
362
arvo/gall.hoon
362
arvo/gall.hoon
@ -2,7 +2,6 @@
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
^- vane
|
||||
=> =~ :: preface
|
||||
|% :: structures
|
||||
++ axle :: all %gall state
|
||||
@ -12,158 +11,285 @@
|
||||
++ bone ,@ud :: opaque duct
|
||||
++ cork ?(%u %v %w %x %y %z) :: view angle
|
||||
++ gift :: out result <-$
|
||||
%$ [%back ~] :: acknowledgment
|
||||
$% [%back ~] :: acknowledgment
|
||||
[%crud p=(list tank)] :: error notification
|
||||
[%seen p=@da q=*] :: wind update
|
||||
== ::
|
||||
++ hasp ,[p=ship q=term] :: app identity
|
||||
++ kiss :: in request ->$
|
||||
$% [%mess p=ship q=term r=(disk)] :: urbit message
|
||||
[%puke p=@tas q=(list tank) r=kiss] :: rising error
|
||||
[%user p=(unit chop) q=kiss] :: restriction
|
||||
[%show p=ship q=term r=wind s=path] :: subscription
|
||||
$% [%mess p=hasp q=(disk)] :: urbit message
|
||||
[%puke p=(list tank) q=kiss] :: rising error
|
||||
[%user p=chop q=kiss] :: restriction
|
||||
[%show p=hasp q=pipe] :: subscription
|
||||
[%soft p=*] :: soft kiss
|
||||
== ::
|
||||
++ mast :: apps by ship
|
||||
$: bum=(map ,@ta seat) :: apps by name
|
||||
== ::
|
||||
++ move ,[p=duct q=(mold note gift)] :: typed move
|
||||
++ note curd :: out request $->
|
||||
++ pipe (pair (pair cork wind) path) :: simple query
|
||||
++ seat :: the living app
|
||||
$:
|
||||
huv=(unit vase) :: current hive
|
||||
dep=(set ,[p=ship q=desk]) :: dependencies
|
||||
orm=(unit ,@da) :: last buildtime
|
||||
eny=@ :: entropy
|
||||
lat=@da :: time of last tick
|
||||
tik=@ud :: tick computed
|
||||
vey=(qeu ,[p=bone q=debt]) :: blocked queue
|
||||
^= zam :: opaque duct system
|
||||
$: $= zam :: opaque duct system
|
||||
$: p=@ud :: sequence
|
||||
q=(map duct ,[p=bone q=(unit chop)]) :: by duct
|
||||
r=(map bone duct) :: by bone
|
||||
== ::
|
||||
== == ::
|
||||
++ sign curd :: in result $-<
|
||||
++ wind :: request/subscribe
|
||||
$% [%da p=@da q=(unit ,@dr)] :: timeline
|
||||
[%ud p=@ud q=(unit ,@ud)] :: sequence
|
||||
[%tas p=@tas] :: label
|
||||
== ::
|
||||
++ wind ,[p=cork q=@da r=(unit ,@dr)] :: show window
|
||||
-- ::
|
||||
|% :: functions
|
||||
++ byby :: double bind
|
||||
|* [a=(unit (unit)) b=$+(* *)]
|
||||
?~ a ~
|
||||
?~ u.a [~ u=~]
|
||||
[~ u=[~ u=(b u.u.a)]]
|
||||
:: ::
|
||||
++ colt :: reduce to save
|
||||
|= all=axle ::
|
||||
all
|
||||
::
|
||||
++ read :: read permission
|
||||
|= law=(unit chop)
|
||||
^- (unit (set monk))
|
||||
?~(law [~ ~] p.u.law)
|
||||
::
|
||||
++ rite :: write permission
|
||||
|= law=(unit chop)
|
||||
^- (unit (set monk))
|
||||
?~(law ~ `q.u.law)
|
||||
::
|
||||
++ grom :: merge sets
|
||||
|* [one=(set) two=(set)]
|
||||
^+ one
|
||||
(~(gas in one) (~(tap in two) ~)) :: XX ugh
|
||||
::
|
||||
++ grum :: merge maps
|
||||
|* [one=(map) two=(map)]
|
||||
^+ one
|
||||
(~(gas by one) (~(tap by two) ~)) :: XX ugh
|
||||
::
|
||||
++ limp :: merge authorities
|
||||
|= [a=(unit chop) b=(unit chop)]
|
||||
^- (unit chop)
|
||||
a :: XX ?
|
||||
?~ a b
|
||||
?~ b a
|
||||
:- ~
|
||||
:- ?~(p.u.a ~ ?~(p.u.b ~ `(grom u.p.u.b u.p.u.a)))
|
||||
(grom q.u.b q.u.a)
|
||||
::
|
||||
++ lump :: position
|
||||
|= pax=path
|
||||
^- [p=[p=ship q=term] q=path]
|
||||
?> ?=([@ @ *] pax)
|
||||
:- :- (need (slaw %p i.pax))
|
||||
(need ((sand %tas) i.t.pax))
|
||||
t.t.pax
|
||||
--
|
||||
. == :: end preface
|
||||
=| all=axle :: all vane state
|
||||
|= $: now=@da :: urban time
|
||||
eny=@ :: entropy
|
||||
$= ski :: namespace
|
||||
$+ $: (unit (set monk)) :: rights
|
||||
path :: name
|
||||
== (unit (unit (disk))) :: known/any/value
|
||||
ska=$+(* (unit (unit))) :: activate
|
||||
== :: opaque core
|
||||
=< |% ::
|
||||
++ take :: return card
|
||||
|= [pax=path hen=duct hil=(hypo curd)] ::
|
||||
^- [(list move) ..^$]
|
||||
!!
|
||||
++ give :: request card
|
||||
:: $= ski :: namespace
|
||||
:: $+ $: (unit (set monk)) :: rights
|
||||
:: path :: name
|
||||
:: == (unit (unit (disk))) :: known/any/value
|
||||
=< ^?
|
||||
|% :: vane interface
|
||||
++ call :: handle request
|
||||
|= [hen=duct hil=(hypo kiss)]
|
||||
=+ ^= ,[p=ship q=term]
|
||||
?- -.q.hil
|
||||
%mess
|
||||
%puke
|
||||
==
|
||||
?- -.hil
|
||||
++ scry :: observe
|
||||
|= $: use=(unit (set monk)) :: observers
|
||||
bid=bead :: position
|
||||
== ::
|
||||
*view
|
||||
--
|
||||
++ go
|
||||
|_ $: our=@p :: application owner
|
||||
app=@tas :: application name
|
||||
mat=mast :: per owner
|
||||
sat=seat :: per application
|
||||
== ::
|
||||
++ abet :: collapse core
|
||||
%_ +>
|
||||
lex %_ lex
|
||||
pol %+ ~(put by pol.lex) our
|
||||
%_ mat
|
||||
bum (~(put by bum.mat) app sat)
|
||||
== == ==
|
||||
::
|
||||
++ bear :: write backward
|
||||
|= hen=duct
|
||||
=+ orf=(need (~(get by q.zam) hen))
|
||||
~(. bo:~(. au p.orf) hen q.orf)
|
||||
::
|
||||
++ beef :: read in
|
||||
|= [lok=case use=(unit (set monk))
|
||||
~(. au use)
|
||||
::
|
||||
++ boar :: write forward
|
||||
|= $: hen=duct :: cause
|
||||
law=(unit chop) :: read permission
|
||||
==
|
||||
=^ orf zam :: opaque duct
|
||||
=+ orf=(~(get by q.zam) hen)
|
||||
?^ orf
|
||||
[[p.u.orf (limp law q.u.orf)] zam]
|
||||
:^ [[p.zam law] +(p.zam)
|
||||
(~(put by q.zam) hen [p.zam aud])
|
||||
(~(put by r.zam) p.zam hen)
|
||||
~(. bo:~(. au ?~(law [~ ~] p.u.law)) hen p.orf ?~(law ~ q.u.law))
|
||||
::
|
||||
++ au :: read
|
||||
|_ use=(unit (set monk)) :: write
|
||||
++ lens
|
||||
|=
|
||||
++ bo
|
||||
|_ $: hen=duct :: system duct
|
||||
ost=bone :: opaque duct
|
||||
seg=(unit (set monk)) :: write permission
|
||||
==
|
||||
++ abet +> :: collapse core
|
||||
++ mess ::
|
||||
|= dur=(disk) :: general data
|
||||
^- [(list move) _+>]
|
||||
!! ::
|
||||
|
||||
++ more :: process result
|
||||
|= $: pax=path
|
||||
hil=(hypo curd)
|
||||
|- ^- [p=(list move) q=_..^^$]
|
||||
?: ?=(%soft -.q.hil)
|
||||
$(q.hil ((hard kiss) p.q.hil))
|
||||
=+ ^= way
|
||||
=| $= way
|
||||
$: puc=(unit (list tank))
|
||||
law=(unit chop)
|
||||
==
|
||||
^- [(list move) _+>]
|
||||
++ show ::
|
||||
|= $: win=wind :: version window
|
||||
pax=path :: subtree
|
||||
|- ^- $: _way
|
||||
hap=hasp
|
||||
act=(each (disk) pipe)
|
||||
==
|
||||
?- -.q.hil
|
||||
%mess [way p.q.hil %& q.q.hil]
|
||||
%puke $(puc.way `p.q.hil)
|
||||
%user $(law.way (limp `p.q.hil law.way))
|
||||
%show [way p.q.hil %| q.q.hil]
|
||||
==
|
||||
=+ bor=(boar:(goat hap.way) hen law.way)
|
||||
=< abet
|
||||
?^ puc.way (puke:bor u.puc.way act.way)
|
||||
?- -.act.way
|
||||
& (mess:bor p.act.way)
|
||||
| (show:bor p.act.way)
|
||||
==
|
||||
::
|
||||
++ take :: accept response
|
||||
|= [pax=path hen=duct hil=(hypo card)] ::
|
||||
^- [(list move) _..^$]
|
||||
=+ lum=(lump pax)
|
||||
abet:(more:(bear:(gaur p.lum) hen) q.lum hil)
|
||||
::
|
||||
++ scry
|
||||
|= $: use=(unit (set monk))
|
||||
ren=@tas
|
||||
who=ship
|
||||
syd=desk
|
||||
lot=coin
|
||||
tyl=path
|
||||
==
|
||||
^- (unit (unit))
|
||||
=+ ^= vew
|
||||
%. :- use
|
||||
:- [who syd ((hard case) p.lot)]
|
||||
(flop tyl)
|
||||
|= $: use=(unit (set monk)) :: observers
|
||||
bid=bead :: position
|
||||
== ::
|
||||
^- [(list move) +>]
|
||||
!!
|
||||
--
|
||||
++ abet +>
|
||||
--
|
||||
--
|
||||
::
|
||||
++ goad :: take and go
|
||||
(beef:(gaur p.bid q.bid) use r.bid s.bid)
|
||||
?+ ren ~
|
||||
%u u.vew
|
||||
%v v.vew
|
||||
%w w.vew
|
||||
%x x.vew
|
||||
%y y.vew
|
||||
%z z.vew
|
||||
==
|
||||
::
|
||||
:: XXX old junk - fix and/or destroy
|
||||
::
|
||||
++ come
|
||||
|= [sam=? old=vase]
|
||||
^+ ..^$
|
||||
(load old)
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit ,@da)
|
||||
~
|
||||
::
|
||||
++ load
|
||||
|= old=vase
|
||||
^+ ..^$
|
||||
?. (~(nest ut -:!>(`axle`+>-.^$)) | p.old)
|
||||
~& %gall-reset
|
||||
..^$
|
||||
..^$(all (axle q.old))
|
||||
::
|
||||
++ raze
|
||||
^+ ..$
|
||||
..$(all *axle)
|
||||
::
|
||||
++ stay `vase`!>((colt `axle`+>-.$))
|
||||
++ vern [164 0]
|
||||
--
|
||||
|% :: inner core
|
||||
++ gaur :: take and go
|
||||
|= [our=@p app=@tas]
|
||||
=+ mat=(need (~(get by pol.lex our)))
|
||||
=+ mat=(need (~(get by pol.all) our))
|
||||
=+ sat=(need (~(get by bum.mat) app))
|
||||
~.( go [our app mat sat])
|
||||
~(. go [our app] mat sat)
|
||||
::
|
||||
++ goat :: call and go
|
||||
|= [our=@p app=@tas]
|
||||
=+ ^= mat ^- mast :: per owner
|
||||
=+ mat=(~(get by pol.lex) p.fav)
|
||||
=+ ^= mat ^- mast
|
||||
=+ mat=(~(get by pol.all) our)
|
||||
?~(mat *mast u.mat)
|
||||
=+ ^= sat ^- seat :: per app
|
||||
=+ sat=(~(get by bum.mat) q.fav)
|
||||
=+ ^= sat ^- seat
|
||||
=+ sat=(~(get by bum.mat) app)
|
||||
?^ sat u.sat
|
||||
%* . *seat
|
||||
eny (shax (mix now eny))
|
||||
lat now
|
||||
*seat
|
||||
:: %* . *seat
|
||||
:: eny (shax (mix now eny))
|
||||
:: lat now
|
||||
:: ==
|
||||
~(. go [our app] mat sat)
|
||||
::
|
||||
++ go :: application core
|
||||
|_ $: $: our=@p :: application owner
|
||||
app=@tas :: application name
|
||||
== ::
|
||||
mat=mast :: per owner
|
||||
sat=seat :: per application
|
||||
== ::
|
||||
++ abet :: resolve
|
||||
%_ ..$
|
||||
all
|
||||
%_ all
|
||||
pol %+ ~(put by pol.all) our
|
||||
mat(bum (~(put by bum.mat) app sat))
|
||||
==
|
||||
~(. go [our app mat sat])
|
||||
==
|
||||
::
|
||||
++ bear :: write backward
|
||||
|= hen=duct
|
||||
=+ orf=(need (~(get by q.zam.sat) hen))
|
||||
~(. bo:~(. au (read q.orf)) hen p.orf (rite q.orf) ~)
|
||||
::
|
||||
++ beef :: read in
|
||||
|= [use=(unit (set monk)) lok=case pax=path]
|
||||
^- view
|
||||
?. =([%da now] lok) *view
|
||||
(~(lens au use) pax)
|
||||
::
|
||||
++ boar :: write forward
|
||||
|= $: hen=duct :: cause
|
||||
law=(unit chop) :: permissions
|
||||
==
|
||||
=^ orf zam.sat
|
||||
=+ orf=(~(get by q.zam.sat) hen)
|
||||
?^ orf
|
||||
[[p=p.u.orf q=(limp law q.u.orf)] zam.sat]
|
||||
:^ [p=p.zam.sat q=law] +(p.zam.sat)
|
||||
(~(put by q.zam.sat) hen [p.zam.sat law])
|
||||
(~(put by r.zam.sat) p.zam.sat hen)
|
||||
~(. bo:~(. au (read q.orf)) hen p.orf (rite q.orf) ~)
|
||||
::
|
||||
++ au :: read
|
||||
|_ use=(unit (set monk)) :: read permission
|
||||
++ abet ^abet :: resolve
|
||||
++ lens :: view
|
||||
|= pax=path
|
||||
^- view
|
||||
*view
|
||||
::
|
||||
++ bo
|
||||
|_ $: hen=duct :: system cause
|
||||
ost=bone :: opaque cause
|
||||
seg=(unit (set monk)) :: write permission
|
||||
mow=(list move) :: actions
|
||||
==
|
||||
++ abet [(flop mow) ^abet] :: resolve
|
||||
++ mess :: general message
|
||||
|= dur=(disk) :: content
|
||||
^+ +>
|
||||
+>
|
||||
::
|
||||
++ more :: process result
|
||||
|= $: pax=path :: internal position
|
||||
hil=(hypo curd) :: urbit event
|
||||
==
|
||||
^+ +>
|
||||
+>
|
||||
::
|
||||
++ puke :: propagate error
|
||||
|= $: tan=(list tank)
|
||||
act=(each (disk) pipe)
|
||||
==
|
||||
^+ +>
|
||||
+>
|
||||
::
|
||||
++ show :: subscribe
|
||||
|= pyp=pipe :: subscription
|
||||
^+ +>
|
||||
+>
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
==
|
||||
. == :: end preface
|
||||
|
@ -8793,8 +8793,8 @@
|
||||
== ::
|
||||
++ desk ,@tas :: ship desk case spur
|
||||
++ chop :: permissions
|
||||
$: use=(unit (set monk)) :: data users
|
||||
say=(set monk) :: data authors
|
||||
$: p=(unit (set monk)) :: readers
|
||||
q=(set monk) :: authors
|
||||
== ::
|
||||
++ curd ,[p=@tas q=*] :: typeless card
|
||||
++ disk |*(a=$+(* *) (pair gene (hypo a))) :: global/local typed
|
||||
@ -8825,7 +8825,7 @@
|
||||
++ mold :: general action
|
||||
|* [a=$+(* *) b=$+(* *)] :: new move
|
||||
$% [%toss p=term q=path r=a] :: advance
|
||||
[%slip p=term q=a] :: send across
|
||||
[%slip p=term q=a] :: lateral
|
||||
[%sick p=b] :: lame refactoring
|
||||
[%give p=b] :: retreat
|
||||
== ::
|
||||
@ -8841,7 +8841,7 @@
|
||||
|% ++ u *(unit (unit (unit ,@ud))) :: last change
|
||||
++ v *(unit (unit (disk))) :: historic subtree
|
||||
++ w *(unit (unit (unit ,[p=@ud q=(disk)]))) :: change and diff
|
||||
++ x *(unit (unit (disk))) :: actual data
|
||||
++ x *(unit (unit (disk))) :: data at path
|
||||
++ y *(unit (unit arch)) :: directory
|
||||
++ z *(unit (unit (disk))) :: current subtree
|
||||
-- ::
|
||||
|
@ -1880,7 +1880,7 @@
|
||||
raz=(map path race) :: statements inbound
|
||||
ryl=(map path rill) :: statements outbound
|
||||
== ::
|
||||
++ bead :: terminal control
|
||||
++ bean :: terminal control
|
||||
$: $: bul=@ud :: buffer length
|
||||
bus=@ud :: cursor in buffer
|
||||
but=(list ,@c) :: buffer text
|
||||
@ -1936,7 +1936,7 @@
|
||||
q=@ud :: depth
|
||||
r=(list (list ,@c)) :: kills
|
||||
== ::
|
||||
++ blur ,[p=@ud q=(unit bead) r=blot] :: columns, prompt
|
||||
++ blur ,[p=@ud q=(unit bean) r=blot] :: columns, prompt
|
||||
++ boar :: execution instance
|
||||
$% [%n p=(unit coal) q=claw r=lath] :: new/ready
|
||||
[%r p=(unit worm)] :: running/done
|
||||
|
Loading…
Reference in New Issue
Block a user