mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
Merge remote-tracking branch 'phil/github-api' into eyre-sec
Pulled in %cy disenhashing, breach, github api binding
This commit is contained in:
commit
8a6b9b4b1a
@ -47,7 +47,7 @@ $: cred=(unit ,[app-secret=@t client-id=@t])
|
||||
++ hostname ^- hart
|
||||
?+ (clan our.hid) !!
|
||||
%czar [| ?+(our.hid `8.443 %~fyr `8.444) `/localhost]
|
||||
%duke [| `8.444 `/org/urbit/(crip +:<our.hid>)]
|
||||
%duke [| `8.443 `/org/urbit/(crip +:<our.hid>)]
|
||||
==
|
||||
++ auth-url
|
||||
%+ weld "https://sandbox.coinbase.com/oauth/authorize"
|
||||
|
102
ape/gh.hoon
Normal file
102
ape/gh.hoon
Normal file
@ -0,0 +1,102 @@
|
||||
/? 314
|
||||
=> |%
|
||||
++ move (pair bone card)
|
||||
++ sub-result
|
||||
$% [%json json]
|
||||
==
|
||||
++ card
|
||||
$% [%diff sub-result]
|
||||
[%them wire (unit hiss)]
|
||||
==
|
||||
--
|
||||
|_ [hid=bowl cnt=@ hook=(unit ,@t)]
|
||||
++ gh
|
||||
|_ [style=@tas pax=path]
|
||||
++ real-pax (scan "https://api.github.com{<`path`pax>}" auri:epur)
|
||||
++ auth
|
||||
['Authorization' 'Basic cGhpbGlwY21vbmt0ZXN0OjEzMzdwYXNzd29yZA==' ~]
|
||||
++ scry
|
||||
^- hiss
|
||||
=- ~& [%requesting -] -
|
||||
?+ style ~|(%invalid-style !!)
|
||||
%read-unauth read-unauth
|
||||
%read-auth read-auth
|
||||
%listen listen
|
||||
==
|
||||
++ read-unauth `hiss`[real-pax %get ~ ~]
|
||||
++ read-auth `hiss`[real-pax %get [auth ~ ~] ~]
|
||||
++ listen
|
||||
^- hiss
|
||||
?~ hook
|
||||
create-hook
|
||||
update-hook
|
||||
++ create-hook
|
||||
?> ?=([@ @ @ *] pax)
|
||||
:* %+ scan
|
||||
=+ [(trip i.pax) (trip i.t.pax)]
|
||||
"https://api.github.com/repos/{-<}/{->}/hooks"
|
||||
auri:epur
|
||||
%post [auth ~ ~] ~
|
||||
%- taco %- crip %- pojo %- jobe :~
|
||||
name/s/%web
|
||||
active/b/&
|
||||
events/a/(turn `(list ,@t)`t.t.pax |=(a=@t s/a))
|
||||
:- %config
|
||||
%- jobe :~
|
||||
[%url s/'http://107.170.195.5:8445/~/to/gh/json.json?anon&wire=/']
|
||||
[%'content_type' s/%json]
|
||||
==
|
||||
==
|
||||
==
|
||||
++ update-hook
|
||||
?> ?=([@ @ @ *] pax)
|
||||
:* %+ scan
|
||||
=+ [(trip i.pax) (trip i.t.pax)]
|
||||
"https://api.github.com/repos/{-<}/{->}/hooks/{(trip (need hook))}"
|
||||
auri:epur
|
||||
%post [auth ~ ~] ~
|
||||
%- taco %- crip %- pojo %- jobe :~
|
||||
[%'add_events' a/(turn `(list ,@t)`t.t.pax |=(a=@t s/a))]
|
||||
==
|
||||
==
|
||||
--
|
||||
::
|
||||
++ poke-json
|
||||
|= jon=json
|
||||
^- [(list move) _+>.$]
|
||||
=+ ^- [repo=json sender=json hok=json hook-id=@t zen=json]
|
||||
%- need
|
||||
%. jon
|
||||
=> jo
|
||||
(ot repository/some sender/some hook/some 'hook_id'^no zen/some ~)
|
||||
~& [%id hook-id]
|
||||
[~ +>.$(hook `hook-id)]
|
||||
::
|
||||
++ peer-scry-x
|
||||
|= pax=path
|
||||
^- [(list move) _+>.$]
|
||||
:_ +>.$(cnt now.hid) :_ ~
|
||||
?> ?=(^ pax)
|
||||
=- ~& [%peered -] -
|
||||
[ost.hid %them [%x (scot %ud cnt) pax] ~ ~(scry gh i.pax t.pax)]
|
||||
::
|
||||
++ thou-x
|
||||
|= [way=wire res=httr]
|
||||
^- [(list move) _+>.$]
|
||||
?> ?=([@ *] way)
|
||||
:_ +>.$ :_ ~
|
||||
:^ ost.hid %diff %json
|
||||
?. &((gte p.res 200) (lth p.res 300))
|
||||
(jape "bad response {<p.res>} {<r.res>}")
|
||||
?~ r.res
|
||||
(jape "empty response {<p.res>}")
|
||||
=+ (rush q.u.r.res apex:poja)
|
||||
?~ -
|
||||
(jape "bad json {<p.res>} {<u.r.res>}")
|
||||
u.-
|
||||
::
|
||||
++ peek
|
||||
|= [ren=@tas tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
~ ::``noun/[ren tyl]
|
||||
--
|
14
ape/github.hoon
Normal file
14
ape/github.hoon
Normal file
@ -0,0 +1,14 @@
|
||||
|_ [hid=bowl *]
|
||||
++ poke-path
|
||||
|= pax=path
|
||||
:_ +>.$ :_ ~
|
||||
[ost.hid %peer /into-the-mist [our.hid %gh] scry/x/pax]
|
||||
++ diff-json-into-the-mist
|
||||
|= [way=wire jon=json]
|
||||
~& (pojo jon)
|
||||
[~ +>.$]
|
||||
++ peek
|
||||
|= [ren=@tas tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
``noun/[ren tyl]
|
||||
--
|
@ -120,6 +120,7 @@
|
||||
++ poke-kiln-mv (wrap poke-mv):from-kiln
|
||||
++ poke-kiln-rm (wrap poke-rm):from-kiln
|
||||
++ poke-kiln-schedule (wrap poke-schedule):from-kiln
|
||||
++ poke-kiln-track (wrap poke-track):from-kiln
|
||||
++ poke-kiln-sync (wrap poke-sync):from-kiln
|
||||
++ poke-kiln-start-autoload (wrap poke-start-autoload):from-kiln
|
||||
++ poke-kiln-autoload (wrap poke-autoload):from-kiln
|
||||
|
@ -413,7 +413,7 @@
|
||||
vix=(bex +((cut 0 [25 2] mag))) :: width of sender
|
||||
tay=(cut 0 [27 5] mag) :: message type
|
||||
==
|
||||
?> =(7 vez)
|
||||
?> =(0 vez)
|
||||
?> =(chk (end 0 20 (mug bod)))
|
||||
:+ [(end 3 wix bod) (cut 3 [wix vix] bod)]
|
||||
(kins tay)
|
||||
@ -433,7 +433,7 @@
|
||||
=+ tay=(ksin q.kec)
|
||||
%+ mix
|
||||
%+ can 0
|
||||
:~ [3 7]
|
||||
:~ [3 0]
|
||||
[20 (mug bod)]
|
||||
[2 yax]
|
||||
[2 qax]
|
||||
@ -1018,7 +1018,7 @@
|
||||
++ gnaw :: gnaw:am
|
||||
|= [kay=cape ryn=lane pac=rock] :: process packet
|
||||
^- [p=(list boon) q=fort]
|
||||
?. =(7 (end 0 3 pac)) [~ fox]
|
||||
?. =(0 (end 0 3 pac)) [~ fox]
|
||||
=+ kec=(bite pac)
|
||||
?: (goop p.p.kec) [~ fox]
|
||||
?. (~(has by urb.ton.fox) q.p.kec)
|
||||
|
@ -1517,7 +1517,7 @@
|
||||
%v [~ %dome !>(dom)]
|
||||
%x !! :: ?~(q.ank.dom ~ [~ q.u.q.ank.dom])
|
||||
%y !! :: [~ %arch !>(as-arch)]
|
||||
%z [~ %ankh !>(ank.dom)]
|
||||
%z !! :: [~ %ankh !>(ank.dom)]
|
||||
==
|
||||
::
|
||||
++ new-lobes :: object hash set
|
||||
@ -1588,9 +1588,14 @@
|
||||
|= [yon=aeon pax=path]
|
||||
^- (unit (unit ,[%dome (hypo dome)]))
|
||||
?: (lth yon let.dom)
|
||||
~
|
||||
:* ~ ~ %dome -:!>(%dome)
|
||||
ank=`[[%ank-in-old-v-not-implemented *ankh] ~ ~]
|
||||
let=yon
|
||||
hit=(mo (skim (~(tap by hit.dom)) |=([p=@ud *] (lte p yon))))
|
||||
lab=(mo (skim (~(tap by lab.dom)) |=([* p=@ud] (lte p yon))))
|
||||
==
|
||||
?: (gth yon let.dom)
|
||||
`~
|
||||
~
|
||||
``[%dome -:!>(*dome) dom]
|
||||
::
|
||||
++ read-x
|
||||
@ -1640,6 +1645,28 @@
|
||||
:: ~& cy/pax
|
||||
:- -:!>(*arch)
|
||||
^- arch
|
||||
:- (~(get by q.yak) pax)
|
||||
^- (map span ,~)
|
||||
%- mo ^- (list (pair span ,~))
|
||||
%+ turn
|
||||
^- (list (pair path lobe))
|
||||
%+ skim (~(tap by (~(del by q.yak) pax)))
|
||||
|= [paf=path lob=lobe]
|
||||
=(pax (scag len paf))
|
||||
|= [paf=path lob=lobe]
|
||||
=+ pat=(slag len paf)
|
||||
[?>(?=(^ pat) i.pat) ~]
|
||||
::
|
||||
++ read-z
|
||||
|= [yon=aeon pax=path]
|
||||
^- (unit (unit ,[%uvi (hypo ,@uvI)]))
|
||||
?: =(0 yon)
|
||||
``uvi/[-:!>(*@uvI) *@uvI]
|
||||
=+ tak=(~(get by hit.dom) yon)
|
||||
?~ tak
|
||||
~
|
||||
=+ yak=(tako-to-yaki u.tak)
|
||||
=+ len=(lent pax)
|
||||
=+ ^- descendants=(list (pair path lobe))
|
||||
:: ~& %turning
|
||||
:: =- ~& %turned -
|
||||
@ -1652,18 +1679,15 @@
|
||||
|= [paf=path lob=lobe]
|
||||
[(slag len paf) lob]
|
||||
=+ us=(~(get by q.yak) pax)
|
||||
:+ ?: &(?=(~ descendants) ?=(~ us))
|
||||
*@uvI
|
||||
%+ roll
|
||||
^- (list (pair path lobe))
|
||||
[[~ ?~(us *lobe u.us)] descendants]
|
||||
|=([[path lobe] @uvI] (shax (jam +<)))
|
||||
us
|
||||
^- (map span ,~)
|
||||
%- mo ^- (list (pair span ,~))
|
||||
%+ turn descendants
|
||||
|= [paf=path lob=lobe]
|
||||
[?>(?=(^ paf) i.paf) ~]
|
||||
^- (unit (unit ,[%uvi (hypo ,@uvI)]))
|
||||
:^ ~ ~ %uvi
|
||||
:- -:!>(*@uvI)
|
||||
?: &(?=(~ descendants) ?=(~ us))
|
||||
*@uvI
|
||||
%+ roll
|
||||
^- (list (pair path lobe))
|
||||
[[~ ?~(us *lobe u.us)] descendants]
|
||||
|=([[path lobe] @uvI] (shax (jam +<)))
|
||||
::
|
||||
++ read-at-aeon :: read-at-aeon:ze
|
||||
|= [yon=aeon mun=mood] :: seek and read
|
||||
@ -1687,6 +1711,8 @@
|
||||
:: ==
|
||||
:: -
|
||||
(bind (read-y yon r.mun) (curr bind (cury same %&)))
|
||||
?: ?=(%z p.mun)
|
||||
(bind (read-z yon r.mun) (curr bind (cury same %&)))
|
||||
%+ bind
|
||||
(rewind yon)
|
||||
|= a=(unit ,_+>.$)
|
||||
@ -1791,7 +1817,7 @@
|
||||
::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
++ me :: merge ali into bob
|
||||
|= [ali=(pair ship desk) alh=(unit ankh) new=?] :: from
|
||||
|= [ali=(pair ship desk) alh=(unit dome) new=?] :: from
|
||||
=+ bob=`(pair ship desk)`[our syd] :: to
|
||||
=+ ^- dat=(each mery term)
|
||||
?~ mer
|
||||
@ -2479,8 +2505,8 @@
|
||||
=+ hot=q.bob.dat
|
||||
=+ ^= lal
|
||||
%+ biff alh
|
||||
|= hal=ankh
|
||||
(~(get by hat) pax)
|
||||
|= had=dome
|
||||
(~(get by q:(tako-to-yaki (~(got by hit.had) let.had))) pax)
|
||||
=+ lol=(~(get by hot) pax)
|
||||
|- ^- silk
|
||||
?: =([~ lob] lol)
|
||||
@ -2488,7 +2514,7 @@
|
||||
?> ?=(%& -<)
|
||||
[%$ p.-]
|
||||
?: =([~ lob] lal)
|
||||
[%$ +:(need fil.ank:(descend-path:(zu (need alh)) pax))]
|
||||
[%$ +:(need fil.ank:(descend-path:(zu ank:(need alh)) pax))]
|
||||
=+ bol=(~(got by lat.ran) lob)
|
||||
?- -.bol
|
||||
%direct [%volt q.bol]
|
||||
@ -2759,12 +2785,12 @@
|
||||
=* sud i.t.t.t.t.tea
|
||||
=* sat i.t.t.t.t.t.tea
|
||||
=+ dat=?-(+<.q.hin %writ [%& p.q.hin], %made [%| q.q.hin])
|
||||
=+ ^- kan=(unit ankh)
|
||||
=+ ^- kan=(unit dome)
|
||||
%+ biff (~(get by fat.ruf) her)
|
||||
|= room
|
||||
%+ bind (~(get by dos) sud)
|
||||
|= dojo
|
||||
ank.dom
|
||||
dom
|
||||
=^ mos ruf
|
||||
=+ den=((de now hen ruf) [. .]:our syd)
|
||||
abet:abet:(route:(me:ze:den [her sud] kan |) sat dat)
|
||||
|
110
arvo/ford.hoon
110
arvo/ford.hoon
@ -13,10 +13,16 @@
|
||||
++ note :: out request $->
|
||||
$% $: %c :: to %clay
|
||||
$% [%warp p=sock q=riff] ::
|
||||
== == ::
|
||||
$: %g :: to %clay
|
||||
$% [%deal p=sock q=cush] ::
|
||||
== == == ::
|
||||
++ sign :: in result $<-
|
||||
$% $: %c :: by %clay
|
||||
$% [%writ p=riot] ::
|
||||
== == ::
|
||||
$: %g :: by %gall
|
||||
$% [%unto p=cuft] ::
|
||||
== == == ::
|
||||
++ trap |*(a=_,* ,_|?(*a)) :: XX in h/h
|
||||
-- ::
|
||||
@ -36,7 +42,7 @@
|
||||
$: p=cafe :: cache
|
||||
$= q ::
|
||||
$% [%0 p=(set beam) q=a] :: depends/product
|
||||
[%1 p=(set ,[p=care q=beam r=tang])] :: blocks
|
||||
[%1 p=(set ,[van=vane ren=care bem=beam tan=tang])] :: blocks
|
||||
[%2 p=(set beam) q=tang] :: depends/error
|
||||
== ::
|
||||
== ::
|
||||
@ -72,9 +78,10 @@
|
||||
$: nah=duct :: cause
|
||||
[bek=beak kas=silk] :: problem
|
||||
keg=(map (pair term beam) cage) :: block results
|
||||
kig=[p=@ud q=(map ,@ud ,[p=care q=beam])] :: blocks
|
||||
kig=[p=@ud q=(map ,@ud ,[van=vane ren=care bem=beam])] :: blocks
|
||||
== ::
|
||||
++ gagl (list (pair gage gage))
|
||||
++ gagl (list (pair gage gage)) ::
|
||||
++ vane ?(%a %b %c %d %e %f %g) ::
|
||||
-- ::
|
||||
|% ::
|
||||
++ calf :: reduce calx
|
||||
@ -222,12 +229,21 @@
|
||||
~& [%ford-lost num]
|
||||
+>.$
|
||||
(~(resp zo [num u.tus]) tik p.+.sih)
|
||||
::
|
||||
%unto
|
||||
=+ tus=(~(get by q.tad.bay) num)
|
||||
?~ tus
|
||||
~& [%ford-lost num]
|
||||
+>.$
|
||||
?. ?=(%diff -.p.+.sih)
|
||||
+>.$
|
||||
(~(resd zo [num u.tus]) tik p.p.+.sih)
|
||||
==
|
||||
::
|
||||
++ axun :: take rev update
|
||||
|= [tea=wire dep=@uvH bem=beam sih=sign]
|
||||
^+ +>
|
||||
?- -.+.sih
|
||||
?+ -.+.sih ~|(%bad-axun !!)
|
||||
%writ
|
||||
?~ p.sih +>.$
|
||||
:: ~& writ/tea
|
||||
@ -284,7 +300,7 @@
|
||||
=< (welp :_(mow (turn (~(tap in p.u.dap)) .)))
|
||||
|= bem=beam
|
||||
:^ hen %pass [(scot %p our) (scot %uv dep) (tope bem)]
|
||||
[%c [%warp [our p.bem] q.bem ~ [%next %y r.bem (flop s.bem)]]]
|
||||
[%c [%warp [our p.bem] q.bem ~ [%next %z r.bem (flop s.bem)]]]
|
||||
== ==
|
||||
::
|
||||
++ zo
|
||||
@ -312,9 +328,10 @@
|
||||
==
|
||||
++ camo :: stop requests
|
||||
^+ .
|
||||
=+ kiz=(~(tap by q.kig) *(list ,[p=@ud q=[p=care q=beam]]))
|
||||
=+ kiz=(~(tap by q.kig) *(list ,[p=@ud q=[van=vane ren=care bem=beam]]))
|
||||
|- ^+ +>
|
||||
?~ kiz +>
|
||||
?. ?=(%c van.q.i.kiz) +>
|
||||
%= $
|
||||
kiz t.kiz
|
||||
mow
|
||||
@ -323,23 +340,37 @@
|
||||
:^ %pass
|
||||
[(scot %p our) (scot %ud num) (scot %ud p.i.kiz) ~]
|
||||
%c
|
||||
[%warp [our p.q.q.i.kiz] q.q.q.i.kiz ~]
|
||||
[%warp [our p.bem.q.i.kiz] q.bem.q.i.kiz ~]
|
||||
==
|
||||
::
|
||||
++ camp :: request a file
|
||||
|= [ren=care bem=beam]
|
||||
|= [van=vane ren=care bem=beam]
|
||||
^+ +>
|
||||
%= +>
|
||||
kig [+(p.kig) (~(put by q.kig) p.kig [ren bem])]
|
||||
mow
|
||||
:_ mow
|
||||
:- hen
|
||||
:^ %pass
|
||||
[(scot %p our) (scot %ud num) (scot %ud p.kig) ~]
|
||||
%c
|
||||
~& >> [%camping ren bem]
|
||||
[%warp [our p.bem] q.bem [~ %sing ren r.bem (flop s.bem)]]
|
||||
==
|
||||
?: ?=(%g van)
|
||||
%= +>.$
|
||||
kig [+(p.kig) (~(put by q.kig) p.kig [%g ren bem])]
|
||||
mow
|
||||
:_ mow
|
||||
:- hen
|
||||
:^ %pass
|
||||
[(scot %p our) (scot %ud num) (scot %ud p.kig) ~]
|
||||
%g
|
||||
~& >> [%camping van ren bem]
|
||||
[%deal [our p.bem] q.bem [%peer %scry ren (flop s.bem)]]
|
||||
==
|
||||
?: ?=(%c van)
|
||||
%= +>.$
|
||||
kig [+(p.kig) (~(put by q.kig) p.kig [%c ren bem])]
|
||||
mow
|
||||
:_ mow
|
||||
:- hen
|
||||
:^ %pass
|
||||
[(scot %p our) (scot %ud num) (scot %ud p.kig) ~]
|
||||
%c
|
||||
~& >> [%camping van ren bem]
|
||||
[%warp [our p.bem] q.bem [~ %sing ren r.bem (flop s.bem)]]
|
||||
==
|
||||
+>.$
|
||||
::
|
||||
++ clef :: cache a result
|
||||
|* sem=*
|
||||
@ -436,28 +467,33 @@
|
||||
^= p
|
||||
%- sa
|
||||
%+ turn p.faw
|
||||
|=(a=[care beam] [-.a +.a *tang])
|
||||
|=(a=[vane care beam] [-.a +<.a +>.a *tang])
|
||||
| [%2 p=*(set beam) q=p.faw]
|
||||
==
|
||||
^= faw
|
||||
|- ^- (each (list (pair care beam)) tang)
|
||||
|- ^- (each (list (trel vane care beam)) tang)
|
||||
?~ p.ton [%& ~]
|
||||
=+ nex=$(p.ton t.p.ton)
|
||||
=+ err=|=(a=tape [%| leaf/a ?:(?=(& -.nex) ~ p.nex)])
|
||||
=+ pax=(path i.p.ton)
|
||||
?~ pax (err "blocking empty")
|
||||
?. ?=(%c (end 3 1 i.pax))
|
||||
(err "blocking not clay")
|
||||
=+ ren=((soft care) (rsh 3 1 i.pax))
|
||||
?~ ren
|
||||
(err "blocking not care")
|
||||
=+ zis=(tome t.pax)
|
||||
?~ zis
|
||||
(err "blocking not beam")
|
||||
?- -.nex
|
||||
& [%& [u.ren u.zis] p.nex]
|
||||
| nex
|
||||
==
|
||||
?: ?=(%g (end 3 1 i.pax))
|
||||
?- -.nex
|
||||
& [%& [%g u.ren u.zis] p.nex]
|
||||
| nex
|
||||
==
|
||||
?: ?=(%c (end 3 1 i.pax))
|
||||
?- -.nex
|
||||
& [%& [%c u.ren u.zis] p.nex]
|
||||
| nex
|
||||
==
|
||||
(err "blocking bad vane")
|
||||
==
|
||||
::
|
||||
++ cowl :: each to bolt
|
||||
@ -597,7 +633,7 @@
|
||||
=< abet
|
||||
|- ^+ ..exec
|
||||
?~ zuk ..exec
|
||||
=+ foo=`_..exec`(camp p.i.zuk q.i.zuk)
|
||||
=+ foo=`_..exec`(camp van.i.zuk ren.i.zuk bem.i.zuk)
|
||||
$(zuk t.zuk, ..exec foo)
|
||||
==
|
||||
::
|
||||
@ -1039,7 +1075,7 @@
|
||||
%+ cope
|
||||
?: ?=(%ud -.r.bem) (fine cof bem)
|
||||
=+ von=(save ~ %cw bem(s ~))
|
||||
?~ von [p=cof q=[%1 [%w bem ~] ~ ~]]
|
||||
?~ von [p=cof q=[%1 [%c %w bem ~] ~ ~]]
|
||||
(fine cof bem(r [%ud ((hard ,@) +.+:(need u.von))]))
|
||||
|= [cof=cafe bem=[[ship desk %ud r=@u] s=spur]]
|
||||
?: =(0 r.bem)
|
||||
@ -1071,7 +1107,7 @@
|
||||
|= [cof=cafe bem=beam]
|
||||
^- (bolt arch)
|
||||
=+ von=(save ~ %cy bem)
|
||||
?~ von [p=cof q=[%1 [%y bem ~] ~ ~]]
|
||||
?~ von [p=cof q=[%1 [%c %y bem ~] ~ ~]]
|
||||
?> ?=([~ %arch ^] u.von)
|
||||
=+ arc=((hard arch) q.q.u.u.von)
|
||||
%+ cope (lamp cof bem)
|
||||
@ -1083,7 +1119,7 @@
|
||||
^- (bolt cage)
|
||||
=+ von=(save ~ %cx bem)
|
||||
?~ von
|
||||
[p=*cafe q=[%1 [[%x bem ~] ~ ~]]]
|
||||
[p=*cafe q=[%1 [[%c %x bem ~] ~ ~]]]
|
||||
?~ u.von
|
||||
(flaw cof leaf/"file not found" (smyt (tope bem)) ~)
|
||||
(fine cof u.u.von)
|
||||
@ -1778,7 +1814,7 @@
|
||||
?~ dif
|
||||
=- (flaw cof leaf/"{<p.cay>} data with bad diff" -)
|
||||
[>type=p.q.coy< >want=p:!>(*(urge cord))< ~]
|
||||
=+ pac=(role (lurk (lore (cat 3 u.txt '\0a')) u.dif))
|
||||
=+ pac=(role (lurk (lore u.txt) u.dif))
|
||||
(fine cof %& p.cay [%atom %t] (end 3 (dec (met 3 pac)) pac))
|
||||
::
|
||||
%+ cope (fang cof p.cay)
|
||||
@ -1814,13 +1850,21 @@
|
||||
|= [tik=@ud rot=riot]
|
||||
^+ ..zo
|
||||
?> (~(has by q.kig) tik)
|
||||
=+ `[ren=care bem=beam]`(~(got by q.kig) tik)
|
||||
=+ `[van=vane ren=care bem=beam]`(~(got by q.kig) tik)
|
||||
?~ rot
|
||||
=^ dep deh.bay (daze ~) :: dependencies?
|
||||
amok:(expo [%made dep %| (smyt ren (tope bem)) ~])
|
||||
=+ (cat 3 'c' ren)
|
||||
exec(q.kig (~(del by q.kig) tik), keg (~(put by keg) [- bem] r.u.rot))
|
||||
::
|
||||
++ resd
|
||||
|= [tik=@ud cag=cage]
|
||||
^+ ..zo
|
||||
?> (~(has by q.kig) tik)
|
||||
=+ `[van=vane ren=care bem=beam]`(~(got by q.kig) tik)
|
||||
=+ (cat 3 'g' ren)
|
||||
exec(q.kig (~(del by q.kig) tik), keg (~(put by keg) [- bem] cag))
|
||||
::
|
||||
++ save
|
||||
^- sled
|
||||
|= [(unit (set monk)) tem=term bem=beam]
|
||||
|
@ -487,6 +487,11 @@
|
||||
^- beak
|
||||
byk:(~(got by bum) dap)
|
||||
::
|
||||
++ mo-peek
|
||||
|= [dap=dude pry=prey ren=@tas tyl=path]
|
||||
^- (unit (unit cage))
|
||||
(ap-peek:(ap-abed:ap dap pry) ren tyl)
|
||||
::
|
||||
++ mo-clip :: apply club
|
||||
|= [dap=dude pry=prey cub=club]
|
||||
?: ?=(%puff -.cub)
|
||||
@ -627,6 +632,22 @@
|
||||
?: ?=(%| -.zem) [`p.zem +>.$]
|
||||
(ap-sake p.zem)
|
||||
::
|
||||
++ ap-peek
|
||||
|= [ren=@tas tyl=path]
|
||||
^- (unit (unit cage))
|
||||
=+ cug=(ap-find %peek ren tyl)
|
||||
?~ cug
|
||||
((slog leaf/"peek find fail" >tyl< ~) [~ ~])
|
||||
=^ arm +>.$ (ap-farm q.u.cug)
|
||||
?: ?=(%| -.arm) ((slog leaf/"peek farm fail" p.arm) [~ ~])
|
||||
=^ zem +>.$ (ap-slam q.u.cug p.arm !>([ren (slag p.u.cug tyl)]))
|
||||
?: ?=(%| -.zem) ((slog leaf/"peek slam fail" p.zem) [~ ~])
|
||||
?+ q.p.zem ((slog leaf/"peek bad result" ~) [~ ~])
|
||||
~ ~
|
||||
[~ ~] [~ ~]
|
||||
[~ ~ term *] ``[+14.q.p.zem (slot 15 p.zem)]
|
||||
==
|
||||
::
|
||||
++ ap-club :: apply effect
|
||||
|= cub=club
|
||||
^+ +>
|
||||
@ -1244,8 +1265,21 @@
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit (pair mark ,*)))
|
||||
[~ ~]
|
||||
^- (unit (unit cage))
|
||||
?: ?& =(%u ren)
|
||||
=(~ tyl)
|
||||
=(`da/now lot)
|
||||
(~(has by pol.all) who)
|
||||
(~(has by bum:(~(got by pol.all) who)) syd)
|
||||
==
|
||||
``[%null [%atom %n] ~]
|
||||
?. (~(has by pol.all) who)
|
||||
~
|
||||
?. =(`da/now lot)
|
||||
~
|
||||
?. (~(has by bum:(~(got by pol.all) who)) syd)
|
||||
[~ ~]
|
||||
(mo-peek:(mo-abed:mo who *duct) syd high/`who ren tyl)
|
||||
::
|
||||
++ stay :: save w/o cache
|
||||
`axle`all
|
||||
|
@ -4788,20 +4788,31 @@
|
||||
|= lub=@
|
||||
=| tez=(list ,@t)
|
||||
|- ^+ tez
|
||||
=+ ^= wor
|
||||
=+ [meg=0 i=0]
|
||||
|- ^- [meg=@ i=@ end=@f]
|
||||
=+ gam=(cut 3 [i 1] lub)
|
||||
?: =(0 gam)
|
||||
[meg i %.y]
|
||||
?: =(10 gam)
|
||||
[meg i %.n]
|
||||
$(meg (cat 3 meg gam), i +(i))
|
||||
?: end.wor
|
||||
(flop ^+(tez [meg.wor tez]))
|
||||
?: =(0 lub) (flop tez)
|
||||
=+ ^= meg
|
||||
=+ meg=0
|
||||
|- ^- @ud
|
||||
=+ gam=(cut 3 [meg 1] lub)
|
||||
?:(|(=(10 gam) =(0 gam)) meg $(meg +(meg)))
|
||||
=+ res=(rsh 3 +(meg) lub)
|
||||
?: &(=(0 (cut 3 [meg 1] lub)) !=(0 res))
|
||||
!!
|
||||
$(lub res, tez [(end 3 meg lub) tez])
|
||||
$(lub (rsh 3 +(i.wor) lub), tez [meg.wor tez])
|
||||
::
|
||||
++ role :: line list to atom
|
||||
|= tez=(list ,@t)
|
||||
(rap 3 (turn tez |=(a=@t (cat 3 a 10))))
|
||||
=| [our=@ i=@ud]
|
||||
|- ^- @
|
||||
?~ tez
|
||||
our
|
||||
?: =(0 i.tez)
|
||||
$(i +(i), tez t.tez, our (cat 3 our 10))
|
||||
?: =(0 i)
|
||||
$(i +(i), tez t.tez, our i.tez)
|
||||
$(i +(i), tez t.tez, our (cat 3 (cat 3 our 10) i.tez))
|
||||
::
|
||||
++ lump :: apply patch
|
||||
|= [don=udon src=*]
|
||||
@ -10227,7 +10238,7 @@
|
||||
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
~% %arvo + ~
|
||||
|%
|
||||
++ arch ,[hax=@uvI fil=(unit ,@uvI) dir=(map ,@ta ,~)]:: fundamental node
|
||||
++ arch ,[fil=(unit ,@uvI) dir=(map ,@ta ,~)] :: fundamental node
|
||||
++ arvo (mold ,[p=term q=mill] mill) :: arvo card
|
||||
++ beam ,[[p=ship q=desk r=case] s=path] :: global name
|
||||
++ beak ,[p=ship q=desk r=case] :: garnish with beak
|
||||
@ -10332,12 +10343,14 @@
|
||||
++ ruck :: update vase
|
||||
|= [pax=path txt=@ta]
|
||||
^+ +>
|
||||
=- ?:(?=(%| -.res) ((slog p.res) +>.$) p.res)
|
||||
^= res %- mule |.
|
||||
=+ arg=[~2000.1.1 0 =>(~ |+(* ~))]
|
||||
=+ rig=(slym q.sew arg)
|
||||
=+ rev=(slym (slap bud (rain pax txt)) bud)
|
||||
=+ syg=(slym rev arg)
|
||||
~| %load-lost
|
||||
+>.$(q.sew (slam (slap syg [%cnzy %load]) (slap rig [%cnzy %stay])))
|
||||
+>.^$(q.sew (slam (slap syg [%cnzy %load]) (slap rig [%cnzy %stay])))
|
||||
::
|
||||
++ wink :: deploy
|
||||
|= [now=@da eny=@ ski=slad]
|
||||
@ -10546,6 +10559,8 @@
|
||||
::
|
||||
++ vint :: create vane
|
||||
|= [lal=@tas vil=vile bud=vase pax=path txt=@ta] ::
|
||||
=- ?:(?=(%| -.res) ((slog p.res) ~) (some p.res))
|
||||
^= res %- mule |.
|
||||
(vent lal vil bud *worm (slym (slap bud (rain pax txt)) bud))
|
||||
::
|
||||
++ viol :: vane tools
|
||||
@ -10680,6 +10695,7 @@
|
||||
:::::: :::::: Postface ::::::
|
||||
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
=+ pit=`vase`!>(.) ::
|
||||
!:
|
||||
=+ bud=pit :: becomes tang
|
||||
=+ vil=(viol p.bud) :: cached reflexives
|
||||
=| $: lac=? :: laconic bit
|
||||
@ -10715,7 +10731,7 @@
|
||||
?: ?=(%veer -.q.i.ova)
|
||||
$(ova t.ova, +>+.^$ (veer now q.i.ova))
|
||||
?: ?=(%vega -.q.i.ova)
|
||||
(vega now t.ova (path +.q.i.ova))
|
||||
(fall (vega now t.ova (path +.q.i.ova)) [~ +>.^$])
|
||||
?: ?=(%mass -.q.i.ova)
|
||||
=+ avo=$(ova t.ova)
|
||||
:_ +.avo
|
||||
@ -10780,7 +10796,9 @@
|
||||
::
|
||||
++ vega :: reboot kernel
|
||||
|= [now=@da ova=(list ovum) hap=path]
|
||||
^- [p=(list ovum) q=*]
|
||||
^- (unit ,[p=(list ovum) q=*])
|
||||
=- ?:(?=(%| -.res) ((slog p.res) ~) `p.res)
|
||||
^= res %- mule |.
|
||||
=+ pax=(weld hap `path`[%hoon ~])
|
||||
~& [%vega-start hap]
|
||||
=+ src=((hard ,@t) (need (peek now cx/pax)))
|
||||
@ -10801,17 +10819,22 @@
|
||||
++ veer :: install vane/tang
|
||||
|= [now=@da fav=curd]
|
||||
=> .(fav ((hard ,[%veer lal=@ta pax=path txt=@t]) fav))
|
||||
=- ?:(?=(%| -.res) ((slog p.res) +>.$) p.res)
|
||||
^= res %- mule |.
|
||||
?: =(%$ lal.fav)
|
||||
~& [%tang pax.fav `@p`(mug txt.fav)]
|
||||
=+ gen=(rain pax.fav txt.fav)
|
||||
=+ vax=(slap pit gen)
|
||||
+>.$(bud vax)
|
||||
%_ +>
|
||||
+>.^$(bud vax)
|
||||
%_ +>.^$
|
||||
q.niz
|
||||
|- ^+ q.niz
|
||||
?~ q.niz
|
||||
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
|
||||
[[lal.fav q.sew:(vint lal.fav vil bud pax.fav txt.fav)] q.niz]
|
||||
=+ vin=(vint lal.fav vil bud pax.fav txt.fav)
|
||||
?~ vin
|
||||
q.niz
|
||||
[[lal.fav q.sew:u.vin] q.niz]
|
||||
?. =(lal.fav p.i.q.niz)
|
||||
[i.q.niz $(q.niz t.q.niz)]
|
||||
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
|
||||
|
@ -12,16 +12,18 @@
|
||||
!:
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvI bek=beak]
|
||||
[arg=[?(sorc [syd=$|(desk beaky) sorc])] gem=?(%auto germ)]
|
||||
[arg=[?(sorc [syd=$|(desk beaky) sorc])] cas=case gem=?(%auto germ)]
|
||||
==
|
||||
=. cas ?:(=(*case cas) da/now cas)
|
||||
=* our p.bek
|
||||
|^ :- %kiln-merge
|
||||
^- [syd=desk her=ship sud=desk gem=?(%auto germ)]
|
||||
^- [syd=desk her=ship sud=desk cas=case gem=?(%auto germ)]
|
||||
?- arg
|
||||
[@ @ ~] =+(arg [sud ?.(=(our her) her (sein her)) sud gem])
|
||||
[^ ~] =+((pars bek.arg) [dez ?.(=(our who) who (sein who)) dez gem])
|
||||
[* @ @ ~] [(pars-src syd.arg) =+(arg [her sud gem])]
|
||||
[* ^ ~] [(pars-src syd.arg) =+((pars bek.arg) [who dez gem])]
|
||||
[@ @ ~] =+(arg [sud ?.(=(our her) her (sein her)) sud cas gem])
|
||||
[^ ~] =+ (pars bek.arg)
|
||||
[dez ?.(=(our who) who (sein who)) dez cas gem]
|
||||
[* @ @ ~] [(pars-src syd.arg) =+(arg [her sud cas gem])]
|
||||
[* ^ ~] [(pars-src syd.arg) =+((pars bek.arg) [who dez cas gem])]
|
||||
==
|
||||
++ pars |=(a=beaky =+((need (tome a)) `[who=ship dez=desk]`[p q]))
|
||||
++ pars-src
|
||||
|
13
gen/hood/track.hoon
Normal file
13
gen/hood/track.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/sync/hood/gen
|
||||
::
|
||||
/? 314
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvI bec=beak]
|
||||
[arg=[syd=@tas her=@p sud=@tas ~] ~]
|
||||
==
|
||||
:- %kiln-track
|
||||
[syd her sud]:arg
|
108
lib/kiln.hoon
108
lib/kiln.hoon
@ -11,6 +11,9 @@
|
||||
$: rem=(map desk kiln-desk) ::
|
||||
syn=(map kiln-sync ,[let=@ud ust=bone]) ::
|
||||
autoload=? ::
|
||||
cur-hoon=@uvI ::
|
||||
cur-zuse=@uvI ::
|
||||
cur-vanes=(map ,@tas ,@uvI) ::
|
||||
== ::
|
||||
++ kiln-desk :: per-desk state
|
||||
$: auto=? :: escalate on failure
|
||||
@ -42,6 +45,7 @@
|
||||
$: syd=desk ::
|
||||
ali=ship ::
|
||||
sud=desk ::
|
||||
cas=case ::
|
||||
gim=?(%auto germ) ::
|
||||
== ::
|
||||
++ kiln-cp [input=path output=path] ::
|
||||
@ -102,14 +106,20 @@
|
||||
?~ bem
|
||||
=+ "can't unmount bad path: {<mon>}"
|
||||
abet:(spam leaf/- ~)
|
||||
abet:(emit %ogre /unmount-beam [[p q %ud 0] s]:u.bem)
|
||||
abet:(emit %ogre /unmount-beam [[p q ud/0] s]:u.bem)
|
||||
abet:(emit %ogre /unmount-point mon)
|
||||
::
|
||||
++ poke-track ::
|
||||
|= hos=kiln-sync
|
||||
?: (~(has by syn) hos)
|
||||
abet:(spam (render "already syncing" [sud her syd]:hos) ~)
|
||||
abet:abet:start-track:(auto hos)
|
||||
::
|
||||
++ poke-sync ::
|
||||
|= hos=kiln-sync
|
||||
?: (~(has by syn) hos)
|
||||
abet:(spam (render "already syncing" [sud her syd]:hos) ~)
|
||||
abet:abet:start:(auto hos)
|
||||
abet:abet:start-sync:(auto hos)
|
||||
::
|
||||
++ poke-unsync ::
|
||||
|= hus=kiln-unsync
|
||||
@ -121,7 +131,7 @@
|
||||
::
|
||||
++ poke-merge ::
|
||||
|= kiln-merge
|
||||
abet:abet:(merge:(work syd) ali sud gim)
|
||||
abet:abet:(merge:(work syd) ali sud cas gim)
|
||||
::
|
||||
++ poke-cancel
|
||||
|= syd=desk
|
||||
@ -166,14 +176,21 @@
|
||||
::
|
||||
++ poke-start-autoload
|
||||
|= ~
|
||||
=. cur-hoon
|
||||
((hard ,@uvI) .^(%cz /(scot %p our)/home/(scot %da now)/arvo/hoon/hoon))
|
||||
=. cur-zuse
|
||||
((hard ,@uvI) .^(%cz /(scot %p our)/home/(scot %da now)/arvo/zuse/hoon))
|
||||
=. cur-vanes
|
||||
%- mo
|
||||
%+ turn `(list ,@tas)`~[%ames %behn %clay %dill %eyre %ford %gall]
|
||||
|= syd=@tas
|
||||
:- syd
|
||||
((hard ,@uvI) .^(%cz /(scot %p our)/home/(scot %da now)/arvo/[syd]/hoon))
|
||||
=< abet
|
||||
%- emil
|
||||
%+ turn
|
||||
`(list term)`~[%ames %behn %clay %dill %eyre %ford %gall %zuse %hoon]
|
||||
|= syd=term
|
||||
%- emit
|
||||
^- card
|
||||
:* %warp /kiln/autoload/[syd] [our our] %home ~
|
||||
%next %y da/now /arvo/[syd]/hoon
|
||||
:* %warp /kiln/autoload [our our] %home ~
|
||||
%next %z da/now /arvo
|
||||
==
|
||||
::
|
||||
++ poke-overload
|
||||
@ -215,19 +232,55 @@
|
||||
::
|
||||
++ take-writ-autoload
|
||||
|= [way=wire rot=riot]
|
||||
?> ?=([@ ~] way)
|
||||
?> ?=(~ way)
|
||||
?> ?=(^ rot)
|
||||
=+ syd=(slav %tas i.way)
|
||||
=+ vanes=`(list ,@tas)`~[%ames %behn %clay %dill %eyre %ford %gall]
|
||||
=. +>.$
|
||||
?. autoload
|
||||
+>.$
|
||||
?: ?=(%hoon syd)
|
||||
(emit %poke /kiln/reload/[syd] [our %hood] %helm-reset ~)
|
||||
(emit %poke /kiln/reload/[syd] [our %hood] %helm-reload ~[syd])
|
||||
=+ ^= new-hoon
|
||||
((hard ,@uvI) .^(%cz /(scot %p our)/home/(scot %da now)/arvo/hoon/hoon))
|
||||
?: !=(new-hoon cur-hoon)
|
||||
=. cur-hoon new-hoon
|
||||
=. cur-vanes
|
||||
%- mo
|
||||
%+ turn `(list ,@tas)`(turn (~(tap by cur-vanes)) head)
|
||||
|= syd=@tas
|
||||
:- syd
|
||||
%- (hard ,@uvI)
|
||||
.^(%cz /(scot %p our)/home/(scot %da now)/arvo/[syd]/hoon)
|
||||
(emit %poke /kiln/reload/hoon [our %hood] %helm-reset ~)
|
||||
:: XX updates cur-vanes?
|
||||
=+ ^= new-zuse
|
||||
((hard ,@uvI) .^(%cz /(scot %p our)/home/(scot %da now)/arvo/zuse/hoon))
|
||||
?: !=(new-zuse cur-zuse)
|
||||
=. cur-zuse new-zuse
|
||||
=. cur-vanes
|
||||
%- mo
|
||||
%+ turn `(list ,@tas)`(turn (~(tap by cur-vanes)) head)
|
||||
|= syd=@tas
|
||||
:- syd
|
||||
%- (hard ,@uvI)
|
||||
.^(%cz /(scot %p our)/home/(scot %da now)/arvo/[syd]/hoon)
|
||||
(emit %poke /kiln/reload/zuse [our %hood] %helm-reload [%zuse vanes])
|
||||
:: XX updates cur-vanes?
|
||||
=- =. ^cur-vanes cur-vanes
|
||||
(emil cards)
|
||||
%+ roll `(list ,@tas)`vanes
|
||||
=< %_(. cur-vanes ^cur-vanes)
|
||||
::^- $+([@tas _+>.^$] _+>.^$)
|
||||
|= [syd=@tas cur-vanes=(map ,@tas ,@uvI) cards=(list card)]
|
||||
=+ ^= new-vane
|
||||
%- (hard ,@uvI)
|
||||
.^(%cz /(scot %p our)/home/(scot %da now)/arvo/[syd]/hoon)
|
||||
?: =(`new-vane (~(get by cur-vanes) syd))
|
||||
[cur-vanes cards]
|
||||
:- (~(put by cur-vanes) syd new-vane)
|
||||
[[%poke /kiln/reload/[syd] [our %hood] %helm-reload ~[syd]] cards]
|
||||
=. +>.$
|
||||
%- emit :*
|
||||
%warp /kiln/autoload/[syd] [our our] %home ~
|
||||
%next %y da/now /arvo/[syd]/hoon
|
||||
%warp /kiln/autoload [our our] %home ~
|
||||
%next %z da/now /arvo
|
||||
==
|
||||
abet
|
||||
::
|
||||
@ -268,11 +321,19 @@
|
||||
[our her] sud ~
|
||||
==
|
||||
::
|
||||
++ start
|
||||
++ start-track
|
||||
=> (spam (render "activated track" sud her syd) ~)
|
||||
=. let 1
|
||||
%- blab
|
||||
:~ :* ost %warp
|
||||
/kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
[our her] sud ~ %sing %y ud/let /
|
||||
== ==
|
||||
::
|
||||
++ start-sync
|
||||
=> (spam (render "activated sync" sud her syd) ~)
|
||||
%- blab
|
||||
:~ :: [ost %mont /mount syd our syd /]
|
||||
:* ost %warp
|
||||
:~ :* ost %warp
|
||||
/kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
[our her] sud ~ %sing %w [%da now] /
|
||||
== ==
|
||||
@ -318,7 +379,7 @@
|
||||
%- blab :_ ~
|
||||
:* ost %warp
|
||||
/kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
[our her] sud ~ %sing %y [%ud let] /
|
||||
[our her] sud ~ %sing %y ud/let /
|
||||
==
|
||||
--
|
||||
::
|
||||
@ -383,16 +444,15 @@
|
||||
|= [syd=desk her=@p sud=desk gem=?(%auto germ)]
|
||||
^+ +>
|
||||
%- blab :_ ~
|
||||
[ost %poke /kiln/fancy/[^syd] [our %hood] %kiln-merge [syd her sud gem]]
|
||||
[ost %poke /kiln/fancy/[^syd] [our %hood] %kiln-merge [syd her sud cas gem]]
|
||||
::
|
||||
++ spam ::|=(tang ((slog +<) ..spam))
|
||||
|*(* +>(..work (^spam +<)))
|
||||
++ merge
|
||||
|= [her=@p sud=@tas gim=?(%auto germ)]
|
||||
|= [her=@p sud=@tas cas=case gim=?(%auto germ)]
|
||||
^+ +>
|
||||
=. cas [%da now]
|
||||
?. ?=(%auto gim)
|
||||
perform(auto |, gem gim, her her, sud sud)
|
||||
perform(auto |, gem gim, her her, cas cas, sud sud)
|
||||
?: =(0 .^(%cw /(scot %p our)/[syd]/(scot %da now)))
|
||||
=> $(gim %init)
|
||||
.(auto &)
|
||||
|
@ -36,16 +36,13 @@
|
||||
;script:'CodeMirror.fromTextArea(src, {lineNumbers:true, readOnly:true})'
|
||||
==
|
||||
==
|
||||
++ txt (lore (cat 3 own '\0a'))
|
||||
++ txt (lore own)
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ mime |=([p=mite q=octs] q.q)
|
||||
++ noun ,@t :: clam from %noun
|
||||
++ txt
|
||||
|= wan=wain
|
||||
=+ (role wan)
|
||||
(end 3 (dec (met 3 -)) -)
|
||||
++ txt role
|
||||
--
|
||||
++ grad %txt
|
||||
--
|
||||
|
@ -37,17 +37,13 @@
|
||||
==
|
||||
==
|
||||
++ txt
|
||||
(lore (cat 3 own '\0a'))
|
||||
(lore own)
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ mime |=([p=mite q=octs] q.q)
|
||||
++ noun ,@t :: clam from %noun
|
||||
++ txt
|
||||
|= wan=wain
|
||||
^- @t
|
||||
=+ (role wan)
|
||||
(end 3 (dec (met 3 -)) -)
|
||||
++ txt role
|
||||
--
|
||||
++ grad %txt
|
||||
--
|
||||
|
@ -9,17 +9,14 @@
|
||||
++ mime [/text/x-markdown (taco mud)]
|
||||
++ md mud
|
||||
++ txt
|
||||
(lore (cat 3 mud '\0a'))
|
||||
(lore mud)
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ mime |=([p=mite q=octs] q.q)
|
||||
++ noun ,@t
|
||||
++ md |=(@t +<)
|
||||
++ txt
|
||||
|= wan=wain
|
||||
=+ (role wan)
|
||||
(end 3 (dec (met 3 -)) -)
|
||||
++ txt role
|
||||
--
|
||||
++ grad %txt
|
||||
--
|
||||
|
@ -8,16 +8,13 @@
|
||||
|%
|
||||
++ mime [/text/x-markdown (taco mud)]
|
||||
++ txt
|
||||
(lore (cat 3 mud '\0a'))
|
||||
(lore mud)
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ mime |=([p=mite q=octs] q.q)
|
||||
++ noun ,@t
|
||||
++ txt
|
||||
|= wan=wain
|
||||
=+ (role wan)
|
||||
(end 3 (dec (met 3 -)) -)
|
||||
++ txt role
|
||||
--
|
||||
++ grad %txt
|
||||
--
|
||||
|
@ -24,9 +24,9 @@
|
||||
;script: authcode = {(pojo %s authcode)}
|
||||
;script:'''
|
||||
if (authcode)
|
||||
urb.send({
|
||||
urb.send(authcode,
|
||||
{
|
||||
appl: "bit",
|
||||
data: authcode,
|
||||
mark: "oauth2-code"
|
||||
}, function(){
|
||||
})
|
||||
|
@ -61,4 +61,4 @@ Examples
|
||||
--
|
||||
|
||||
Here we label the entire `++aesc` core for optimization. You can see the
|
||||
jet in `gen164/5/aesc.c`.
|
||||
jet in `jets/e/aesc.c`.
|
||||
|
@ -34,7 +34,7 @@ quotes).
|
||||
|
||||
#### [++sail] runes:
|
||||
|
||||
`;-`, `;+`, `;*`, `;%`, and `%cnzy` all compose a tree structure. See
|
||||
`;-`, `;+`, `;*`, `;%`, and `%smzz` all compose a tree structure. See
|
||||
also: [`++sail`]().
|
||||
|
||||
<hr></hr>
|
||||
|
@ -3,7 +3,7 @@ semsig, `;~`, %smsg
|
||||
|
||||
Monad composer
|
||||
|
||||
`;!` is a synthetic rune used to compose functions under a monad.
|
||||
`;~` is a synthetic rune used to compose functions under a monad.
|
||||
|
||||
Produces
|
||||
--------
|
||||
|
@ -80,5 +80,5 @@ Examples
|
||||
~zod/try=> (poxo ;html:";{head meta(charset "utf-8")};{body p p}")
|
||||
"<html><head><meta charset="utf-8"></meta></head><body><p></p><p></p></body></html>"
|
||||
|
||||
Here we create the most basic HTML structure using nested `dotzaz`, and
|
||||
Here we create the most basic HTML structure using nested `semzaz`, and
|
||||
eventually print it properly using [`++poxo`]().
|
||||
|
@ -33,7 +33,7 @@ Queenside:
|
||||
Wide form
|
||||
---------
|
||||
|
||||
None
|
||||
=~(i.p i.t.p i.t.t.p)
|
||||
|
||||
Irregular form
|
||||
--------------
|
||||
|
@ -14,7 +14,7 @@ Produces
|
||||
Sample
|
||||
------
|
||||
|
||||
[`p` is a * `q` is a *]
|
||||
[`p` is a \* `q` is a \*]
|
||||
|
||||
Tall form
|
||||
---------
|
||||
|
@ -50,7 +50,7 @@ Queenside:
|
||||
Wide form
|
||||
---------
|
||||
|
||||
?+(p p.i.r q.i.r, p.i.t.r q.i.t.r, p.i.t.t.r q.i.t.t.r)
|
||||
?+(p q p.i.r q.i.r, p.i.t.r q.i.t.r, p.i.t.t.r q.i.t.t.r)
|
||||
|
||||
Irregular form
|
||||
--------------
|
||||
|
@ -3,7 +3,7 @@ zapzap, `!!`, %zpzp
|
||||
|
||||
Crash
|
||||
|
||||
`!?` is a natural rune that always crashes.
|
||||
`!!` is a natural rune that always crashes.
|
||||
|
||||
Produces
|
||||
--------
|
||||
|
@ -83,7 +83,7 @@ possible; it's not well-optimized.
|
||||
|
||||
There's a web interface to `:talk` at
|
||||
|
||||
http://localhost:8080/~~/home/pub/talk/fab
|
||||
http://localhost:8080/~~/home/pub/talk
|
||||
|
||||
and a dojo interface at
|
||||
|
||||
|
@ -82,21 +82,20 @@ Turn off autosync. The argument needs to match the original
|
||||
|
||||
### Filesystem manipulation
|
||||
|
||||
#### `|rm [paz=(list path)]`
|
||||
#### `|rm [pax=path]`
|
||||
|
||||
Remove any leaf at each of the paths in `paz`.
|
||||
Remove the leaf at `pax`.
|
||||
|
||||
|rm /===/pub/fab/nixon/hoon
|
||||
|
||||
Remember that folders in `%clay` are a consequence of the tree of
|
||||
leaves; there is no `rmdir` or `mkdir`.
|
||||
|
||||
#### `|cp [too=path fro=path how=$|(~ [germ ~])]`
|
||||
#### `|cp [fro=path too=path]`
|
||||
|
||||
Copy the subtree `fro` into the subtree `too`, committing it with
|
||||
the specified merge strategy.
|
||||
Copy the leaf at `fro` to `too`.
|
||||
|
||||
#### `|mv [too=path fro=path how=$|(~ [germ ~])]`
|
||||
#### `|mv [fro=path too=path]`
|
||||
|
||||
In `%clay`, `|mv` is just a shorthand for `|cp` then `|rm`. The
|
||||
`|rm` doesn't happen unless the `|cp` succeeds, obviously -- it's
|
||||
@ -104,11 +103,9 @@ good to be transactional.
|
||||
|
||||
### Filesystem generators
|
||||
|
||||
#### `+cal [paz=(list path)]`
|
||||
#### `+cat [pax=path]`
|
||||
#### `+cat [paz=(list path)]`
|
||||
|
||||
Produce the noun, if any, at each of these (global) paths.
|
||||
`+cat` produces one result, `+cal` a list.
|
||||
|
||||
#### `+ls [pax=path ~]`
|
||||
|
||||
@ -119,11 +116,6 @@ the current directory in Unix, it's not possible to build an
|
||||
trivial `+ls` that's the equivalent of Unix `ls`. You always
|
||||
have to write `+ls %`.
|
||||
|
||||
#### `+ll [pax=path ~]`
|
||||
|
||||
Like `+ls`, but the result is a list of full paths. Useful as
|
||||
Urbit equivalent of the Unix wildcard `*`.
|
||||
|
||||
## A quick overview of `%clay`
|
||||
|
||||
`%clay` is a typed, global revision-control system. Or in other
|
||||
@ -416,3 +408,13 @@ trusted to provide updates. Sometimes, it's useful to sync two
|
||||
desks to each other, so that changes to one or the other are
|
||||
mirrored. Cyclical sync structures are normal and healthy.
|
||||
Also, one desk can be the target of multiple autosyncs.
|
||||
|
||||
### Cancelling a merge
|
||||
|
||||
Sometimes you start a merge that isn't going to finish quickly
|
||||
enough to suit your taste. If you find yourself in this awkward
|
||||
position,
|
||||
|
||||
|cancel %local-desk
|
||||
|
||||
will get you out of it.
|
||||
|
@ -75,7 +75,7 @@ You'll see:
|
||||
---------:talk| don't be rude
|
||||
---------:talk| urbit-meta is politically correct and safe for work
|
||||
~doznec= ~fintud-macrep admitted to %urbit-meta
|
||||
~fintud-macrep:talk=
|
||||
~fintud-macrep:talk>
|
||||
|
||||
Notice the character assignment - stations you're subscribed to are
|
||||
assigned [consistent ASCII glyphs](#-station-glyphs), which you'll
|
||||
@ -84,16 +84,16 @@ when you're talking to them.
|
||||
|
||||
Post a line to `/urbit-meta`:
|
||||
|
||||
~fintud-macrep:talk= hello, world
|
||||
~fintud-macrep:talk> hello, world
|
||||
|
||||
You'll see, echoed back at you through `~doznec`:
|
||||
|
||||
~fintud-macrep:talk= hello, world
|
||||
~fintud-macrep> hello, world
|
||||
|
||||
And of course, anyone else in `/urbit-meta` will see it as well.
|
||||
But you don't care about `/urbit-meta`, so leave it:
|
||||
|
||||
~fintud-macrep:talk= ;leave
|
||||
~fintud-macrep:talk> ;leave >
|
||||
|
||||
You'll see:
|
||||
|
||||
@ -103,7 +103,6 @@ Everyone else will see:
|
||||
|
||||
~doznec= ~fintud-macrep has left %urbit-meta
|
||||
|
||||
|
||||
Now you're ready to use `:talk` for real! For general discussion
|
||||
about Urbit, we recommend `/urbit-meta`.
|
||||
|
||||
@ -234,7 +233,7 @@ most recent; etc.
|
||||
|
||||
### Nicknames
|
||||
|
||||
<mark>Partially implemented</mark>
|
||||
<mark>Implemented, no autocompletion</mark>
|
||||
|
||||
Sometimes you know your Urbit friends by other names, on or
|
||||
offline. Use the `;nick` command to assign or look up
|
||||
|
Loading…
Reference in New Issue
Block a user