subtracting infinities is dangerous, you can achieve any result from it
328 karma · joined November 5, 2014
subtracting infinities is dangerous, you can achieve any result from it
https://www-cs-faculty.stanford.edu/~knuth/fasc2b.ps.gz
I just managed to finish the first Alg. P (plain changes); it was really hard, considering that I didn't understand the algorithm and the description is made for Pascal like languages.
The file with the procedures is on github:
? tanne.print tanne.output tanne.shift tanne.split 19 3 3
? tanne.print tanne.output tanne.shift tanne.split 19 3 3
x
xxx
xxxx*
oOOOx
OxO
~oxoOox
~~o*o**O
*o~*~x*OO
x~Ox*x~~xOx*
*~ox*x*O*O
xO~ox~~*~
oxoxxox~~xx**
*O*o~OOo~*o**
~xOxOx~x*o*x*O
just putting something in between: ? tanne.print butlast tanne.output tanne.shift tanne.split 19 3 3
x*
xxO*
x*o*Oo
oo*x
o~ox~*x
xOoOOOx*
**o*xoo
o***OO**x~? run `[print ,[sum 2 3]]
5
But also a very sophisticated way to define functions with many default and within even optional parameters without the need of parentheses. From UCBLogo info:
This version of Logo allows variable numbers of inputs to a procedure. After the procedure name come four kinds of things, in this order:
1. 0 or more REQUIRED inputs :FOO :FROBOZZ
2. 0 or more OPTIONAL inputs [:BAZ 87] [:THINGO 5+9]
3. 0 or 1 REST input [:GARPLY]
4. 0 or 1 DEFAULT number 5cs repeat 360 [fd 10 lt product 2 repcount wait 5]
or a variant of David Eisenstat's code:
cs pu setpos [-100 -100] pd repeat 8 [rt 45 repeat 4 [repeat 45 [fd 5 rt 2 wait 1] rt 135]]
of course Logo is LISP, so you can do stuff like
? show map [[x] se sum # x ?REST] [1 2 3]
[[2 2 3] [4 3] [6]]
http://weber.itn.liu.se/~stegu/xteddy/
see also
Also xon (very handy for non-ssh users), jwz's xdaliclock and xkeycaps.
? show (map [[x y] [output se :x sum :y #]] [a b c] [10 20 30])
[[a 11] [b 22] [c 33]]
you mean that big:
http://www.unics.uni-hannover.de/nhtcapri/quotation-marks.ht...
not even able to provide correct quotation marks!