mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
neo: sketch aegean
This commit is contained in:
parent
6f639fd92b
commit
12f79d9de5
@ -445,7 +445,10 @@
|
||||
(on-move move)
|
||||
?> ?=(%noun mark)
|
||||
?: =(%clay q.vase)
|
||||
copy-clay
|
||||
(copy-clay ~)
|
||||
?: ?=([%file *] q.vase)
|
||||
=+ ;;(=path +.q.vase)
|
||||
(copy-clay `path)
|
||||
?: ?=([%dbug veb=?] q.vase)
|
||||
?> =(our src):bowl
|
||||
%- (print-dbug veb.q.vase)
|
||||
@ -811,10 +814,8 @@
|
||||
|
||||
++ vale
|
||||
^- ?
|
||||
~& vale-con/stud
|
||||
=; rap=(trap ?)
|
||||
=/ res (mule rap)
|
||||
~& vale-con-done/stud
|
||||
?: ?=(%& -.res)
|
||||
p.res
|
||||
%- (slog leaf/"mark-vale" p.res)
|
||||
@ -929,8 +930,12 @@
|
||||
(need ref)
|
||||
::
|
||||
++ copy-clay
|
||||
|= just=(unit path)
|
||||
|^ ^+ run
|
||||
=+ .^(paths=(list path) %ct root)
|
||||
=/ paths=(list path)
|
||||
?~ just
|
||||
.^((list path) %ct root)
|
||||
~[u.just]
|
||||
:: =. paths
|
||||
:: %+ sort paths
|
||||
:: |= [a=path b=path]
|
||||
@ -972,7 +977,6 @@
|
||||
?~ imps
|
||||
run
|
||||
loop(imps ~, paths imps)
|
||||
~& reading/i.paths
|
||||
=^ pat=(unit path) run
|
||||
(read-file i.paths)
|
||||
?~ pat
|
||||
@ -1027,7 +1031,6 @@
|
||||
run
|
||||
=* do-con ~(do con q.u.pos)
|
||||
?. vale:do-con
|
||||
~& con-vale/q.u.pos
|
||||
run
|
||||
=. fiesta register:do-con
|
||||
run
|
||||
@ -1087,7 +1090,7 @@
|
||||
=+ .^(src=@t %cx (welp root pax))
|
||||
=/ =file:ford
|
||||
~| parsing/pax
|
||||
(scan (trip src) (rein:ford pax))
|
||||
(scan (trip src) (rein:ford [our.bowl (pave:neo pax)]))
|
||||
=/ has-imports=?
|
||||
?& (levy pro.file |=(pro:ford ~(exists pro stud)))
|
||||
(levy lib.file |=(lib:ford ~(exists lib name)))
|
||||
|
@ -14,7 +14,6 @@
|
||||
~
|
||||
=/ face=@tas (get-face bowl)
|
||||
:- ~
|
||||
=- ((slog leaf/"attaching face" (sell -) ~) -)
|
||||
u.sut(p [%face (get-face bowl) p.u.sut])
|
||||
+$ state [cache=(unit vase) ~]
|
||||
--
|
||||
|
@ -31,9 +31,6 @@
|
||||
^- (quip card:neo vase)
|
||||
=| sta=[cache=(unit vase) ~]
|
||||
=. cache.sta (get-output:ford:neo bowl %src)
|
||||
|
||||
%- ?~ cache.sta (slog leaf/"no link" ~)
|
||||
(slog leaf/"link" (sell u.cache.sta) ~)
|
||||
`!>(sta)
|
||||
--
|
||||
--
|
||||
|
33
pkg/arvo/neo/src/std/imp/circle.hoon
Normal file
33
pkg/arvo/neo/src/std/imp/circle.hoon
Normal file
@ -0,0 +1,33 @@
|
||||
/@ diff=circle-diff
|
||||
|%
|
||||
++ state %sig
|
||||
++ poke (sy %circle-diff ~)
|
||||
++ kids
|
||||
%- ~(gas by *kids:neo)
|
||||
:~ [~[|/%p] %sig %sig]
|
||||
==
|
||||
++ deps *deps:neo
|
||||
++ form
|
||||
^- form:neo
|
||||
|_ [=bowl:neo =ever:neo state-vase=vase *]
|
||||
++ poke
|
||||
|= [=stud:neo vax=vase]
|
||||
?> ?=(%circle-diff stud)
|
||||
=+ !<(=diff vax)
|
||||
:_ state-vase
|
||||
?- -.diff
|
||||
%add
|
||||
%+ turn ~(tap by p.diff)
|
||||
|= [=ship =made:neo]
|
||||
[(snoc here.bowl p/ship) %make made]
|
||||
::
|
||||
%del
|
||||
%+ turn ~(tap in p.diff)
|
||||
|= =ship
|
||||
[(snoc here.bowl p/ship) %tomb ~]
|
||||
==
|
||||
++ init
|
||||
|= vas=(unit vase)
|
||||
`*vase
|
||||
--
|
||||
--
|
34
pkg/arvo/neo/src/std/imp/circles.hoon
Normal file
34
pkg/arvo/neo/src/std/imp/circles.hoon
Normal file
@ -0,0 +1,34 @@
|
||||
/@ diff=circles-diff
|
||||
|%
|
||||
++ state %sig
|
||||
++ poke (sy %circles-diff ~)
|
||||
++ kids
|
||||
%- ~(gas by *kids:neo)
|
||||
:~ [~[|/%tas] %sig %circle-diff]
|
||||
==
|
||||
++ deps *deps:neo
|
||||
++ form
|
||||
^- form:neo
|
||||
|_ [=bowl:neo =ever:neo state-vase=vase *]
|
||||
++ poke
|
||||
|= [=stud:neo vax=vase]
|
||||
~& stud/stud
|
||||
?> ?=(%circles-diff stud)
|
||||
=+ !<(=diff vax)
|
||||
:_ state-vase
|
||||
?- -.diff
|
||||
%add
|
||||
%+ turn ~(tap by p.diff)
|
||||
|= [=term =made:neo]
|
||||
[(snoc here.bowl term) %make made]
|
||||
::
|
||||
%del
|
||||
%+ turn ~(tap in p.diff)
|
||||
|= =term
|
||||
[(snoc here.bowl term) %tomb ~]
|
||||
==
|
||||
++ init
|
||||
|= vas=(unit vase)
|
||||
`*vase
|
||||
--
|
||||
--
|
54
pkg/arvo/neo/src/std/imp/feed-item.hoon
Normal file
54
pkg/arvo/neo/src/std/imp/feed-item.hoon
Normal file
@ -0,0 +1,54 @@
|
||||
/@ diff=feed-item-diff
|
||||
/@ state=feed-item
|
||||
/@ circle
|
||||
=>
|
||||
|%
|
||||
++ check-perms
|
||||
|= =bowl:neo
|
||||
=+ !<(=circle q.pail.q:(~(got by deps.bowl) %acl))
|
||||
(~(has in circle) ship.src.bowl)
|
||||
--
|
||||
|%
|
||||
++ state %feed-item
|
||||
++ poke (sy %feed-item-diff ~)
|
||||
++ kids
|
||||
%- ~(gas by *kids:neo)
|
||||
:~ [~[&/%likes |/%p] %sig %sig]
|
||||
[~[&/%comments |/%p] %feed-comment %sig]
|
||||
==
|
||||
++ deps
|
||||
%- ~(gas by *deps:neo)
|
||||
:~ :- %acl
|
||||
:^ req=& %y [%circle %sig]
|
||||
%- ~(gas by *kids:neo)
|
||||
:~ [~[|/%p] %sig %sig]
|
||||
==
|
||||
==
|
||||
++ form
|
||||
^- form:neo
|
||||
|_ [=bowl:neo =ever:neo state-vase=vase *]
|
||||
+* sta !<(^state state-vase)
|
||||
++ poke
|
||||
|= [=stud:neo vax=vase]
|
||||
^- (quip card:neo vase)
|
||||
=/ sta sta
|
||||
?> (check-perms bowl)
|
||||
?> ?=(%feed-item-diff stud)
|
||||
=+ !<(=diff vax)
|
||||
~! diff
|
||||
?- -.diff
|
||||
%add-like
|
||||
=. likes.sta +(likes.sta)
|
||||
:_ !>(sta)
|
||||
[(welp here.bowl %likes p/ship.src.bowl ~) %make stud/%sig ~ ~]~
|
||||
::
|
||||
%add-comment
|
||||
=. comments.sta +(comments.sta)
|
||||
:_ !>(sta)
|
||||
[(welp here.bowl %comments da/now.bowl ~) %make made.diff]~
|
||||
==
|
||||
++ init
|
||||
|= vas=(unit vase)
|
||||
`(need vas)
|
||||
--
|
||||
--
|
34
pkg/arvo/neo/src/std/imp/feed.hoon
Normal file
34
pkg/arvo/neo/src/std/imp/feed.hoon
Normal file
@ -0,0 +1,34 @@
|
||||
/@ diff=feed-diff
|
||||
|%
|
||||
++ state %sig
|
||||
++ poke (sy %feed-diff ~)
|
||||
++ kids
|
||||
%- ~(gas by *kids:neo)
|
||||
:~ [~[&/%items |/%da] %feed-item %feed-item-diff]
|
||||
==
|
||||
++ deps
|
||||
%- ~(gas by *deps:neo)
|
||||
:~ acl/[req=& %x %circle %sig]
|
||||
==
|
||||
++ form
|
||||
^- form:neo
|
||||
|_ [=bowl:neo =ever:neo state-vase=vase *]
|
||||
++ poke
|
||||
|= [=stud:neo vax=vase]
|
||||
?> ?=(%feed-diff stud)
|
||||
=+ !<(=diff vax)
|
||||
:_ state-vase
|
||||
?- -.diff
|
||||
%add
|
||||
[(snoc here.bowl da/now.bowl) %make p.diff]~
|
||||
::
|
||||
%del
|
||||
%+ turn ~(tap in p.diff)
|
||||
|= =@da
|
||||
[(snoc here.bowl da/da) %tomb ~]
|
||||
==
|
||||
++ init
|
||||
|= vas=(unit vase)
|
||||
`*vase
|
||||
--
|
||||
--
|
17
pkg/arvo/neo/src/std/imp/sig.hoon
Normal file
17
pkg/arvo/neo/src/std/imp/sig.hoon
Normal file
@ -0,0 +1,17 @@
|
||||
|%
|
||||
++ state %sig
|
||||
++ poke ~
|
||||
++ kids *kids:neo
|
||||
++ deps *deps:neo
|
||||
++ form
|
||||
^- form:neo
|
||||
|_ [=bowl:neo =ever:neo state-vase=vase *]
|
||||
+* sta !<(^state state-vase)
|
||||
++ poke
|
||||
|= [=stud:neo vax=vase]
|
||||
!!
|
||||
++ init
|
||||
|= vas=(unit vase)
|
||||
`*vase
|
||||
--
|
||||
--
|
52
pkg/arvo/neo/src/std/lib/aegean.hoon
Normal file
52
pkg/arvo/neo/src/std/lib/aegean.hoon
Normal file
@ -0,0 +1,52 @@
|
||||
|%
|
||||
+$ signature @uvH
|
||||
+$ signal :: what gets broadcast
|
||||
$:
|
||||
=hops
|
||||
=post
|
||||
==
|
||||
+$ hops ?(%0 %1 %2) :: do not allow >2 hops
|
||||
+$ post path :: FQSP such that mark is %entry
|
||||
:: author in the head
|
||||
:: require timestamp, other cases rejected
|
||||
:: originating desk included
|
||||
+$ entry :: /mar/entry/hoon
|
||||
$:
|
||||
text=(unit @t) :: max length 256 bytes
|
||||
media=(unit preview)
|
||||
quote=(unit post)
|
||||
==
|
||||
+$ preview (map path coin) :: OGP data
|
||||
+$ saved (set post)
|
||||
+$ hidden (set post)
|
||||
+$ boosts (map post [ship @da]) :: ships who have boosted and when
|
||||
+$ store (map post entry) :: the content that gets sorted
|
||||
+$ sort (map post weight=@sd)
|
||||
+$ weight @sd
|
||||
+$ fresh (list [post weight]) :: populated upon hearing new post
|
||||
::
|
||||
+$ locker (set evidence) :: reported posts from friends
|
||||
+$ evidence
|
||||
$:
|
||||
mine=signature
|
||||
%disavow
|
||||
=post
|
||||
theirs=signature
|
||||
=entry
|
||||
==
|
||||
::
|
||||
+$ action
|
||||
$%
|
||||
[%broadcast =signal]
|
||||
[%save =post]
|
||||
[%hide =post]
|
||||
[%boost =post]
|
||||
[%report =post]
|
||||
==
|
||||
+$ message
|
||||
$%
|
||||
[%gossip =signal]
|
||||
[%praise =entry]
|
||||
[%tattle =evidence]
|
||||
==
|
||||
--
|
3
pkg/arvo/neo/src/std/pro/circle-diff.hoon
Normal file
3
pkg/arvo/neo/src/std/pro/circle-diff.hoon
Normal file
@ -0,0 +1,3 @@
|
||||
$% [%add p=(map ship made:neo)]
|
||||
[%del p=(set ship)]
|
||||
==
|
1
pkg/arvo/neo/src/std/pro/circle.hoon
Normal file
1
pkg/arvo/neo/src/std/pro/circle.hoon
Normal file
@ -0,0 +1 @@
|
||||
,(set ship)
|
3
pkg/arvo/neo/src/std/pro/circles-diff.hoon
Normal file
3
pkg/arvo/neo/src/std/pro/circles-diff.hoon
Normal file
@ -0,0 +1,3 @@
|
||||
$% [%add p=(map term made:neo)]
|
||||
[%del p=(set term)]
|
||||
==
|
3
pkg/arvo/neo/src/std/pro/feed-diff.hoon
Normal file
3
pkg/arvo/neo/src/std/pro/feed-diff.hoon
Normal file
@ -0,0 +1,3 @@
|
||||
$% [%add p=made:neo]
|
||||
[%del p=(set time)]
|
||||
==
|
3
pkg/arvo/neo/src/std/pro/feed-item-diff.hoon
Normal file
3
pkg/arvo/neo/src/std/pro/feed-item-diff.hoon
Normal file
@ -0,0 +1,3 @@
|
||||
$% [%add-like ~]
|
||||
[%add-comment =made:neo]
|
||||
==
|
6
pkg/arvo/neo/src/std/pro/feed-item.hoon
Normal file
6
pkg/arvo/neo/src/std/pro/feed-item.hoon
Normal file
@ -0,0 +1,6 @@
|
||||
$: title=@t
|
||||
desc=@t
|
||||
sent=time
|
||||
likes=@ud
|
||||
comments=@ud
|
||||
==
|
@ -51,9 +51,9 @@
|
||||
::
|
||||
++ run
|
||||
|= txt=@t
|
||||
(scan (trip txt) (rein /))
|
||||
(scan (trip txt) (rein *name))
|
||||
+$ lib
|
||||
[face=(unit term) =name]
|
||||
[face=term =name]
|
||||
+$ pro
|
||||
[face=term =stud]
|
||||
+$ vale
|
||||
@ -65,12 +65,22 @@
|
||||
=hoon
|
||||
==
|
||||
++ rein
|
||||
|= pax=path
|
||||
|= =name
|
||||
=< apex
|
||||
|%
|
||||
++ nam
|
||||
:: ^- $-(nail (like name:neo))
|
||||
;~(plug ;~(pfix fas sig fed:ag) stip)
|
||||
;~ pose
|
||||
%+ sear
|
||||
|= [kets=(list) pit=pith]
|
||||
^- (unit ^name)
|
||||
%- mole
|
||||
|. ^- ^name
|
||||
=. pit (scag (sub (lent pit) (lent kets)) pit)
|
||||
name(pith (welp pith.name pit))
|
||||
;~(pfix cen ;~(plug (star ket) stip)) :: relative
|
||||
;~(plug ;~(pfix fas sig fed:ag) stip) :: absolute
|
||||
==
|
||||
++ std
|
||||
;~ pose
|
||||
;~(plug sym ;~(pfix col sig fed:ag) ;~(pfix fas sym))
|
||||
@ -89,10 +99,15 @@
|
||||
==
|
||||
++ lib
|
||||
:: ^- $-(nail (like ^lib))
|
||||
%+ rune cen
|
||||
%+ rune hep
|
||||
;~ pose
|
||||
(stag ~ nam)
|
||||
;~(plug (stag ~ sym) ;~(pfix gap nam))
|
||||
;~(plug sym ;~(pfix tis nam))
|
||||
%+ cook
|
||||
|= n=^name
|
||||
=/ last (rear pith.n)
|
||||
?> ?=(@ last)
|
||||
[last n]
|
||||
nam
|
||||
==
|
||||
++ rune
|
||||
|* [car=rule rul=rule]
|
||||
@ -106,7 +121,7 @@
|
||||
(star pro)
|
||||
++ hone
|
||||
:: ^- $-(nail (like hoon))
|
||||
=+ vaz=(vang & pax)
|
||||
=+ vaz=(vang & (en-path:^name name))
|
||||
(ifix [gay gay] tall:vaz)
|
||||
++ apex
|
||||
:: ^- rule
|
||||
@ -591,10 +606,12 @@
|
||||
+$ page (pair stud *)
|
||||
:: +$ cage (pair stud vase)
|
||||
::
|
||||
+$ made
|
||||
[=code init=(unit vase) =conf]
|
||||
+$ note
|
||||
$% [%make =code init=(unit vase) =conf] :: todo: configuration values, init cannot be ^ if installing over
|
||||
$% [%make made] :: todo: configuration values, init cannot be ^ if installing over
|
||||
[%poke =pail]
|
||||
[%tomb =case]
|
||||
[%tomb cas=(unit case)] :: tom
|
||||
[%link from=pith src=stud] :: XX deprecate
|
||||
==
|
||||
+$ raw-poke
|
||||
|
Loading…
Reference in New Issue
Block a user