Merge pull request #31 from urbit/lf/all-grow-2

neo: add /> /< ford runes
This commit is contained in:
Liam Fitzgerald 2024-05-29 16:03:52 -04:00 committed by GitHub
commit 23402c7d04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 168 additions and 16 deletions

View File

@ -1037,6 +1037,53 @@
=/ pax path
(exists-file (pout (~(pith press lib/stud) %src)))
--
++ all-grab
|= grab=stud:neo
^- vase :: of $-([to=stud grab-type] vase)
=/ in=vase ~(get pro grab)
=/ dive=vase !>(dive)
%+ slap
%+ with-faces:ford:neo get-reef
:~ in/in
dive/dive
loam/!>(loam)
farm/!>(farm)
con/!>(con)
grab/!>(grab)
==
!, *hoon
|= [to=stud:neo in=in]
^- vase
=/ =stud:neo
~| missing-con/[grab to]
(~(got by con.dive) [grab %$ to])
=/ conv ~(do con stud)
(slym run:conv in)
::
++ all-grow
|= grow=stud:neo
^- vase :: of $-(pail grow-type)
=/ out=vase ~(get pro grow)
%+ slap
%+ with-faces:ford:neo get-reef
:~ out/out
dive/!>(dive)
grow/!>(grow)
loam/!>(loam)
farm/!>(farm)
con/!>(con)
==
!, *hoon
|= =pail:neo
^- out
~! p.pail
~! grow
=/ =stud:neo
~| missing-con/[p.pail grow]
(~(got by con.dive) [p.pail %$ grow])
=/ conv ~(do con stud)
!<(out (slam run:conv q.pail))
::
::
++ con
|_ =stud:neo
@ -1181,7 +1228,8 @@
~(tap by ~(tar of:neo ~(snip of:neo (~(dip of:neo tide) base))))
|-
?~ cons
run
=. run gen-grab
gen-grow
=/ [p=pith:neo *] i.cons
=/ =stud:neo
?> ?&(?=(^ p) ?=(@ i.p))
@ -1189,6 +1237,26 @@
=. dive sink:~(do con stud)
$(cons t.cons)
::
++ gen-grab
=/ grabs ~(tap in ~(key by by-grab.dive))
~& genning/grabs
|-
?~ grabs
run
=/ =vase (all-grab i.grabs)
=. run (make-riff (welp #/cod/grab (stud-to-pith:neo i.grabs)) vase)
$(grabs t.grabs)
::
++ gen-grow
=/ grows ~(tap in ~(key by by-grow.dive))
~& genning-grows/grows
|-
?~ grows
run
=/ =vase (all-grow i.grows)
=. run (make-riff (welp #/cod/grow (stud-to-pith:neo i.grows)) vase)
$(grows t.grows)
::
++ has-modified
|= [txt=@t pax=pith:neo]
?. ripe
@ -1232,6 +1300,8 @@
=. run (build-pros (turn pro.file tail))
=. run (build-libs (turn lib.file tail))
=. run (build-fils (turn fil.file tail))
=. run (build-fars (turn far.file tail))
=. run (build-fals (turn fal.file tail))
:: =. run (build-fils (turn lib.file tail))
=/ built-imports=?
?& (levy pro.file |=(pro:ford:neo ~(built pro stud)))
@ -1274,6 +1344,34 @@
=. run (read-file (snoc pat %hoon))
$(pos t.pos)
::
++ build-fals
|= pos=(list stud:neo)
^+ run
?~ pos
run
=/ pat
(welp #/cod/grab (stud-to-pith:neo i.pos))
?: !=(~ (~(peek plow:aux loam) p/our.bowl pat))
$(pos t.pos)
=. run (on-dirt-card (do-grow-our pat vase/=>(..zuse !>(|=(~ *vase)))))
$(pos t.pos)
::
++ build-fars
|= pos=(list stud:neo)
^+ run
?~ pos
run
=/ pat
(welp #/cod/grow (stud-to-pith:neo i.pos))
?: !=(~ (~(peek plow:aux loam) p/our.bowl pat))
$(pos t.pos)
=? run !~(built pro i.pos)
(build-pros ~[i.pos])
=/ grow=vase ~(get pro i.pos)
=/ sut (with-faces:ford:neo get-reef grow/grow ~)
=. run (on-dirt-card (do-grow-our pat vase/(slap sut !,(*hoon |=(* *grow)))))
$(pos t.pos)
::
++ build-libs
|= lis=(list stud:ford:neo)
^+ run
@ -1350,6 +1448,8 @@
:~ (turn pro.file |=(p=pro:ford:neo [face.p ~(pith pro stud.p)]))
(turn fil.file |=(f=fil:ford:neo [face.f (~(pith press fil/stud.f) %out)]))
(turn lib.file |=(l=lib:ford:neo [face.l (~(pith press lib/stud.l) %out)]))
(turn far.file |=(f=far:ford:neo [face.f (welp #/cod/grow (stud-to-pith:neo stud.f))]))
(turn fal.file |=(f=fal:ford:neo [face.f (welp #/cod/grab (stud-to-pith:neo stud.f))]))
==
++ make-prelude
|= [pax=pith =file:ford:neo]
@ -1466,12 +1566,13 @@
%+ slap reef
!,(*hoon ,~)
::
++ make-riff
|= [=pith riff=vase]
^+ run
=. pith [p/our.bowl pith]
(on-card pith %make %ford-riff `vase/riff ~)
--
++ make-riff
|= [=pith riff=vase]
^+ run
=. pith [p/our.bowl pith]
(on-card pith %make %ford-riff `vase/riff ~)
++ seize
|= [par=pith:neo child=pith:neo car=?(%y %z)]
^- ?

View File

@ -524,7 +524,6 @@
|= [kid=pith:neo cas=@ud]
^- (unit [pith:neo saga:neo])
=/ pit (welp pith kid)
~& child/[pit case]
=/ child (scry cas pit)
?: ?=($@(~ [~ ~]) child)
~

View File

@ -1,6 +1,6 @@
:- [%ford-out %$ %htmx]
:- [%vase %$ %htmx]
=/ debug |
|= fod=[cache=(unit vase) ~]
|= v=vase
|= =bowl:neo
^- manx
=< apex
@ -580,9 +580,7 @@
++ apex
;div
;+
?~ cache.fod
empty
(have u.cache.fod)
(have v)
==
++ empty
;h4: No build result here

View File

@ -4,7 +4,7 @@
--
^- kook:neo
|%
++ state pro/%ford-out
++ state pro/%vase
++ poke *(set stud:neo)
++ kids ~
++ deps ~

View File

@ -14,7 +14,7 @@
--
^- kook:neo
|%
++ state pro/%ford-out
++ state pro/%vase
++ poke (sy %rely %ford-in ~)
++ kids ~
++ deps

View File

@ -1,5 +1,7 @@
/@ pal-type=pal
/@ pal-diff
/> htmx
/< node
=>
|%
++ card card:neo
@ -18,6 +20,9 @@
|= [=stud:neo vax=vase]
^- (quip card:neo pail:neo)
=/ sta sta
?: =(%test stud)
~& ((htmx txt/!>('test')) bowl)
`pal/!>(sta)
?> =(%pal-diff stud)
=+ !<(poke=pal-diff vax)
:- ~
@ -30,6 +35,7 @@
++ init
|= old=(unit pail:neo)
^- (quip card:neo pail:neo)
`(need old)
=+ !<(pal=pal-type q:(need old))
`pal/!>(pal)
--
--

View File

@ -101,6 +101,7 @@
+$ epic $+(epic (axal saga))
+$ feat (pair aeon vial)
+$ gest $+(gest (axal feat))
++ road (pole iota)
:: $stud: name for build system outputs
::
:: Build system outputs cannot live at arbitrary points in the
@ -111,6 +112,19 @@
$: mark=@tas ::
[=ship =desk]
==
++ stud-to-pith
|= s=stud
^- pith
?@ s ~[s]
#/[p/ship.s]/[desk.s]/[mark.s]
::
++ pith-to-stud
|= p=road
^- stud
?: ?=([s=@ ~] p)
s.p
?> ?=([[%p ship=@] desk=@ mark=@ ~] p)
[mark ship desk]:p
++ axal
|$ [item]
[fil=(unit item) kid=(map iota $)]
@ -1031,6 +1045,10 @@
[face=term =stud]
+$ fil
[face=term =stud]
+$ far
[face=term =stud]
+$ fal
[face=term =stud]
+$ vale
[face=term =stud]
:: $file:ford: Code with imports
@ -1042,6 +1060,8 @@
:: grab=(list
lib=(list lib)
fil=(list fil)
far=(list far)
fal=(list fal)
=hoon
==
:: +rein:ford: Parse code with imports
@ -1127,6 +1147,31 @@
[mark.stud stud]
std
==
::
++ far
:: ^- $-(nail (like ^pro))
%+ rune gar
;~ pose
;~(plug sym ;~(pfix tis std))
%+ cook
|= =stud
?@ stud [stud stud]
[mark.stud stud]
std
==
++ fal
:: ^- $-(nail (like ^pro))
%+ rune gal
;~ pose
;~(plug sym ;~(pfix tis std))
%+ cook
|= =stud
?@ stud [stud stud]
[mark.stud stud]
std
==
:: +old-lib: Parse arbitrary library import directive
::
:: Unused, todo revive with more recursive build system
@ -1158,6 +1203,8 @@
:: ^- $-(nail (like (list ^pro)))
(star pro)
++ fils (star fil)
++ fals (star fal)
++ fars (star far)
++ hone
:: ^- $-(nail (like hoon))
=+ vaz=(vang & (en-path:^name name))
@ -1168,6 +1215,8 @@
pros
libs
fils
fars
fals
hone
==
--
@ -1356,7 +1405,6 @@
--
::
::
++ road (pole iota)
::
++ pith
|^ $+(pith ^pith)