Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[BRAINFUCK] /prog/ challenge [EXPERT]

Name: /prog/ challenge master 2013-01-31 16:56

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".

(snip)

pub   2048D/0xD77B493754AB980C 2013-01-31 [expires: 2014-01-31]
      Key fingerprint = 6531 777E 6F1D BC81 2786  BE6F D77B 4937 54AB 980C
uid                 [ultimate] hello kitty
sub   2048g/0xF1AB3377C8CB418C 2013-01-31 [expires: 2014-01-31]

$ gpg --send-keys 54AB980C
gpg: sending key 0xD77B493754AB980C to hkp server pgp.mit.edu
$ gpg --clearsign -u "hello kitty" submission.txt
$ cat submission.txt.asc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

+++[...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iF4EAREKAAYFAlEK5hYACgkQ13tJN1SrmAyvSwEAtLoi4LXi1YQtJV0rbH3t4gNr
3MMBC2KmorxTRr+3HakA/RxqRTy0ARjbYDV9DG2/z5OOQb/a1S6QngsM7trHYZzd
=4/xg
-----END PGP SIGNATURE-----
$


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/nn33p9w7l39fnzXzmffeN7r/32m3/y3vRDEkWUL+ip8/mnU292IoUX0Xha9WYdeCGZoqBCCmkopKKpAk8SxueZv4REioUkMR4TBSJTSaZSI3tBooyCmENjmmbJrF6r1aZV/QSMQ0B9FpPoEcxFFIkVDcDLgQCnq4hx6gKcoYb/NRJnaJsLBcT3aYJ/eI7a0KTrOOj1QRYsGF9Yr7UGypVkNIUViyLwKHyMAtYWesgk+EJK6itO0xRK2ulYoIHiLcyZTFX5kZblN3c0TCqE0hqLazHCA3zmCGR+Ix0QlNEopJkXszRlgkOJEhmxm6sY7kgYhBFCApHAPKx9MzHkGAFHWAUeW7sS476WEIiYif+ESMV8lhC1RuFcZEAkBUlfZkxi7KjDl3miNKBJyHzjbsoWHHKRSUhFlCnrpLtwdRy+pEYfmlahFCuyIjkMT4awpNothGJOlhTdmQsDQZpz/x0tz5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xD9HTn9qu1y367vdN63GxPs9lmq7vzeLvWm1azma7ZZqVWr2AJT4uq7phCti9nRcvoosfJjFMVhwrC8AS2NvFKu90ewNZuvQ87ve06NNrbWwA7g61d0PZAG4TCIlybdDLsq1d/psibuM4oOoNb6XbSdQwLjGG33t1pNtvt3nZvp1Xf7v1/59f8nlIeVAxpvgKAg+cd0McaZ00JN1hdy+kCCZcJ2BkMySJxcca5NMjW+v1Ic4cm70r23xX76uS5axy5JPXBqeifncFwfwQnwxOY7A9Hgz4cDSaT7nBgDp09koYdmOx1N+sNZz3E7rjYPXs2Lu48p1Lb6cCQZ7hzXNTdlltvQGk4elZ9ynh2ibXCdluD7nhw2O2e73ajweFmeN7tLZan9aY6GNUnMu7mF5PVoKueCtZ6+iNWPz9VB89r0ttrqtZiJJ3m0dFOr3EYC3l5NpYPm3tk2a2OL1+Oz/Jad/yxd95//rg/bFSvNo+PT70qqU+2TvkiPWoruXf+4VXgPGlVLxc2ksGof1ccD6bVeGaXNL3X3KyouNhxKtcbqpjPqTQtHgg/M8wX0NSXzGPFnMLNQA903LcY13t5rIsviSi8zISySw9+JiHDtdubTdNEMGTCmcLlu3jUa7g30/2L7bw/N1rttsXsbDNbGDqhe5VpddSMKWMWKZtwLjLuU0tcyA2vOo8Vp3VyeonfFPSea/cq3FrtntrHHUfv+RYF2we66jV51GqdWg2enfVQ1OkqRfyQBlg1WJ2o+cKWg/bEsgouhK6jy+inH311456z8cbXvqK/wmw4b37n+hvOt3+y8UV4dXUw+Ifz7+4nw+mL3//i6+7P3v7dp3994w8//ovf+uw30VsbX3zy57//7bth1lz+896v/zP447R877T8r+FxfPLa4ji8+OX+lw==

Name: Anonymous 2013-01-31 17:15

This is a SICP exercise!

Name: Anonymous 2013-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: Anonymous 2013-02-01 0:55

Fuck I always wanted to know how to expert quote. Could you guys just tell me, please?

Name: Anonymous 2013-02-01 1:01

>>4
first convert to judaism

Name: Anonymous 2013-02-01 1:04

>>5
Or you could keep your foreskin and win this challenge to get the answer.

Name: !REFhI/YQko!u2cYtIZ3RujQgda 2013-02-01 1:17

Simple and dumb solution:

+++++++++++++++++++++++++++++++++++++++++++++++++.-.+++++++.------.++++.-----.++++++++.--.------.+++++++.------.+++++++.--.----.++++.+.----.-.--.+++++++++.-----.++++.----.--.+++.-----.++++.+++++.---------.++++++.------...+.+++++++.-------.-.+++++.+.-----.+++.----.++++.++++.-------..++++++.-------.+++++..--..+++.------.+++++++.---..-.++++.--.-----.+++.+++++..-----.++++.-------.+++.++.----.-.+++++.----..+.++.+++++.------.+++.-----.+..++.+++++.------.--.++++++++.-.-----.++++.+..-------.++++.+.+++.----.+++.---.+++.-------.+.+++++.--.++++.-----.++.+.-----.+++++++.--------.++++++.--..--.--.+++.++.++.------.+++.----.+++++++.-.------.+++.+.---.++++++.---.+.+++.-------.+.--.+++.----.++++.-.++.++++.-.----.+.++..--.++.---.++.+++.-.---.++.---.++++.--------.+++.++++++.------.+.+.+.+...---.++++.------.++.--.+.---.+++++++++.-.---.-.--.-.-.+++++++.---.++.------.+++++.-----.++++++.----.+.++++.------..+++.---.+++++++.-..++.----.-.---.+++++++.------.-.++++.--.---.++++.++.--.+++.---.+++++.-.-----.++.+++.-------.++++++++.-----.---.+.++++.+.----.++++++.-.-.-.+.--..++++.--------.+++++.-..-.-.++++++.-----.++.------.+++++++..-------.++++++.----.+++++++.--------.+++.+.++.------..++++++++.---.--.+++..-.++.--.-.-.--.-.+++++.+.-..------.++++.--.+++++++.-.-----.--.+++++.-.---.++++.----.++.-.+++++.--.++.-----.++++.-----.--.+++++.+..++.--------.++++++.+++.------.++++.-.--------------------------------------------.

Name: Anonymous 2013-02-08 4:04

>>7
Someone else can simplify that with multiplication loops because I sure ain't.

Name: Anonymous 2013-02-08 9:35

Bamp.

Name: Anonymous 2013-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.

Name: Anonymous 2013-02-08 10:59

>>1
Heinrich Himmler (Der Henker)

Name: Anonymous 2013-02-08 11:14

>>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.

Name: Anonymous 2013-02-08 12:17

>>12
Giving up so easily?

Name: Anonymous 2013-02-08 16:31

lel

Name: Anonymous 2013-02-08 16:47

>>14
Fuck you cretin.

Name: Anonymous 2013-02-08 16:51

LLLLLLLLLLLLLLLLLLLLLLLLEEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
>EGIN
>LE EGIN GWINZ GRO

Name: Anonymous 2013-02-08 17:33

>>16
I thought you were taking your pills, Mr. Egin.

Please get well soon.

Name: Anonymous 2013-02-08 18:01

I'm going to solve this using either the prog DESU implementation, or unlambda.

Name: Anonymous 2013-02-09 19:18

I think I just wrote a BF interpreter in an hour.

Name: Anonymous 2013-02-09 19:27

>>19
Confirmed: it runs hello world, fibs and rot13

Name: Anonymous 2013-02-09 19:37

More specifations, please? Is the array size limited to 30'000 and the size of one element to 255?

Name: Anonymous 2013-02-09 19:38

>>21
Assume the most stringent specifications, so that the program is portable across all brainfuck implementations.

Name: /prog/ challenge master 2013-02-09 22:24

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

>>21
Cells take values between 0 and 255 inclusively and the tape is unlimited in both directions.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iF4EAREKAAYFAlEXEpAACgkQeudWmwrQCx/qCwD+NYC7BM/c3qoGWMd9uq4Yrbxt
85wsSreo7o6vv7CSeYEA/Avldurzf0ee3ixyvYCi8xQB//xmlM/1DnQe7HXbm7TB
=aq3G
-----END PGP SIGNATURE-----

Name: Anonymous 2013-02-11 2:19

Name: Anonymous 2013-02-11 21:56

Name: Anonymous 2013-02-11 22:12

and not a single brainfuck was given

Name: Anonymous 2013-02-11 23:36

Already prefect solution given by >>7, move along.

Name: Anonymous 2013-02-12 3:06

I think it works, but I didn't wait for it to finish.


(define zero (lambda (f) (lambda (x) x)))
(define one (lambda (f) (lambda (x) (f x))))
(define add (lambda (g1 g2) (lambda (f) (lambda (x) ((g1 f) ((g2 f) x))))))
(define mult (lambda (g1 g2) (lambda (f) (lambda (x) ((g1 (g2 f)) x)))))
(define exp (lambda (g1 g2) (lambda (f) (lambda (x) (((g2 g1) f) x)))))
(define two (add one one))
(define three (add two one))
(define five (add two three))
(define ten (mult two five))
(define one-thousand (exp ten three))
(define two-to-the-one-thousand (exp two one-thousand))
(define chn->num (lambda (g) ((g (lambda (x) (+ x 1))) 0)))
(define two-to-the-one-thousand-num (chn->num two-to-the-one-thousand))
(display two-to-the-one-thousand-num)
(newline)

Name: Anonymous 2013-02-12 3:21

>>28
I like you!

Name: Anonymous 2013-02-12 4:04

>>29
Will you accept it if I rewrite it in unlambda? I think I'll have to violate the rules, and it'll just print 2^1000 asterisks to the screen.

Name: Anonymous 2013-02-12 4:31

>>30
Part of the challenge is the conversion to decimal.

Name: Anonymous 2013-02-12 4:42

Ok, unlambda church numeral decimal conversion challenge accepted. It might be completed by april. But I don't know.

Name: Anonymous 2013-02-12 12:19

-[<.-]<67396086650273868342625613892406676124568677469117541926077064934556195576789376214918538947464035128145977814117326050647012458903242847776543930847589647577548953404132965825417815286413557192764957218585965188738913942216394211501530738830573447063355071184041650181000609405248490237626817068051701

Also prints out a whole bunch of junk null bytes. Note: there's a \x01 after the ']'.

Name: >>1 2013-02-12 14:07

>>33
what the fuck.

Name: Anonymous 2013-02-12 14:22

>>34
He smokes acid, ignore him.

Name: Anonymous 2013-02-12 23:13

>>35
why would u be so mean to me, buddy? ^^

Name: Anonymous 2013-02-12 23:19

>>19
It took you an hour? Are you a retard? I've seen a monkeys write BF interpreters in less than 10 minutes.

Name: Anonymous 2013-02-12 23:26

>>37
He probably wrote it in BF.

Name: >>38 2013-02-13 1:20

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: Anonymous 2013-02-13 11:33

I'm surprised nobody wrote a LLVM-to-brainfuck compiler just yet.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List