[ prog / sol / mona ]

prog


The Forced Indentation Of Code

212 2022-10-27 11:24

Port of the tile maze >>30 >>34 to the connector flower garden >>208.

scheme@(guile-user)> (display ((lambda (rec xjoin extract tilegrid index connector connectors tilespec chars band columnfactor n) ((lambda (xjoin tilegrid connector lines columns cycle) ((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 (tilegrid x y) dx dy) 1 0)))) (lambda (n fun sep) (rec xjoin n fun sep "")) (tilegrid tilespec) (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 (spec) ((lambda (rows cols) (lambda (x y) (vector-ref (vector-ref spec (modulo y rows)) (modulo x cols)))) (vector-length spec) (vector-length (vector-ref spec 0)))) (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 (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 36 34 20 18 33 17 10 12) #(#(1 1 1 9 0 10 1 1) #(0 0 0 2 0 2 0 0) #(0 2 0 2 0 2 0 2) #(0 2 0 0 0 0 0 2) #(0 10 1 1 1 1 1 9) #(0 2 0 0 0 0 0 2) #(0 2 0 2 0 2 0 2) #(0 0 0 2 0 2 0 0)) "🌵🌹🌺🌼🌸🌻🌷💮🦋" 6 2 9))

separate output >>211 for renewed 413 >>127

larger version: https://wirechan.org/b/res/2162.html#4224 http://paste.textboard.org/8906113f/raw

>>209 >>210
OK, we can play goalpost moving for a few more rounds as long as you're entertaining. Since you now claim to have already managed to represent an arbitrary algebraic complex number, built up from pure λ-terms, and "to increasingly construct the rationals, and then the algebraic and complex numbers", there are two problems. First, the set of algebraics that can be constructed from the rationals with the usual operations is a strict subset of all algebraics. You cannot construct all algebraics that way, regardless of your particular representation, for example due to Galois and the quintic. The second problem is more fundamental. Since you cannot have R due to the uncountability issue >>208, you do not yet have a larger field containing Q. You can take polynomials over Q, but their roots are either in Q, in which case they are not useful to you because they add nothing to Q, or they are not in Q, in which case they do not exist at all because you do not have a larger containing field to take them from. Unrestricted comprehension is an invalid operation. A predicate P, such as "is a root of such and such polynomial", must be used to filter an existing set, not the "universe of everything". Otherwise you find yourself in the set-of-all-sets situation, and Bertrand Russell will pop up to interject for a moment that what you are referring to as the set of all sets is in fact a violation of the consistency of your construction. So without a support to scan over with P, you don't get to apply P. Naturally I don't expect you, the anon, to have an actual response to either of these problems, but I'm mildly curious to see what answers your assumed persona will give to defend the construction which is stated to already exist.

267


VIP:

do not edit these