var fixen und imporven

This commit is contained in:
C. Guy Yarvin 2016-10-14 16:59:12 -07:00
parent 62f75945d3
commit 3cf83017ef
5 changed files with 407 additions and 346 deletions

View File

@ -11,6 +11,8 @@
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|= pit/vase
=, ^differ
=, differ
=> |%
++ cane :: change set
$: new/(map path lobe) :: new files

View File

@ -1113,7 +1113,7 @@
{$txt $robots $~}
:- ~
%^ resp 200 text+/plain
%- role
%- role:differ
:~ 'User-agent: *'
'Disallow: '
==

View File

@ -3,6 +3,8 @@
!? 164
::::
|= pit/vase
=, differ-data
=, differ
=, gall
=> =~
:: structures

View File

@ -1,13 +1,29 @@
!: :: /van/zuse
:: :: !%reference
::
:: zuse (3), standard library (tang)
:: %zuse: standard library.
::
~% %zuse + ~
!:
:: todo:
::
:: - communication with other vanes:
:: - actually use %behn for expiring secrets
:: - report %ames propagation errors to user
::
:: - nice features:
:: - scry namespace
:: - task for converting invites to tickets
::
:: - restructuring
:: - move section 0 to %zuse/%york once ready
::::
:: ::::
:::: # 0 :: public structures
:: ::::
~% %zuse +> ~
=>
|%
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eP, diff (move me) ::
::
::
++ differ
^? |%
++ udal :: atomic change (%b)
$: p/@ud :: blockwidth
q/(list {p/@ud q/(unit {p/@ q/@})}) :: indels
@ -19,8 +35,7 @@
{$b p/udal} :: atomic indel
{$c p/(urge)} :: list indel
{$d p/upas q/upas} :: tree edit
== ::
== ::
== == ::
++ umph :: change filter
$@ $? $a :: no filter
$b :: jamfile
@ -28,7 +43,8 @@
== ::
$% {$d p/@ud} :: blocklist
== ::
++ unce |* a/mold :: change part
++ unce :: change part
|* a/mold ::
$% {$& p/@ud} :: skip[copy]
{$| p/(list a) q/(list a)} :: p -> q[chunk]
== ::
@ -39,7 +55,12 @@
{$2 p/axis q/udon} :: mutate!
== ::
++ urge |*(a/mold (list (unce a))) :: list change
::
--
--
|%
++ differ
=, ^differ
^? |%
++ berk :: invert diff patch
|* bur/(urge)
|- ^+ bur
@ -71,7 +92,11 @@
|- ^+ sev
?~ hev sev
=+ guy=(~(get by sev) i.hev)
$(hev t.hev, inx +(inx), sev (~(put by sev) i.hev [inx ?~(guy ~ u.guy)]))
%= $
hev t.hev
inx +(inx)
sev (~(put by sev) i.hev [inx ?~(guy ~ u.guy)])
==
=| gox/{p/@ud q/(map @ud {p/@ud q/_hev})}
=< abet
=< main
@ -337,17 +362,12 @@
==
[%0 u.c]
--
--
:::::::::::::::::::::::::::::::::::::::::::::::::::::: ::
:::: chapter 3b, Arvo libraries ::::
:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 3bA, lite number theory ::
::
++ dope
~% %dope ..is ~
|= a/@
~& [%dope-zuse (mug +>)]
:(mul a a a)
::
++ fu :: modulo (mul p q)
|= a/{p/@ q/@}
=+ b=?:(=([0 0] a) 0 (~(inv fo p.a) (~(sit fo p.a) q.a)))
@ -1536,17 +1556,20 @@
=+ [k1=(rsh 7 1 key) k2=(end 7 1 key)]
=+ iv=(s2va k1 (weld vec (limo ~[txt])))
=+ len=(met 3 txt)
=* hib (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)
:+
iv
len
(~(en ctra k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
(~(en ctra k2 7 len hib) txt)
::
++ de
~/ %de
|= {iv/@H len/@ txt/@}
^- (unit @ux)
=+ [k1=(rsh 7 1 key) k2=(end 7 1 key)]
=* hib (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)
=+ ^= pln
(~(de ctra k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
(~(de ctra k2 7 len hib) txt)
?. =((s2va k1 (weld vec (limo ~[pln]))) iv)
~
`pln
@ -1561,18 +1584,20 @@
^- (trel @uxH @ud @ux)
=+ [k1=(rsh 5 3 key) k2=(end 5 3 key)]
=+ iv=(s2vb k1 (weld vec (limo ~[txt])))
=* hib (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)
=+ len=(met 3 txt)
:+
iv
:+ iv
len
(~(en ctrb k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
(~(en ctrb k2 7 len hib) txt)
::
++ de
~/ %de
|= {iv/@H len/@ txt/@}
^- (unit @ux)
=+ [k1=(rsh 5 3 key) k2=(end 5 3 key)]
=* hib (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)
=+ ^= pln
(~(de ctrb k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
(~(de ctrb k2 7 len hib) txt)
?. =((s2vb k1 (weld vec (limo ~[pln]))) iv)
~
`pln
@ -1587,18 +1612,21 @@
^- (trel @uxH @ud @ux)
=+ [k1=(rsh 8 1 key) k2=(end 8 1 key)]
=+ iv=(s2vc k1 (weld vec (limo ~[txt])))
=* hib (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)
=+ len=(met 3 txt)
:+
iv
len
(~(en ctrc k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
(~(en ctrc k2 7 len hib) txt)
::
++ de
~/ %de
|= {iv/@H len/@ txt/@}
^- (unit @ux)
=+ [k1=(rsh 8 1 key) k2=(end 8 1 key)]
=* hib (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)
=+ ^= pln
(~(de ctrc k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
(~(de ctrc k2 7 len hib) txt)
?. =((s2vc k1 (weld vec (limo ~[pln]))) iv)
~
`pln

29
gen/bug.hoon Normal file
View File

@ -0,0 +1,29 @@
::
:::: /hoon/hello/gen
::
/? 310
::
::::
!:
:- %say
|= {^ {{txt/@tas $~} $~}}
~& %foobar
=+ bar=32
=> |%
++ funq
^?
|%
++ add |=({a/@ b/@} (sub a b))
++ mook txt
--
--
=, funq
~& %one
=+ foo=mook
~& [%foo (^add 2 2)]
=< $
|%
++ $
:- %noun
(crip (weld "hello, " (trip mook)))
--