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xZ~<
`@','
,xZ<
`@'|
,xZ<
`@'`.
,xZ~<
`@'*|
K aK
,xZ~<
`@','
,xZ<
`@'`.
,xZ~<
`@','
,xZ<
`@'|
,xZ<
`@'|
,xZ<
`@'|
,xZ<
`@'`.
,xZ~<
`@'*|
K eK
,xZ~<
`@','
,xZ<
`@'`.
,xZ~<
`@','
,xZ<
`@'`.
,xZ~<
`@' |
,xZ~<
`@' |
,xZ~<
`@','
,xZ<
`@'|
K K
,xZ<
`@'`.
,xZ~<
`@' |
,xZ~<
`@' |
,xZ~<
`@' |
,xZ~<
`@' |
,xZ~<
`@','
,xZ<
`@'`.
,xZ~<
`@'*|
K fK
,xZ~<
`@','
,xZ<
`@'|
,xZ<
`@'|
,xZ<
`@'|
,xZ<
`@'`.
,xZ~<
`@' |
,xZ~<
`@','
,xZ<
`@'|
K K
,xZ<
`@'`.
,xZ~<
`@','
,xZ<
`@'`.
,xZ~<
`@','
,xZ<
`@'|
,xZ<
`@'`.
,xZ~<
`@' |
,xZ~<
`@','
K K
,xZ<
`@'`.
,xZ~<
`@','
,xZ<
`@'|
,xZ<
`@'`.
,xZ~<
`@','
,xZ<
`@'|
,xZ<
`@'`.
,xZ~<
`@','
K K
,xZ<
`@'`.
,xZ~<
`@' |
,xZ~<
`@','
,xZ<
`@'`.
,xZ~<
`@','
,xZ<
`@'`.
,xZ~<
`@'*}T
,xZ~<
`@','
K K
,xZ<
`@'|
,xZ<
`@'`.
,xZ~<
`@','
,xZ<
`@'|
,xZ<
`@'`.
,xZ~<
`@','
,xZ<
`@'|
,xZ<
`@'|
K `K
,xZ~<
`@','
,xZ<
`@'|
,xZ<
`@'`.
,xZ~'
`@'
Try it online!
Oof.
It's a beeping massive binary counter: 333 bits are needed to express 1 googol, so there are 333 half-adders @
and 333 registers Z
. (Actually only 100/log10(2) = ~332.2 bits are required, but this solution can't take advantage of those massive savings). There are also a few periodic caches K
, which are required for this to even run correctly.
Note about the TIO: instead of using -w
(which is a fake stdin consisting of infinite null bytes), it uses regular input. The result is that it terminates at the end of input, rather than attempting to outlive the universe by a factor of 1080.
The termination condition is encoded by the presence or absence of ~
near the Z
s. If you worked from the bottom up, writing a '1' when you see a ~
, and '0' when you don't, you'll have the binary representation for 1 googol.
Here is a TIO that only prints 100 times. This one does use -w
, showing off the termination condition.
Also scattered around are *a
, *e
, and *f
. These work together to produce an ASCII '1' for the output. If they were absent, null characters would be printed instead.
First question here. Improvements, style/tag corrections, comments etc. welcome. Have fun! – The Vee – 2016-10-29T18:42:41.660
10
Consider the sandbox first next time.
– cat – 2016-10-29T18:44:39.897@cat Sorry, I don't understand what that link is about. CW is community wiki, right? How is that related? – The Vee – 2016-10-29T18:46:50.647
9
When you post a new question, you are asked to first post it in the sandbox.
– flawr – 2016-10-29T18:48:16.150@flawr Should I delete this and repost there? – The Vee – 2016-10-29T18:49:16.950
@flawr I'm afraid someone may already be working on it. I'm sorry, somehow the line slipped my attention :-( – The Vee – 2016-10-29T18:59:56.373
Next, somebody should create a challenge needing to output a ---Google Plex---googleplex copies of a string – user41805 – 2016-10-29T19:14:32.847
1@KritixiLithos It was toying with that idea but I could not quickly come up with a sample solution. Feel free to make a sequel :-) – The Vee – 2016-10-29T19:16:15.660
Does it have to be separate print statements? Or can we do something like
print's'*(10**100)
? – Rɪᴋᴇʀ – 2016-10-29T21:48:05.743@EasterlyIrk You did not specify language but if this generically means creating a string 10^100 characters long and then printing it then that's what the "realistic computer" and memory restriction are meant to be against. The 4 GB is just an arbitrary number but this would require something far beyond all SI prefixes. – The Vee – 2016-10-29T21:55:51.093
Unfortunately I can't judge whether that happens in the programs written in languages I don't understand, but I hope that's what the community will detect. This happened in some of the answers, I'm not going to cite because the respective authors decided to hide their comment discussion. – The Vee – 2016-10-29T21:58:18.397
But if your language uses lazy stream creation and printing, sure, go for it. Or if this means "repeat
print's'
10^100 times". – The Vee – 2016-10-29T21:59:02.4173@closevoter Are you sure this is too broad? Common sense automatically narrows this down from "print a nonempty string 10^100 times" to "print a character 10^100 times". – user8397947 – 2016-10-29T23:47:23.897
You can separate error output with
2>nul
or2>/dev/null
, depending on your OS :) – Erik the Outgolfer – 2016-10-30T10:22:01.903@KritixiLithos *Googolplex – Oliver Ni – 2016-10-30T16:57:07.333
@Oliver I can't stop thinking about Google that it has entered my subconsciousness :D – user41805 – 2016-10-30T16:59:41.983
3TIL Googol-1 in Roman numerals – mbomb007 – 2016-10-31T18:36:01.290
"at no point no more than 4 GB of memory must be needed" means that more than 4GB of memory must be needed at all times – user253751 – 2016-10-31T23:39:45.170
Can I write
main=putStr$cycle"x"
, which printss
a googol times, wheres
is the infinite string with all charactersx
? – wchargin – 2016-11-01T00:06:22.600@wchargin Nice try :-) But your program would print just a single copy of
s
. The ordinal ω . 10^100 that you would need there is clearly distinctive from ω. – The Vee – 2016-11-02T10:45:56.287Are we allowed to use the system time? Something like making one output a second, and then terminating the program when the time 1 googol seconds after the current system time is reached. – ghosts_in_the_code – 2017-01-16T10:17:52.173