Almost building vanes.

This commit is contained in:
C. Guy Yarvin 2017-04-19 07:48:10 -07:00
parent 618b4f7e71
commit f847cf4c12
16 changed files with 1051 additions and 3213 deletions

View File

@ -4,7 +4,7 @@
/? 310
::
::::
!:
::
:- %say
|= $: {now/@da eny/@uvJ bec/beak}
*

View File

@ -122,7 +122,7 @@
$: off/? :: not yet booted
lac/_| :: not verbose
eny/@uvJ :: 512-bit entropy
yor/vase :: %lull, vane models
lul/vase :: %lull, vane models
zus/vase :: %zuse, user lib
van/(map term vase) :: vanes
== ::
@ -752,7 +752,7 @@
:: print new entries
::
~? !=(~ use.dev)
[%what-use (turn (~(tap by use.dev) ~) |=({path *} +<-))]
[%what-old (turn (~(tap by use.dev) ~) |=({path *} +<-))]
~? !=(~ new.dev)
[%what-new (~(tap in new.dev) ~)]
~? !=(~ use.dev)
@ -854,7 +854,7 @@
:: replaced vane in `/neo/vane/*/[nam]`
::
=* nam `term`i.t.t.p.i.zyr
~& [%vane nam p.i.zyr `@p`(mug q.i.zyr)]
~& [%new-vane nam `path`p.i.zyr `@p`(mug q.i.zyr)]
(~(put in mor) nam (wilt q.i.zyr))
::
:: if this is a new install after a heavy reboot,

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
!:
::
:: clay (4c), revision control
::
:: This is split in three top-level sections: structure definitions, main
@ -464,14 +464,14 @@
:: ~& [%aver-mun nao [%from syd lim q.mun]]
?~(nao ~ (read-at-aeon:ze u.nao mun))
::
++ ford-fail |=(tan/tang ~|(%ford-fail (mean tan)))
++ ford-fail |=(tan/tang ~|(%ford-fail (mean:error:userlib tan)))
::
:: Takes either a result or a stack trace. If it's a stack trace, we crash;
:: else, we produce the result.
::
++ unwrap-tang
|* res/(each * tang)
?:(?=($& -.res) p.res (mean p.res))
?:(?=($& -.res) p.res (mean:error:userlib p.res))
::
:: Parse a gage to a list of pairs of cages, crashing on error.
::

View File

@ -367,7 +367,7 @@
{$c $mere *}
?: ?=($& -.p.sih)
+>.$
(mean >%dill-mere-fail< >p.p.p.sih< q.p.p.sih)
(mean:error:userlib >%dill-mere-fail< >p.p.p.sih< q.p.p.sih)
::
{$g $onto *}
:: ~& [%take-gall-onto +>.sih]

View File

@ -629,7 +629,7 @@
bolo :: all vane state
== ::
=* bol ->
~% %eyre-y ..is ~
~% %eyre-y ..ship ~
|%
++ abet :: resolve moves
^- {(list move) bolo}
@ -1021,14 +1021,14 @@
::
{$le $~}
?: ?=($| -.q.sih)
((slog p.q.sih) +>.$) :: XX get-ack (some)?
((slog:error:userlib p.q.sih) +>.$) :: XX get-ack (some)?
%- ~(get-diff lens ~)
?> ?=($json p.p.q.sih) :: XX others
((hard json) q.q.p.q.sih)
::
{$of @ ^}
?: ?=($| -.q.sih)
((slog p.q.sih) +>.$) :: XX get-even %mean
((slog:error:userlib p.q.sih) +>.$) :: XX get-even %mean
%+ get-rush:(ire-ix p.tee) q.tee
?> ?=($json p.p.q.sih) :: XX others
((hard json) q.q.p.q.sih)
@ -1212,7 +1212,7 @@
::
::
++ handle
~% %eyre-h ..is ~
~% %eyre-h ..ship ~
|_ $: {hat/hart pok/pork quy/quay} :: purl parsed url
{cip/clip aut/?} :: client ip nonymous?
{mef/meth maf/math bod/(unit octs)} :: method+headers+body
@ -1672,7 +1672,7 @@
::
++ oryx-to-ixor |=(a/oryx (rsh 3 1 (scot %p (end 6 1 (shas %ire a)))))
++ ya :: session engine
~% %eyre-y ..is ~
~% %eyre-y ..ship ~
|_ ses/hole
++ abet ..ya
++ abut (jael-note / %kill-cookie ses)
@ -1710,7 +1710,7 @@
--
::
++ ix
~% %eyre-x ..is ~
~% %eyre-x ..ship ~
=| {ire/ixor stem}
=* sem ->
|%
@ -1868,7 +1868,7 @@
?~ a
..lens :: (give-json 200 ~ (frond:enjs %okey-dokey %b &))
=+ tag=(flop `tang`[>[%eyre-lens-fail p.u.a]< q.u.a])
%- (slog tag)
%- (slog:error:userlib tag)
(give-json:abet 500 ~ (wall:enjs (wush 160 tag)))
::
++ get-diff
@ -1882,7 +1882,7 @@
++ get-quit (give-json:abet 500 ~ (frond:enjs %quit b+&))
--
++ vi :: auth engine
~% %eyre-v ..is ~
~% %eyre-v ..ship ~
|_ $: {usr/user dom/path}
cor/(unit $@($~ vase))
{liv/? req/(qeu {p/duct q/mark r/vase:hiss})}
@ -1896,7 +1896,7 @@
++ eyre-them |=({a/whir-se b/vase} (eyre-them:abet se+[a usr dom] b))
++ pass-note |=({a/whir-se b/note} (pass-note:abet se+[a usr dom] b))
:: XX block reqs until correct core checked in?
++ warn |=(a/tang ((slog (flop a)) abet))
++ warn |=(a/tang ((slog:error:userlib (flop a)) abet))
++ with |*({a/vase b/$-(vase abet)} |=(c/vase (b (slam a c))))
++ root-beak `beak`[our %home da+now]
::
@ -2029,7 +2029,8 @@
:: Result handling
::
:: XX formal dill-blit %url via hood
++ auth-print |=({$show a/purl} (slog auth-tank leaf+(en-purl a) ~))
++ auth-print
|=({$show a/purl} (slog:error:userlib auth-tank leaf+(en-purl a) ~))
++ auth-tank
=> =- ?~(usr - rose+["@" `~]^~[leaf+(trip usr) -])
rose+["." `~]^(turn (flop dom) |=(a/cord leaf+(trip a)))
@ -2115,7 +2116,7 @@
misc+[%& bol]
==
=+ our=`@p`0x100 :: XX sentinel
=+ ska=(sloy ski)
=+ ska=(sloy:error:userlib ski)
=+ sky=|=({* *} `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
^+ [p=*(list move) q=..^$]
@ -2149,7 +2150,7 @@
?. ?=($& -.why) ~
=* who p.why
=+ our=(need hov) :: XX single home
=+ ska=(sloy ski)
=+ ska=(sloy:error:userlib ski)
=+ sky=|=({* *} `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
?. ?=($$ ren) [~ ~]
?. ?=($$ -.lot) [~ ~]
@ -2174,7 +2175,7 @@
|= {tea/wire hen/duct hin/(hypo sign)}
^+ [p=*(list move) q=..^$]
=+ our=`@p`0x100 :: XX sentinel
=+ ska=(sloy ski)
=+ ska=(sloy:error:userlib ski)
=+ sky=|=({* *} `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
^+ [p=*(list move) q=..^$]

View File

@ -1,4 +1,4 @@
!:::::
::::::
:: :: %ford, new execution control
!? 164
::::
@ -217,7 +217,7 @@
?+ -.p.+.sih ~|(ford-strange-unto+-.p.+.sih !!)
$diff (~(resd zo [num u.tus]) [van ren bem] p.p.+.sih)
$reap ?~ p.p.+.sih +>.$
((slog leaf+"ford-reap-fail" u.p.p.+.sih) +>.$)
((slog:error:userlib leaf+"ford-reap-fail" u.p.p.+.sih) +>.$)
==
==
::
@ -251,7 +251,7 @@
[%c %warp [our p.bem] q.bem ~]
::
++ awap :: get next revision
~% %ford-w ..is ~
~% %ford-w ..ship ~
|= {dep/@uvH ask/?}
?: =(`@`0 dep)
~&(dep-empty+hen +>.$)
@ -284,7 +284,7 @@
== ==
::
++ zo
~% %ford-z ..is ~
~% %ford-z ..ship ~
=| dyv/@
|_ {num/@ud task}
++ abet %_(..zo q.tad.bay (~(put by q.tad.bay) num +<+))
@ -1225,7 +1225,7 @@
^- (bolt vase)
%+ cope (mail cof p.vax gen)
|= {cof/cafe typ/span fol/nock}
%+ (coup cof) (mock [q.vax fol] (sloy syve))
%+ (coup cof) (mock [q.vax fol] (sloy:error:userlib syve))
|=(val/* `vase`[typ val])
::
++ make-norm-bek :: normalize root beak
@ -1432,7 +1432,7 @@
^- (bolt vase)
%+ cope (malt cof p.gat p.sam)
|= {cof/cafe typ/span}
%+ (coup cof) (mong [q.gat q.sam] (sloy syve))
%+ (coup cof) (mong [q.gat q.sam] (sloy:error:userlib syve))
|=(val/* `vase`[typ val])
::
++ meow :: assemble
@ -1885,7 +1885,7 @@
=* lex -
|= {now/@da eny/@ ski/sley} :: activate
^? :: opaque core
~% %ford-d ..is ~
~% %ford-d ..ship ~
|% ::
++ call :: request
|= {hen/duct hic/(hypo (hobo task:able))}

View File

@ -1,4 +1,4 @@
!: :: %gall, agent execution
:: :: %gall, agent execution
!? 163
::::
|= pit/vase
@ -90,7 +90,7 @@
eny/@uvJ :: entropy
ska/sley :: activate
== :: opaque core
~% %gall-top ..is ~
~% %gall-top ..ship ~
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: state machine
::::::::::::::::::::::::::::::::::::::::::::::::::::::
++ mo
@ -615,19 +615,19 @@
[mar=i tyl=(flop t)]
=+ cug=(ap-find %peek ren tyl)
?~ cug
((slog leaf+"peek find fail" >tyl< >mar< ~) [~ ~])
((slog:error:userlib leaf+"peek find fail" >tyl< >mar< ~) [~ ~])
=. ..ap-bowl ap-bowl
=^ arm +>.$ (ap-farm q.u.cug)
?: ?=($| -.arm) ((slog leaf+"peek farm fail" p.arm) [~ ~])
?: ?=($| -.arm) ((slog:error:userlib leaf+"peek farm fail" p.arm) [~ ~])
=^ zem +>.$ (ap-slam q.u.cug p.arm !>((slag p.u.cug `path`[ren tyl])))
?: ?=($| -.zem) ((slog leaf+"peek slam fail" p.zem) [~ ~])
?+ q.p.zem ((slog leaf+"peek bad result" ~) [~ ~])
?: ?=($| -.zem) ((slog:error:userlib leaf+"peek slam fail" p.zem) [~ ~])
?+ q.p.zem ((slog:error:userlib leaf+"peek bad result" ~) [~ ~])
$~ ~
{$~ $~} [~ ~]
{$~ $~ ^}
=+ caz=(spec (slot 7 p.zem))
?. &(?=({p/@ *} q.caz) ((sane %tas) p.q.caz))
((slog leaf+"scry: malformed cage" ~) [~ ~])
((slog:error:userlib leaf+"scry: malformed cage" ~) [~ ~])
?. =(mar p.q.caz)
[~ ~]
``[p.q.caz (slot 3 caz)]
@ -1159,7 +1159,11 @@
(~(mint wa vel) [%cell p.gat p.arg] [%open [%$ ~] [%$ 2] [%$ 3] ~])
?: ?=($| -.wyz)
%- =+ sam=(~(peek ut p.gat) %free 6)
(slog >%ap-slam-mismatch< ~(duck ut p.arg) ~(duck ut sam) ~)
%- slog:error:userlib
:~ >%ap-slam-mismatch<
~(duck ut p.arg)
~(duck ut sam)
==
:_(+>.$ [%| (ap-suck "call: {<cog>}: type mismatch")])
:_ +>.$(vel +>.wyz)
=+ [typ nok]=+<.wyz
@ -1170,7 +1174,7 @@
$2 [%| p.ton]
==
::
++ ap-sled (sloy ska) :: namespace view
++ ap-sled (sloy:error:userlib ska) :: namespace view
++ ap-suck :: standard tang
|= msg/tape
^- tang

View File

@ -1,4 +1,4 @@
!: :: /van/jael
:: :: /van/jael
:: :: %reference/0
!? 150
::

File diff suppressed because it is too large Load Diff

View File

@ -1824,7 +1824,7 @@
|%
:: :: ++to-wain:format
++ to-wain :: atom to line list
~% %lore ..is ~
~% %lore ..ship ~
|= lub/@
=| tez/(list @t)
|- ^+ tez
@ -2228,7 +2228,7 @@
==
:: :: ++loss:differ
++ loss :: longest subsequence
~% %loss ..is ~
~% %loss ..ship ~
|* {hel/(list) hev/(list)}
|- ^+ hev
=+ ^= sev
@ -3311,6 +3311,58 @@
-- ::yu
-- ::chrono
:: ::
:::: ++error:userlib :: error handling
:: ::::
++ error ^?
|%
:: :: ++mean:error:
++ mean :: deify stack trace
|=(a/tang (fear (flop a) |.(!!)))
:: :: ++fear:error:
++ fear :: insert user mean
|* {a/tang _|?(**)}
^+ (+<+)
=> .(a `tang`a)
?~ a (+<+)
~_(i.a $(a t.a))
:: :: ++slog:error:
++ slog :: deify printf
:: pri: priority level
=| pri/@
::
:: .= ~&(%a 1)
::
|= a/tang ^+ same
::
:: ((slog ~[>%a<]) 1)
::
?~(a same ~>(%slog.[pri i.a] $(a t.a)))
:: :: ++sloy:error:
++ sloy :: temporary hack
|= sod/slyd
^- slyt
|= {ref/* raw/*}
=+ pux=((soft path) raw)
?~ pux ~
?. ?=({@ @ @ @ *} u.pux) ~
=+ :* hyr=(slay i.u.pux)
fal=(slay i.t.u.pux)
dyc=(slay i.t.t.u.pux)
ved=(slay i.t.t.t.u.pux)
tyl=t.t.t.t.u.pux
==
?. ?=({$~ $$ $tas @} hyr) ~
?. ?=({$~ $$ $p @} fal) ~
?. ?=({$~ $$ $tas @} dyc) ~
?. ?=(^ ved) ~
=+ ron=q.p.u.hyr
=+ bed=[[q.p.u.fal q.p.u.dyc (case p.u.ved)] (flop tyl)]
=+ bop=(sod ref ~ ron bed)
?~ bop ~
?~ u.bop [~ ~]
[~ ~ +.q.u.u.bop]
--
:: ::
:::: ++space:userlib :: (2uC) file utils
:: ::::
++ space ^?
@ -3358,7 +3410,7 @@
|%
:: :: ++lune:unix:userlib
++ lune :: cord by unix line
~% %lune ..is ~
~% %lune ..ship ~
|= txt/@t
?~ txt
^- (list @t) ~
@ -3381,7 +3433,7 @@
$(off +(off))
:: :: ++nule:unix:userlib
++ nule :: lines to unix cord
~% %nule ..is ~
~% %nule ..ship ~
|= lin/(list @t)
^- @t
%+ can 3

View File

@ -12,18 +12,28 @@
::
:::: 6a: arvo core
::
++ mean |=(a/tang (fear (flop a) |.(!!))) :: deify stack trace
++ fear :: insert user mean
:: :: ++mean:error:
++ mean :: deify stack trace
|=(a/tang (fear (flop a) |.(!!)))
:: :: ++fear:error:
++ fear :: insert user mean
|* {a/tang _|?(**)}
^+ (+<+)
=> .(a `tang`a)
?~ a (+<+)
~_(i.a $(a t.a))
::
++ slog :: deify printf
=| pri/@ :: priority level
|= a/tang ^+ same :: .= ~&(%a 1)
?~(a same ~>(%slog.[pri i.a] $(a t.a))) :: ((slog ~[>%a<]) 1)
:: :: ++slog:error:
++ slog :: deify printf
:: pri: priority level
=| pri/@
::
:: .= ~&(%a 1)
::
|= a/tang ^+ same
::
:: ((slog ~[>%a<]) 1)
::
?~(a same ~>(%slog.[pri i.a] $(a t.a)))
::
++ sloy
|= sod/slyd

View File

@ -1,6 +1,6 @@
:: :: ::
:::: /hoon/ames/arvo :::::: vane prelude
!: :: ::
:: :: ::
|= pit/vase :: kernel vase
=> =~ ::
:: :: ::

View File

@ -1,4 +1,4 @@
!:::::
::::::
:: :: %ford, new execution control
!? 164
::::

View File

@ -1,4 +1,4 @@
!: :: %gall, agent execution
:: :: %gall, agent execution
!? 163
::::
|= pit/vase

View File

@ -1,4 +1,4 @@
!: :: /van/jael
:: :: /van/jael
:: :: %reference/0
!? 150
::