examples: remove a use of as{ }as

FossilOrigin-Name: 3de9369294aec97270d37b626a700ecfa5cafe52c2e7e06739b2ffa61b0bc30c
This commit is contained in:
crc 2020-02-13 17:51:47 +00:00
parent c3cf3d433e
commit 195dd1859a

View file

@ -12,25 +12,21 @@ XOR/rotate/shift/rotate PNRG (See http://xoshiro.di.unimi.it/)
:res** (-n) @s0 #5 * #7 rotl #9 * ;
:next (-)
@s1 dup #-9 shift push @s3 @s0 @s2
as{
'pudupoxo i
'pupu.... i
'pudupoxo i
'swposwpo i
'dupuxopu i
'pudupoxo i
'popopoxo i
}as
\pudupoxo
\pupu....
\pudupoxo
\swposwpo
\dupuxopu
\pudupoxo
\popopoxo
!s2 !s1 !s0 #11 rotl !s3 ;
:xor-er (nananana-nananana)
as{
'dupufexo i 'pu...... i
'dupufexo i 'pu...... i
'dupufexo i 'pu...... i
'dupufexo i 'pu...... i
'popopopo i 'popopopo i
}as ;
\dupufexo \pu......
\dupufexo \pu......
\dupufexo \pu......
\dupufexo \pu......
\popopopo \popopopo ;
:jump? (nm-) [ JUMP + fetch ] dip #1 swap n:negate shift and ;
:inner (n-n)
#32 [ dup I jump? [ [ xor-er ] dip ] if next ] times<with-index> ;
@ -42,7 +38,7 @@ XOR/rotate/shift/rotate PNRG (See http://xoshiro.di.unimi.it/)
:random:xoroshiro128**:jump (-)
#0 &s3 #0 &s2 #0 &s1 #0 &s0
#4 [ I inner drop ] times<with-index>
as{ 'stststst i }as ;
\stststst ;
:random:xoroshiro128**:set-seed (n-)
reseed #100 [ next ] times ;