4 ms·
There is a Base64 quasi-fixed point: $ echo -n Vm0 | base64 Vm0w It can be extended indefinitely one character at a time, but there will always be som
by rgovostes 1y ago
There is a Base64 quasi-fixed point:
$ echo -n Vm0 | base64
Vm0w
It can be extended indefinitely one character at a time, but there will always be some suffix.
- thaumasiotes 1y agoNote that the suffix will grow in length with the input, making it less and less interesting. (Because the output is necessarily 8/6 the size of the input, the suffix always adds 33% to the length.)
- o11c 1y agoFor reference, a program to generate the quasi-fixed point from scratch: #!/usr/bin/env python3 import base64 def len_common_prefix(a, b): assert len(a) < len(b) for i in range(len(a)): if a[i] != b[i]: return i return len(a) def calculate_quasi_fixed_point(start, length): while True: tmp = base64.b64encode(start) l = len_common_prefix(start, tmp) if l >= length: return tmp[:length] print(tmp[:l].decode('ascii'), tmp[l:].decode('ascii'), sep='\v') # Slicing beyond end of buffer will safely truncate in Python. start = tmp[:l*4//3+4] # TODO is this ideal? if __name__ == '__main__': final = calculate_quasi_fixed_point(b'\0', 80) print(final.decode('ascii')) This ultimately produces: Vm0wd2QyUXlVWGxWV0d4V1YwZDRWMVl3WkRSV01WbDNXa1JTVjAxV2JETlhhMUpUVmpBeFYySkVUbGho
- syncsynchalt 1y agoFrom the other direction, you'd call it a tail-eating unquine?