Data update

This commit is contained in:
Ingy döt Net 2024-03-06 22:25:12 -08:00
parent ed705008a8
commit 0df55f9f24
2196 changed files with 32999 additions and 3075 deletions

View file

@ -0,0 +1,15 @@
USING: command-line io io.streams.string kernel math math.parser
namespaces sequences ;
IN: sierpinski
: plot ( i j -- )
bitand zero? "* " " " ? write ;
: pad ( n -- )
1 - [ " " write ] times ;
: plot-row ( n -- )
dup 1 + [ tuck - plot ] with each-integer ;
: sierpinski ( n -- )
dup '[ _ over - pad plot-row nl ] each-integer ;

View file

@ -0,0 +1,23 @@
( uxncli sierpinski.rom )
|100 @on-reset ( -> )
#10 STHk #01 SUB
&ver ( -- )
DUP
#00 EQUk ?{
&pad ( -- )
#2018 DEO
INC GTHk ?&pad
} POP
#00
&fill
ANDk #202a ROT ?{ SWP } POP #18 DEO
#2018 DEO
INC ADDk STHkr LTH ?&fill
POP2
#0a18 DEO
#01 SUB DUP #ff NEQ ?&ver
POP POPr
BRK