shrub/gen/solid.hoon

67 lines
1.6 KiB
Plaintext
Raw Normal View History

:: Compile arvo as a pill noun, without compiler changes.
:: usage
::
:: .urbit/pill +solid
2015-06-18 04:08:47 +03:00
::
2016-02-11 03:41:28 +03:00
:::: /hoon/solid/gen
2015-06-18 04:08:47 +03:00
::
/? 310
2015-06-18 04:08:47 +03:00
::
::::
!:
2015-09-12 03:24:51 +03:00
:- %say
2016-08-11 21:15:06 +03:00
|= $: {now/@da eny/@uvJ bec/beak}
2018-03-19 07:18:20 +03:00
{arg/$@(~ {top/path ~}) dub/_|}
2015-06-18 04:08:47 +03:00
==
2017-12-07 04:51:26 +03:00
?~ arg $(arg ~[top=`path`/(scot %p p.bec)/[q.bec]/(scot %da now)/sys])
2017-12-07 04:53:17 +03:00
::
:- %noun
2017-12-07 04:51:26 +03:00
=+ pax=`path`(weld top.arg `path`[%hoon ~])
2017-12-07 21:13:34 +03:00
=+ arp=`path`(weld top.arg `path`[%arvo ~])
2015-06-18 04:08:47 +03:00
~& %solid-start
=+ txt=.^(@t %cx (weld pax `path`[%hoon ~]))
=+ rax=.^(@t %cx (weld arp `path`[%hoon ~]))
=+ ^= ken
2018-03-19 06:54:47 +03:00
=- ?:(?=(%& -.res) p.res (mean (flop p.res)))
^= res %- mule |.
~& %solid-loaded
=+ gen=(rain pax txt)
~& %solid-parsed
=+ one=(~(mint ut %noun) %noun gen)
~& %solid-compiled
2017-12-07 04:51:26 +03:00
?. dub
=+ two=(~(mint ut p.one) %noun (rain arp rax))
~& %solid-arvo
[7 q.one q.two]
=+ zax=(cat 3 '=> ' (cat 3 txt (cat 3 ' ' rax)))
~& %solid-double-loading
2017-12-07 04:51:26 +03:00
=+ all=.*(0 q.one)
~& %solid-double-loaded
=< +
.*(all [9 2 [0 2] [1 %noun zax] [0 7]])
2017-12-07 04:51:26 +03:00
::
~& [%solid-kernel `@ux`(mug ken)]
2015-06-18 04:08:47 +03:00
:- ken
=+ all=.*(0 ken)
=+ ^= vay ^- (list {p/@tas q/path})
:~ [%$ /zuse]
2018-08-15 23:07:39 +03:00
[%f /vane/ford]
[%b /vane/behn]
[%d /vane/dill]
2017-12-07 08:28:11 +03:00
[%a /vane/ames]
[%c /vane/clay]
[%g /vane/gall]
[%e /vane/eyre]
[%j /vane/jael]
2015-06-18 04:08:47 +03:00
==
|- ^+ all
?~ vay all
2017-12-07 04:51:26 +03:00
=+ pax=(weld top.arg q.i.vay)
2016-01-26 03:47:58 +03:00
=+ txt=.^(@ %cx (weld pax `path`[%hoon ~]))
2015-06-18 04:08:47 +03:00
=+ sam=[now `ovum`[[%gold ~] [%veer p.i.vay pax txt]]]
~& [%solid-veer i.vay]
=+ gat=.*(all .*(all [0 42]))
=+ nex=+:.*([-.gat [sam +>.gat]] -.gat)
$(vay t.vay, all nex)