Problem: Write the shortest brainfuck program that outputs the value of 21000 in decimal, followed by a newline. The brainfuck program must not accept any input.
Judging: The entries will be judged by their correctness (the most correct first), then by their length (shortest first), and finally by their dates of submission (earliest first). Note that a longer correct entry wins to a shorter incorrect one.
Participating: You are required to cryptographically sign your solution (e.g. by creating a throwaway GPG key with fake info and sync'ing it to a keyserver). This is needed so you that may claim your prize (and not an impostor). The lack of any means of authentication leads to immediate disqualification. You may submit as many entries as you like.
Remark. I realize that not everyone here is familiar with GPG. This should give you a head start: $ cat submission.txt
+++[...
$ gpg --gen-key
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection? 2
DSA keys may be between 1024 and 3072 bits long.
What keysize do you want? (2048) 2048
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 1y
Key expires at Fri 31 Jan 2014 04:26:47 PM EST
Is this correct? (y/N) y
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
"Heinrich Himmler (Der Henker) <heinrichh@duesseldorf.de>"
Real name: hello kitty
Email address:
Comment:
You selected this USER-ID:
"hello kitty"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
You need a Passphrase to protect your secret key.
You don't want a passphrase - this is probably a *bad* idea!
I will do it anyway. You can change your passphrase at any time,
using this program with the option "--edit-key".
Prize: The winner will be offered a document describing the art of infinite multiple quotation on Shitchan. If the prize is not claimed within one week of its announcement, it will be offered to the next best submitter.
Deadline: 2013-04-01 at 00:00 UTC.
Attached: Signed version of this post.
data:application/octet-stream;base64,owGFV81vI0kVz7KwYpsPMaeV0Eo8RiOtvTNufybOmJ1dHNtxPiZOYmdmyFpeVN1ddte6u6qnujpOZ/kDOCFOSIgj4ghXrkgg7YHLnrlyWIS4wYULu6+qOk4YIhFZSafr1fv4vfd+7/nn33p9w7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EMGTCmcLlu3jUa7g30/2L7bw/N1rttsXsbDNbGDqhe5VpddSMKWMWKZtwLjLuU0tcyA2vOo8Vp3VyeonfFPSea/cq3FrtntrHHUfv+RYF2we66jV51GqdWg2enfVQ1OkqRfyQBlg1WJ2o+cKWg/bEsgouhK6jy+inH311456z8cbXvqK/wmw4b37n+hvOt3+y8UV4dXUw+Ifz7+4nw+mL3//i6+7P3v7dp3994w8//ovf+uw30VsbX3zy57//7bth1lz+896v/zP447R877T8r+FxfPLa4ji8+OX+lw==
Name:
Anonymous2013-01-31 17:15
This is a SICP exercise!
Name:
Anonymous2013-01-31 22:14
Let's see if I can remember how to do this...
A B C D > E > > F
A[o] B [o] C [o] D [o] > E [o] > > F [o]
[/o][/o][/o][/o][/o][/o]
Name:
Anonymous2013-02-01 0:55
Fuck I always wanted to know how to expert quote. Could you guys just tell me, please?
>>7
Someone else can simplify that with multiplication loops because I sure ain't.
Name:
Anonymous2013-02-08 9:35
Bamp.
Name:
Anonymous2013-02-08 10:49
>>8
actually that just prints each digit the dumb and retarded way. I really hope >>7 won't be the winner and someone else comes up with something a bit more refined.
>>10
Yeah, 301 print statements, for each of the 301 digits, computed as hardcoded sequences of successive additions and subtractions.
My programmery mind tells me that this is done as bigint decimal exponentiation, your memory is a big array after all, but fuck everything about that in brainfuck.
Also, I'm just wondering: have you guys ever craved cock so badly that you found yourself running around outside, howling at the moon for it? Literally ROARING at the top of your lungs, wanting nothing less than a dick's head churning against your glottal stop?
Tell me I'm not alone.
Name:
Anonymous2013-02-13 11:33
I'm surprised nobody wrote a LLVM-to-brainfuck compiler just yet.
Name:
Anonymous2013-02-13 11:44
>>37
I've seen monkeys writing BF interpreters in less than 10 minutes in less than 10 minutes
Знаете ли Вы, что до поражения Германии во Второй Мировой, было два вида математики, - арийская и еврейская, - названные так по национальности своих сторонников?
Арийская Математика брала пример с естественных наук, склонялась к эмпирицизму, конечности и познаваемости мира, и работала исключительно c объектами, которые можно построить физически (например, в памяти ЭВМ или на бумаге).
Еврейская Математика же склоняется к религиозной абстракции и казуистике: всеохватывающей бесконечности, множествам, и порождаемым ими апориям. Так Еврейская Математика постулирует, что можно удвоить объект, путём перекладывания его частей, пространство делимо на "бесконечно малые", а для любого числа, Бог может создать большее число (аксиома о бесконечности).
Основатель Еврейской Математики, Гидеон Кантор, писал, что работает с "Абсолютом - непознаваемым человеком Актус Пьюриссимус, именуемым многими Богом". Примечательно, что Кантор окончил свою жизнь в психиатрической лечебнице, однако дело Кантора поддержали сионистские организации и католическая церковь, доведя до того, что сознательные германские студенты и профессора протестовали, требуя убрать еврейскую заразу из ВУЗов.
После войны, евреи сделали всё возможное, чтобы уничтожить Арийскую Математику, удалив её сторонников и подменив математику Теорией Множеств - центральной опорой Еврейской Математики. Так основатель интуиционизма, Лёйтзен Брауэр, подвергся изоляции, а результаты Русских и Английских финитистов умалчивались и не получили распространения. В русской истории от рук евреев страдали математики Егоров (погиб в ГУЛАГе), Лузин (подвергся травле и был отстранён), Флоренский (расстрелян), Есенин-Вольпин (репрессирован).
Сегодня математика стала еврейской даже по-цвету. Государства поддерживают так называемую "анти-расистскую математику", требующую например использовать еврейские имена в примерах и задачках, рассказывая при этом о великом "вкладе" еврейства в развитие математики.
"Aryan mathematics" is about "knowability of the world" (so its actually science)
"Jewish mathematics" is about set theory and the concept of infinity
Jews created set theory to corrupt our schools and our way of thinking
Look at this barely educated slav kike trying to join in on the fun. How cute.
>>71
I know I can do it too, that's why it's not fun anymore - and it looks likes >>7 will be shorter than all the code to deal with lists of digits and long division
Name:
Anonymous2013-03-27 19:10
>>72
I can amend the challenge to read 210000 instead of 21000 (so that the retarded bruteforce way is penalized) if you want.
Name:
Anonymous2013-03-27 21:16
When there is a significant difference between the parent's and child's sense of the amount of attention needed, the child is often described as seeking excessive or inappropriate attention, particularly if the child is whiny, clingy, silly, or provocative. Children generally seek so-called inappropriate attention when they feel unable to manage their emotions or behavior. Needing extra help is usually a sign that a child is not functioning at his or her best level. We call this regression.
Some children engage in so-called "negative attention-seeking behavior," which involves an effort to provoke a response that they know will be negative. Such behavior should always perplex parents, and cause them to examine the behavior more deeply, because negative attention never feels good to a child - after all, the attention comes with quite a price. Disapproving, irritated, reproachful attention does not fill a child with good feeling any more than such attention feels welcomed by an adult! There needs to be quite a "pay-off" to induce a child to actually seek out such negativity. One possibility is that child has been over-indulged and therefore has not developed age appropriate skills, autonomy, and independence.
Name:
Anonymous2013-03-28 6:18
ok I was wrong this isn't trivial. Here's a thing that converts 0x1000000000 to decimal backwards by doing quotent/remainder repeatedly.
you would have to store digits on a stack to get them printed in the right order. Seems like a real hassle checking if we're done (have to count the number of nonzero digits of the number).. the most series problem with this code is that is that it doesn't reduce the digits to hexadecimal so it overflows if you try it with higher numbers - that's fixable but I can't be bothered.
it should be mostly self explanator but if anyone can be bothered fixing it and wants to ask questions I will explain.
Name:
Anonymous2013-03-28 6:41
I just realized what I did wrong in my code (the reason it doesn't work for larger numbers), i was doing the first "digit" divided by 10.. andadding 16* the remainder to the next digit but you're supposed to do 16*first digit + next digit then divided by 10 and use quotient remainder.. can't beleive I forgot how to do long division..
>>2-92
Nobody wins, fuck you. I am extending this indefinitely (or at least until I leave this board); anyone who solves the challenge in non-trivial way will receive the prize (given that they authenticated properly).
OK YOU FUQIN MADE AN EXPERT PROGRAMMER feel kind of bad. I don't like church numerals though. I don't know how to subtract them. So instead I will implement numbers as stacks of dinner plates.
Name:
Anonymous2013-04-02 5:37
It's a start. This should be translatable to unlambda, but right now it is too slow.
(define two (add one one))
(define four (pow two two))
(define eight (mul two four))
(define ten (add eight two))
(define five (quot ten two))
(define three (mod eight five))
(define nine (pow three two))
(define seven (add five two))
(define six (sub ten four))
(define (cons_ car cdr)
(lambda (is-null f)
(f car cdr)))
(define (null is-null f) (is-null))
(define (for-each_ f lis)
(lis (lambda () null)
(lambda (car cdr)
(f car (lambda ()
(for-each_ f cdr))))))
(define (digits-list_ n base acc)
(div n base (lambda (q r)
(q (lambda () (cons_ r acc))
(lambda (q-pred)
(digits-list_ q base (cons_ r acc)))))))
(define (digits-list n base)
(digits-list_ n base null))
(define (print-num n)
(for-each_ print-digit (digits-list n ten)))
(print-num (pow two nine)) (newline) ;; proof of concept for small number
;; too slow to run
;(define one-thousand (pow ten three))
;(define two-to-the-one-thousand (pow two one-thousand))
;(print-num two-to-the-one-thousand) (newline)
Name:
tripcodes are secure!!aW8dlOh22d1YgJi2013-04-04 4:42
this one is asymptotically acceptable. Still slower than hardware arithmetic, but what can you do. I will be slowly translating it to ski now.
(define (base-digits n base)
(n (lambda () null)
(lambda (n-car n-cdr)
(div n base (lambda (n-quot n-mod)
(cons_ n-mod (base-digits n-quot base)))))))
(define (print-base n base)
(n (lambda () (print-hex-word zero (lambda () null)))
(lambda (n-car n-cdr)
(for-each_ print-hex-word (reverse_ (base-digits n base))))))
(define two (add one one))
(define three (add two one))
(define four (pow two two))
(define eight (pow two three))
(define nine (mul three three))
(define ten (add nine one))
(define five (quot ten two))
(define six (sub-pos eight two))
(define seven (sub-pos ten three))