[ prog / sol / mona ]

prog


The Forced Indentation Of Code

208 2022-10-23 10:01

Upgrade of the flower garden with the ability to render connectors in flower patches. The port of the ├┤ tree fractal >>107 >>108 as an example.

scheme@(guile-user)> (display ((lambda (rec xjoin extract windowtopleft index hindex size connector connectors start startlr levels chars band columnfactor n) ((lambda (xjoin hindex size connector lines columns cycle) ((lambda (hlincol) ((lambda (hlines hcolumns) ((lambda (hindex) ((lambda (window) ((lambda (patch) ((lambda (symbol) (xjoin lines (lambda (k) (string-append (xjoin columns (lambda (j) (symbol k j)) "") "\n")) "")) (lambda (k j) (extract chars (index patch band cycle columnfactor n k j) 1)))) (lambda (cycle x y dx dy band) (if (connector (window x y) dx dy) 1 0)))) (windowtopleft hcolumns hlines hindex))) (lambda (k j) (hindex hlines hcolumns k j startlr)))) (car hlincol) (cadr hlincol))) (size (+ levels 1) start))) (lambda (n fun sep) (rec xjoin n fun sep "")) (lambda (rows cols k j lr) (rec hindex rows cols k j lr)) (lambda (n rowcol) (rec size n rowcol)) (connector connectors band) (+ (* 2 n) 1) (+ (* 2 columnfactor n) 1) (string-length chars))) (lambda (f . args) (apply f (cons f args))) (lambda (self n fun sep acc) (if (<= n 0) "" (if (= n 1) (string-append (fun 0) acc) (self self (- n 1) fun sep (string-append sep (fun (- n 1)) acc))))) (lambda (str pos len) (substring str pos (+ pos len))) (lambda (width height fun) ((lambda (w2 h2) ((lambda (x1 x2 y1 y2) (lambda (x y) (if (and (<= x1 x x2) (<= y1 y y2)) (fun (- y y1) (- x x1)) 0))) (- w2) (- width w2 1) (- h2) (- height h2 1))) (quotient width 2) (quotient height 2))) (lambda (patch band cycle columnfactor n k j) ((lambda (k j) ((lambda (dx dy) (if (or (= dx 0) (= dy 0)) 0 (+ (patch (- cycle 1) (quotient (- (+ k j) dx) band) (quotient (- (- k j) dy) band) dx dy band) 1))) (modulo (+ k j) band) (modulo (- k j) band))) (- k n) (- j (* columnfactor n)))) (lambda (self rows cols k j lr) ((lambda (r2 c2) (if (= k r2) (if (= j c2) (if lr 6 5) (if ((if lr < >) j c2) 0 1)) ((lambda (r4) ((lambda (r4+) (if (= j c2) (if (< k r4) 0 (if (= k r4) 3 (if (< k r4+) 2 (if (= k r4+) 4 0)))) (if (= (abs (- j c2)) 1) (if (or (= k r4) (= k r4+)) 1 0) (self self r2 (- c2 1) (if (< k r2) k (- k r2 1)) (if (< j c2) j (- j c2 2)) (< j c2))))) (+ 2 (* 3 r4)))) (quotient r2 2)))) (quotient rows 2) (quotient cols 2))) (lambda (self n rowcol) (if (= n 0) rowcol (self self (- n 1) (list (+ 1 (* 2 (car rowcol))) (+ 3 (* 2 (cadr rowcol))))))) (lambda (spec band) ((lambda (b2 on) (lambda (index dx dy) (if (zero? index) #f ((lambda (bits) (or (and (= dy b2) (or (= dx b2) (on 0 bits) (and (< dx b2) (on 1 bits)) (and (> dx b2) (on 2 bits)))) (and (= dx b2) (or (on 3 bits) (and (< dy b2) (on 4 bits)) (and (> dy b2) (on 5 bits)))))) (vector-ref spec index))))) (quotient band 2) logbit?)) #(#f 1 8 33 17 10 12) '(1 0) #t 1 "🌵🌹🌺🌼🌸🌻🌷💮🦋" 6 2 9))

separate output >>207 for renewed 413 >>127

larger version: https://wirechan.org/b/res/2162.html#4205 http://paste.textboard.org/64be4e7d/raw

>>206
Thanks for the laughs. I appreciate the effort you put into the technical jargon to make your post entertaining. I wish I could provide an answer matching the style of your post, but I lack your comedic talent. For a real answer, however, you will no doubt recall that lambda terms are countable, so you are invited to defend your statement that you've already managed to "represent an arbitrary complex number" and have it "built up from pure λ-terms", since that would imply representing the real subset, and in turn the transcendent subset which is uncountable. The invitation is of course rhetorical.

267


VIP:

do not edit these