mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-20 06:58:16 +03:00
Merge remote-tracking branch 'origin/next/arvo' into philip/agent-clay
This commit is contained in:
commit
fc70193ef6
@ -7,6 +7,7 @@
|
||||
:: OR
|
||||
:: :aqua &pill +solid
|
||||
::
|
||||
:: XX: update these examples
|
||||
:: Then try stuff:
|
||||
:: :aqua [%init ~[~bud ~dev]]
|
||||
:: :aqua [%dojo ~[~bud ~dev] "[our eny (add 3 5)]"]
|
||||
@ -480,14 +481,15 @@
|
||||
=^ ms state (poke-pill pil)
|
||||
(emit-cards ms)
|
||||
::
|
||||
[%swap-files ~]
|
||||
[%swap-files @tas]
|
||||
=/ =desk +.val
|
||||
=. userspace-ova.pil
|
||||
=/ slim-dirs=(list path)
|
||||
~[/app /ted /gen /lib /mar /sur /hoon/sys /arvo/sys /zuse/sys]
|
||||
:: take all files from a userspace desk
|
||||
=/ all-dirs=(list path) ~[/]
|
||||
:_ ~
|
||||
%- unix-event:pill-lib
|
||||
%- %*(. file-ovum:pill-lib directories slim-dirs)
|
||||
/(scot %p our.hid)/work/(scot %da now.hid)
|
||||
%+ %*(. file-ovum:pill-lib directories all-dirs)
|
||||
desk /(scot %p our.hid)/[desk]/(scot %da now.hid)
|
||||
=^ ms state (poke-pill pil)
|
||||
(emit-cards ms)
|
||||
::
|
||||
|
@ -562,15 +562,16 @@
|
||||
((dy-cast (list cable:clay) !>(*(list cable:clay))) q.cay)
|
||||
==
|
||||
::
|
||||
%dir =+ ^= pax ^- path
|
||||
%dir =+ ^= bem ^- beam
|
||||
%- need %- de-beam
|
||||
=+ pax=((dy-cast path !>(*path)) q.cay)
|
||||
?: ?=(~ pax) ~[(scot %p our.hid) %base '0']
|
||||
?: ?=([@ ~] pax) ~[i.pax %base '0']
|
||||
?: ?=([@ @ ~] pax) ~[i.pax i.t.pax '0']
|
||||
pax
|
||||
?: =(~ .^((list path) %ct pax))
|
||||
?: =(~ .^((list path) %ct (en-beam he-beam(dir bem))))
|
||||
+(..dy (he-diff %tan 'dojo: dir does not exist' ~))
|
||||
=. dir (need (de-beam pax))
|
||||
=. dir bem
|
||||
=- +>(..dy (he-diff %tan - ~))
|
||||
rose+[" " `~]^~[leaf+"=%" (smyt (en-beam he-beak s.dir))]
|
||||
==
|
||||
|
50
pkg/arvo/gen/hood/new-desk.hoon
Normal file
50
pkg/arvo/gen/hood/new-desk.hoon
Normal file
@ -0,0 +1,50 @@
|
||||
:: |new-desk: creates a minimal desk
|
||||
::
|
||||
/+ *generators
|
||||
::
|
||||
:- %ask
|
||||
|= $: [now=@da eny=@uvJ bek=beak]
|
||||
[=desk ~]
|
||||
[from=$~(%base desk) hard=_|]
|
||||
==
|
||||
::
|
||||
=; make-new-desk
|
||||
?. ?& !hard
|
||||
(~(has in .^((set ^desk) %cd (en-beam bek(q %$) /))) desk)
|
||||
==
|
||||
(make-new-desk)
|
||||
%+ print (rap 3 'the desk %' desk ' already exists. overwrite it?' ~)
|
||||
%+ prompt [%& %prompt "overwrite? (y/N) "]
|
||||
|= in=tape
|
||||
?. |(=("y" in) =("Y" in) =("yes" in))
|
||||
no-product
|
||||
(make-new-desk)
|
||||
::
|
||||
|. %- produce
|
||||
:- %helm-pass
|
||||
%^ new-desk:cloy desk
|
||||
~
|
||||
%- ~(gas by *(map path page:clay))
|
||||
|^ =- (turn - mage)
|
||||
^- (list path)
|
||||
:~ /mar/noun/hoon
|
||||
/mar/hoon/hoon
|
||||
/mar/txt/hoon
|
||||
/mar/kelvin/hoon
|
||||
/sys/kelvin
|
||||
==
|
||||
::
|
||||
++ mage
|
||||
|= =path
|
||||
:- path
|
||||
^- page:clay
|
||||
:- (rear path)
|
||||
~| [%missing-source-file from path]
|
||||
.^ *
|
||||
%cx
|
||||
(scot %p p.bek)
|
||||
from
|
||||
(scot %da now)
|
||||
path
|
||||
==
|
||||
--
|
@ -1,5 +1,4 @@
|
||||
:: clay (4c), revision control
|
||||
!:
|
||||
:: The way to understand Clay is to take it section-by-section:
|
||||
::
|
||||
:: - Data structures. You *must* start here; make sure you understand
|
||||
@ -129,23 +128,6 @@
|
||||
ren=rein :: force agents on/off
|
||||
== ::
|
||||
::
|
||||
:: Commit state.
|
||||
::
|
||||
:: -- `del` is the paths we're deleting.
|
||||
:: -- `ink` is the insertions of hoon files (short-circuited for
|
||||
:: bootstrapping).
|
||||
:: -- `ins` is all the other insertions.
|
||||
:: -- `dif` is the diffs in `dig` applied to their files.
|
||||
:: -- `mut` is the diffs between `muc` and the original files.
|
||||
::
|
||||
+$ dork :: diff work
|
||||
$: del=(list path) :: deletes
|
||||
ink=(list (pair path cage)) :: hoon inserts
|
||||
ins=(list (pair path cage)) :: inserts
|
||||
dif=(list (trel path lobe cage)) :: changes
|
||||
mut=(list (trel path lobe cage)) :: mutations
|
||||
== ::
|
||||
::
|
||||
:: Over-the-wire backfill request/response
|
||||
::
|
||||
+$ fill
|
||||
@ -4303,7 +4285,6 @@
|
||||
[~ ..park]
|
||||
:: virtualize to catch and produce deterministic failures
|
||||
::
|
||||
!:
|
||||
|^ =/ res (mule |.(read))
|
||||
?: ?=(%& -.res) p.res
|
||||
%. [[~ ~] ..park]
|
||||
|
@ -1265,7 +1265,7 @@
|
||||
:: the request may include a 'Last-Event-Id' header
|
||||
::
|
||||
=/ maybe-last-event-id=(unit @ud)
|
||||
?~ maybe-raw-header=(get-header:http 'Last-Event-ID' header-list.request)
|
||||
?~ maybe-raw-header=(get-header:http 'last-event-id' header-list.request)
|
||||
~
|
||||
(rush u.maybe-raw-header dum:ag)
|
||||
:: flush events older than the passed in 'Last-Event-ID'
|
||||
|
@ -108,7 +108,16 @@
|
||||
|= arg=vase
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
;< =bowl:strand bind:m get-bowl:strandio
|
||||
=/ paz=(list path)
|
||||
:: if no args, test everything under /=base=/tests
|
||||
::
|
||||
?~ q.arg
|
||||
~[/(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/tests]
|
||||
:: else cast path to ~[path] if needed
|
||||
::
|
||||
?@ +<.q.arg
|
||||
[(tail !<([~ path] arg)) ~]
|
||||
(tail !<([~ (list path)] arg))
|
||||
=/ bez=(list beam)
|
||||
(turn paz |=(p=path ~|([%test-not-beam p] (need (de-beam p)))))
|
||||
|
Loading…
Reference in New Issue
Block a user