60
\$\begingroup\$

The basic idea of a challenge is to print a set output in the shortest code (though that meaning has changed now). We have had many of them, from Borromean Rings to The Gettysburg Address.

##Your Task

This question is similar, except that it requires printing of a special text - the text of this question. Specifically, the very Markdown code that I am typing right now.

To prevent an infinite recursion in the question, the exact text you have to print can be found here.

##Clarifications

  • You are not allowed to use any external sources like the internet.
  • This means that the purpose of this question is not to download this question text and parse it, but instead to store it in you program.
  • This is , so shortest code in bytes wins!
\$\endgroup\$
13
  • 82
    \$\begingroup\$ Let this be a reminder not to edit this post. Ever. Or we're all screwed. \$\endgroup\$ Sep 2, 2015 at 0:42
  • 6
    \$\begingroup\$ @DankMemes There's a 5 minute grace period in which you can make more edits without adding a separate revision. \$\endgroup\$ Sep 2, 2015 at 1:20
  • 7
    \$\begingroup\$ For the record, the full text is 1059 bytes long, including newlines. \$\endgroup\$ Sep 2, 2015 at 1:47
  • 29
    \$\begingroup\$ "but instead to store it in you program" Are you sure you don't want to fix that typo? :D \$\endgroup\$
    – mbomb007
    Sep 2, 2015 at 16:36
  • 15
    \$\begingroup\$ @mbomb007 it's not a typo, it's a feature. \$\endgroup\$
    – h.j.k.
    Sep 3, 2015 at 1:12

25 Answers 25

31
\$\begingroup\$

Bash, 608 597 bytes

0000000: 74 61 69 6c 20 2d 6e 36 20 24 30 7c 7a 63 61 74 0a  tail -n6 $0|zcat.
0000011: 1f 8b 08 00 00 00 00 00 00 00 95 93 d5 b6 e3 3c 0c  ...............<.
0000022: 46 ef fb 14 fa 71 a8 2e f7 d0 d5 30 33 f3 8c 9a 28  F....q.....03...(
0000033: 89 57 13 2b c7 56 0a 6f 3f 56 3d cc 53 6e ec 6c 69  .W.+.V.o?V=.Sn.li
0000044: ed 4f 7e 58 11 2c 30 d8 0c 6c 4e 08 5c 00 c2 0b c1  .O~X.,0..lN.\....
0000055: f2 68 c9 75 c3 25 7b 5e 99 8c 9b b6 a6 8d 95 ed 2b  .h.u.%{^........+
0000066: c8 2a ac 6b 72 25 81 0d 20 0c ad b7 4e 00 21 90 00  .*.kr%.. ...N.!..
0000077: 77 d2 76 02 d6 81 44 6a a8 d8 0b 05 81 8c 73 82 93  w.v...Dj......s..
0000088: 52 71 57 56 71 05 05 1a 42 67 5d 09 15 06 05 46 5a  RqWVq...Bg]....FZ
0000099: 0e 8e d7 a7 06 f0 84 a0 c2 95 7e e4 d0 a0 db 02 17  ..........~......
00000aa: 0a 6b fa 50 78 6e e0 c5 79 f6 9e f5 76 b8 1f 01 e1  .k.Pxn..y...v....
00000bb: d5 c9 4a a4 3d 1a 0e b5 46 c9 75 31 08 82 d9 92 36  ..J.=...F.u1....6
00000cc: 89 3a 88 9d 0f 8f 3b 0a 62 d9 85 e1 7c 3a 1b ef 0f  .:....;.b...|:...
00000dd: 31 64 d6 9a c5 07 90 f1 0a 3a 05 c2 f0 42 65 5c 21  1d.......:...Be\!
00000ee: 91 6d 58 74 be 84 73 79 ee 29 fc 61 91 f1 7c 7a 38  .mXt..sy.).a..|z8
00000ff: 1f 56 bc 36 1e 5d ce 8d b1 c1 48 45 a6 fc c8 35 98  .V.6.]....HE...5.
0000110: b8 a7 06 bd de 3f ff 3c e3 ce c3 43 0c cb 5e ef 61  .....?.<...C..^.a
0000121: 15 9d 7e 20 a9 df 60 1b 5b a3 ef 43 ac 45 ad 24 79  ..~ ..`.[..C.E.$y
0000132: 56 c0 d3 71 67 23 22 d9 8f fd a7 dc 42 4b 99 c5 1a  V..qg#".....BK...
0000143: 84 36 02 46 bd a5 9f ea f0 73 f4 00 1e e8 ce c2 66  .6.F.....s......f
0000154: 31 cb 6d 7f b7 71 45 7e 0b b7 d0 2f 73 5e bb 14 d9  1.m..qE~.../s^...
0000165: ae da 35 c0 06 64 db 6a 11 6f cb 4a 34 a8 41 ec 55  ..5..d.j.o.J4.A.U
0000176: a3 a7 15 69 f8 0e ac 2b ac b3 42 e0 29 eb 7c d0 f6  ...i...+..B.).|..
0000187: d3 14 7c ac 99 aa d0 06 33 49 4d 6d b9 4b 51 7f 1c  ..|.....3IMm.KQ..
0000198: a2 2c 82 16 04 05 77 2e 87 17 15 79 fa 1d f3 b1 09  .,....w....y.....
00001a9: 1b 92 f9 62 7f 3a 26 9c 9a d1 e1 7c 64 66 8b d1 d4  ...b.:&....|df...
00001ba: 20 1d ce cd 64 56 e0 c1 78 82 87 38 39 18 ae 2c ad   ...dV..x..89..,.
00001cb: 4d 88 ce 33 4a fe 2f 44 c1 3b 15 a2 90 5e cf 40 4c  M..3J./D.;...^.@L
00001dc: 04 d0 13 38 16 88 82 78 4d b9 36 d9 05 02 9d c8 d8  ...8...xM.6......
00001ed: 3c 79 17 35 27 4a 80 da 2e 55 16 81 75 ba 42 32 88  <y.5'J...U..u.B2.
00001fe: 10 cd 72 37 e7 21 79 d4 f5 b6 f3 2d 07 fa 26 0f b0  ..r7.!y....-..&..
000020f: 41 8b 69 11 b5 5f 33 e6 5f 6e 48 c6 30 6a 69 d1 47  A.i.._3._nH.0ji.G
0000220: 80 95 3e 2c 76 27 2d 08 e9 66 86 20 ec 75 41 bd ab  ..>,v'-..f. .uA..
0000231: da d6 73 e9 b1 f9 d8 8a 0d e9 58 ab 49 a3 2a 5f f5  ..s.......X.I.*_.
0000242: 21 f0 97 87 54 ef 3d 7d 7a b1 15 0a a7 4f c3 3a d2  !...T.=}z....O.:.
0000253: ff 7a                                               .z

The above is a reversible hexdump. To create the file, execute

xxd -r -c 17 > 55857.sh

paste the hexdump and press Enter, then Ctrl + D.

To run created file, execute

bash 55857.sh 2>&-

Any other filename that contains no whitespace, doesn't start with a dash or contains shell expansion characters (e.g. *) will do.

I chose zopfli as the compressor since it is compatible with the Coreutils program zcat and achieves better compression than gzip, bzip2 and xz.

tail -n6 $0|zcat reads the last six lines of the source file and pipes them to zcat. The following lines are full of syntax errors and produce no output.

Note that zcat will print a warning (since I stripped the checksum of the compressed file), as will bash (because of the syntax errors). These warnings are printed to STDERR (suppressed by 2>&-), which is allowed by default per consensus on Meta.

\$\endgroup\$
1
  • \$\begingroup\$ b-b-bashhh... ? \$\endgroup\$ Sep 28, 2020 at 16:42
13
\$\begingroup\$

Javascript (ES6), 977 964 902 bytes

Used the find-and-replace method to save 95 bytes overall, then converted the entire program to Base64, which saved another 62. (Converting the entire thing took me two whole hours!)

eval(btoa`k23\r8^ù¶¬Ï¢u澡ÿVJ%(®óÝÊ&¦W±Ü³ãç!jY^¾Ãù¯¬zߨºÚn·è§6Èh®×¬·ç(uï³æØhº~¶­úg)àú¬ùÈZúz0Ϭûùg¾«Þúúf§ËêúØ^?>~º&û=A/äb'þwã^ÿjÇ"=Û/=ëx,Ï£³Õ8^øb¾×kzË'ýyßÞ3Þ¶§v³Þ+3ÞØ^Ïx
Ïvv·¬³>³íÀÌ(º¿jÉLO¢³ë")Z¯?>{¦ß­«~ß«z«¢­ë>>)àúþkë)yÈ\\÷úØ^þ´Lûù*^r'âq©eË?\r½êòøÆ«Ú0ç(uï­«~#æ¦úÜ©x>®(!·éèÃ>ÐN©­ëÞßè§~)âµï«yË«²*'ú)Í'?\r{´\\¨»èZ½ãùƧù·¾~§wìõêÞ·¯È¨Ïõ½õy­óßOyÓ=øoMóݧ½ç=öáö¼×f½ko?¾'°Ï{(º·Ï¬ûC03\0)Z®'âq«b¢{Ï¢ï­ï§¢ßZ0yÓ®±ï/Æ×«©~²«që>)6)íz¹Þ´yj{>¶­6«¦úþ´O¢³éè´çhÂyhiß­V§wêZ®Ç¾Üüù»­ú)ìµæ:Ëh­ï¢·è§û*.ú趦+r^Ïx(üøÏϬ£ë!¢»^²ß¡×¾³0[Ê׬ÌÁû§³0³?3×>óï>ÜÌÉ@14ãÕÌøÏ¹§>qÌÊk2ϺަV{>^½©sç0ÿÌ\\ÆÇ1ÿ0óë?3?sõøÏm¶öÿ÷(uè(üû²Öì\\©à{>Ü¢oÙ+>%­{~g>ó÷=þN¬ù®zËb¢v^¶Ü¬nêàfë¢g­ïúÚ>fâÖ~Ï[Z=³>ì¦X­Ì6s=\\ϸ§uìN>qϬøÏ¬úÏÆ¥z»så¬ú`.replace(/z(.)/g,y=>' [:-]().,\r#*!`\\${}=\'>'[parseInt(y[1],36)]).replace(/\+/g,' '))

There are a ton of unprintable characters in this, so here's the raw data: http://pastebin.com/FR6Ah0ZL

And the original encoded text:

a=`The basic idea of aVkolmogorov-complexity] challenge isOP a set output inNshortest code (though that meaning has changed now). We have had many of them, from [BL Rings](DJ/53417/ascii-bL-rings)O[The GK Address](DJ/15395/how-random-is-the-gK-address).Q##Your TaskQTE is similar, except that it requires Ping of a specialF- theFof tE. Specifically,Nvery Markdown code that I am typing right now.QTo prevent an infinite recursion inNJ,NexactFyou haveOP can be found [here](Drevisions/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-source).Q##ClarificationsQ- You are not allowedOuse any external sources likeNinternetHmeans thatNpurpose of tE is notOdownload tEFand parse it, but insteadOstore it in you programHisVcode-golf], so shortest code in **bytes** wins!`,[...c='QDEFHJKLNOPV'].map(x=>a=a.replace(eval(`/${x}/g`),`

Zhttp://codegolf.stackexchange.com/Zhis JZ text Z.
- This ZquestionZettysburgZorromeanZ the Z to ZprintZ [tag:`.split`Z`[c.indexOf(x)])),alert(a)

More explanation coming soon!

EDIT 1: Shaved off 13 bytes.

EDIT 2: Converted to Base64.

\$\endgroup\$
5
  • \$\begingroup\$ I may try to decode the entire program to Base64 (encoding actually increases the length a lot), but the problem with that is there are a lot of characters that are not Base64 compatible (A-Za-z0-9+/). I could replace the spaces with +, which isn't used anywhere else. Any other suggestions? \$\endgroup\$ Sep 2, 2015 at 23:30
  • 1
    \$\begingroup\$ Roughly compressing with atob save 25%, so near 250 bytes in this case. There are 13 non-base64 characters in the text: " [:-]().,\n#*!" that can be replaced with valid base64 characters not present (many uppercase letters). Something like replace(/[\S\s]/g,c=>" [:-]().,\n#*!"['DEFHJKLNOPQUV'.indexOf(c)]||c)" That said, for some reason I did not manage to do it right. \$\endgroup\$
    – edc65
    Sep 3, 2015 at 8:36
  • \$\begingroup\$ There are a lot more replacements you can use to shave off more bytes (as in my second answer) \$\endgroup\$
    – DankMemes
    Sep 3, 2015 at 14:24
  • \$\begingroup\$ @edc65 Thanks for the suggestion! I used a similar technique, which I will explain in more detail later. \$\endgroup\$ Sep 3, 2015 at 17:11
  • \$\begingroup\$ @ETHproductions. This answer is two years old, so I don't know if some rules were changed in meanwhile, but I think this tool can golf it to 820 bytes (and it is consistent even with ES6). \$\endgroup\$
    – user72349
    Sep 14, 2017 at 9:14
6
\$\begingroup\$

Linux Shell 843 bytes

#!/bin/sh
base64 -d <<M|zcat
H4sIAKBL5lUAA5WTQW/bMAyF7/kVHHppgyhOmgRtett2GHbYZQswDEEPtE3bQmzRlegk/vejZLTY
etoAIw4s6fHxe9ShIcgx2AJsSQhcAcJRsH46cdtxzZ7PpuCub+lqZXyGosG2JVcT2ADC0HvrRM8E
EuBB+kHAOhBVDQ17oSBQcElwKw0PdaMrKNAROutqaDBEQVUrwfHlbgk/ST+e408JHboxGlKxbgGV
5w6On9jrW4/DdxUIz7eNSP+UZbFGzW21DILFia6T6lKdZy+DmrDsQrbbbNcPGYbCWpO/Chkfhe5i
L8eD2v5CImPIB1/Dx7L0FP6zyHq32e+yhi/Goyu5MzYY7cDUb7oGJ9275Wx2c/OLBw8HDKfZ7NAo
01elyDfYzrboF6C1qJcJnhXw9DJYlZjoR5Ipt9BTYbEFoauASSGkv4nhH9JL+BF3VrbQLMdF2ngm
P8I39KeSL26KLFX7CtiBjH0s4m3dSAxKjR9i9HSmGL56dZV1VkidFYMPyf40Ba81pyp0xUImUyMP
U9RvQ1SoUE5Q8eBKODbk6V/IqwkbJvLVw2ZNuDGr/W5ltvlqY5D2O3O/rfBxfY97vH/MzpYuJijz
gib+nxVwQpHim80MaCKAnrRR7a1t+aLTqSaHQBAnUs2Td4p5UgnQ2hOl7rQJXSFZqkjKMs5XmDjG
9X7wPavK+zxi1LGYFon0W9bh/3tDIqbjBD16FbCygDzdtCCEyV0Q9nEhco9oe8+1x+7Nij7pWkeS
JqJ8XmgD7y6pnp3P81E/zOdwUfUPvwFrjlp7HwQAAA==
M

All the code in is in the second line.

  • base64 -d decodes base64 data from stdin
  • <<M directs stdin from the script itself with end-of-file at the first line containing only M
  • | is a pipe directing the output to
  • zcat a gzip decompressor that reads from stdin.
  • this followed by the message first gzip compressed and then base64 encoded.

Could probably be further golfed by removing line line breaks from the data and using echo instead og heardoc to store it.

I feel like I'm missing something important...

\$\endgroup\$
3
  • \$\begingroup\$ I had a PHP version of this ready to post when I saw this answer. GG WP \$\endgroup\$
    – DankMemes
    Sep 2, 2015 at 1:19
  • \$\begingroup\$ You should be able to save ~20 bytes, by getting rid of the newlines, and rewriting the pipeline using a herestring, like that base64 -d<<<BASE64DATA|zcat \$\endgroup\$
    – zeppelin
    Dec 28, 2016 at 19:26
  • \$\begingroup\$ I think Dennis found what I missed in his answer. \$\endgroup\$
    – Jasen
    Dec 29, 2016 at 4:51
5
\$\begingroup\$

PHP, 812

Very naive solution. I might come up with something better later.

<?=gzinflate(base64_decode("lZNBb9swDIXv+RUcemmDKE6aBG1623YYdthlCzAMQQ+0TdtCbNGV6CT+96NktNh62gAjDizp8fF71KEhyDHYAmxJCFwBwlGwfjpx23HNns+m4K5v6WplfIaiwbYlVxPYAMLQe+tEzwQS4EH6QcA6EFUNDXuhIFBwSXArDQ91oyso0BE662poMERBVSvB8eVuCT9JP57jTwkdujEaUrFuAZXnDo6f2Otbj8N3FQjPt41I/5RlsUbNbbUMgsWJrpPqUp1nL4OasOxCttts1w8ZhsJak78KGR+F7mIvx4Pa/kIiY8gHX8PHsvQU/rPIerfZ77KGL8ajK7kzNhjtwNRvugYn3bvlbHZz84sHDwcMp9ns0CjTV6XIN9jOtugXoLWolwmeFfD0MliVmOhHkim30FNhsQWhq4BJIaS/ieEf0kv4EXdWttAsx0XaeCY/wjf0p5IvboosVfsK2IGMfSzibd1IDEqNH2L0dKYYvnp1lXVWSJ0Vgw/J/jQFrzWnKnTFQiZTIw9T1G9DVKhQTlDx4Eo4NuTpX8irCRsm8tXDZk24Mav9bmW2+WpjkPY7c7+t8HF9j3u8f8zOli4mKPOCJv6fFXBCkeKbzQxoIoCetFHtrW35otOpJodAECdSzZN3inlSCdDaE6XutAldIVmqSMoyzleYOMb1fvA9q8r7PGLUsZgWifRb1uH/e0MipuMEPXoVsLKAPN20IITJXRD2cSFyj2h7z7XH7s2KPulaR5ImonxeaAPvLqmenc/zUT/M53BR9Q+/AQ=="));
\$\endgroup\$
1
  • \$\begingroup\$ ah, yes using raw "flate" withouth the gzip wrapper saves a few bytes in the data \$\endgroup\$
    – Jasen
    Sep 2, 2015 at 1:38
5
\$\begingroup\$

Bash (+ppmd), 588 bytes

This one beats @Dennis answer by 9 bytes, by utilizing the Prediction by partial matching compression, as implemented by the ppmd package (available in the official Debian/Ubuntu repositories).

Golfed (hex dump)

7461696c202d322024303e450a70706d642064204520313e262d0a6d3420
440a8fafac84a4810000f49f01005c1764584454163b8b4ebdd8f8e5852e
8649a4a01a7674929af8d6cd1d71d0758fed9551a4097e7bb3c21be619a9
ec5d7ea12677f8352b75824dc025a6c1f0b5ca6671431d03ba38e91326eb
8ea9e13a57a9607afd0ae43c8ae548ee3880197e6df9f90b4d6b45baa46b
159a15cd2993dc3f3a50d46226e301b7009174d32328bee2a7c9245a6861
779227a80ca5a016af3f08597440c86db41769b2b2b41646440eda804f9c
3b2aa70530f3080bec7acd58674a3d3b2f78f1c6674d938e415b3d07ab1e
3431a2e3165013b8251d1641f8d94be72b33aecd638d4332faa99662d848
cd5564e305b13f6ba0ccd2b105a0771ab454c417d2ebb9095291e768edde
acec556546dcf60c2cc0af962f96bb7b92d98f465bb799cd92b1b0a49a03
3261943b57a194110556ee4d39226ddfc7483ac83c6a840ba93d41ab64cf
926bbfd0423a43f7c75d73ac55d653e7de9c2d6c9508f6d371870041b133
91da72facf5b83edaf665607277384f903c1475b46e77ee58be32c6bfd5e
0eff7b206eb69b149b6649fd2f5fd933e7f8e2c61179f633551369077edb
c3de193a36f439718d0e249c04c99a88dc45ed7f4b1a8af2684d123397d9
efbca4ce93d202c7ef1f3d895fd56b655b2e34d9da1b301091e2d34e4272
342d5ea16b0973cf83dfb702009437de36f5f6292ec02aab23c3b27bb6ea
dfc40c378f61236db04dda644577114b8340ff93b65928041d8fa801f03c
abe0a89e552dc56842c5782a83992efe7200

Usage

Please take care to pre-install ppmd and m4 packages (if not installed) before running this

#Decode into "C"
xxd -p -r <<EOF>C
7461696c202d322024303e450a70706d642064204520313e262d0a6d3420
440a8fafac84a4810000f49f01005c1764584454163b8b4ebdd8f8e5852e
8649a4a01a7674929af8d6cd1d71d0758fed9551a4097e7bb3c21be619a9
ec5d7ea12677f8352b75824dc025a6c1f0b5ca6671431d03ba38e91326eb
8ea9e13a57a9607afd0ae43c8ae548ee3880197e6df9f90b4d6b45baa46b
159a15cd2993dc3f3a50d46226e301b7009174d32328bee2a7c9245a6861
779227a80ca5a016af3f08597440c86db41769b2b2b41646440eda804f9c
3b2aa70530f3080bec7acd58674a3d3b2f78f1c6674d938e415b3d07ab1e
3431a2e3165013b8251d1641f8d94be72b33aecd638d4332faa99662d848
cd5564e305b13f6ba0ccd2b105a0771ab454c417d2ebb9095291e768edde
acec556546dcf60c2cc0af962f96bb7b92d98f465bb799cd92b1b0a49a03
3261943b57a194110556ee4d39226ddfc7483ac83c6a840ba93d41ab64cf
926bbfd0423a43f7c75d73ac55d653e7de9c2d6c9508f6d371870041b133
91da72facf5b83edaf665607277384f903c1475b46e77ee58be32c6bfd5e
0eff7b206eb69b149b6649fd2f5fd933e7f8e2c61179f633551369077edb
c3de193a36f439718d0e249c04c99a88dc45ed7f4b1a8af2684d123397d9
efbca4ce93d202c7ef1f3d895fd56b655b2e34d9da1b301091e2d34e4272
342d5ea16b0973cf83dfb702009437de36f5f6292ec02aab23c3b27bb6ea
dfc40c378f61236db04dda644577114b8340ff93b65928041d8fa801f03c
abe0a89e552dc56842c5782a83992efe7200
EOF

#Run
bash C 2>/dev/null

#Cleanup
rm -f C D
\$\endgroup\$
5
\$\begingroup\$

Husk, 543 bytes

¨ë⁶ḂcΔȦ₀fα [ȧġ:ko¦Ṁġċov-ẋΞ1y]ŀḣ˹∫⁰ Ṗn↑a₂sẏ_†¹¬Ëβḟ…cÖ¿(σ‼Ä ẏġ¬Ȧ,χg∂ηw).ẆW√ ÷hṀẏ₀fεm,ḟm [ÿ→Ȯṁ¬¥Ż'](⁸ẋ…://cθ)£⌈g.ẋKżxχg.ςm/□os/53417/⁸ÿ:-ÿ→⁰ṁ¬-►gs)†o [ëGγ⁸?Ÿ÷D](⁸ẋ…://cθ)£⌈g.ẋKżxχg.ςm/□os/15395/ȯw-ŸṙÖ-is-´-γ⁶Ÿg-Ÿ∂Δ).¶¶##γYTψ<ıT□N¹∫₇>,ẊΠȦ…¹↑ṙṘ∫ḃρ!θ a⁹←£x -ε£x₀fı≤□N.πΓÄl,ε√Yṁ⌐÷ΦcÖ¿Ä Iαmẏẏġṙ↔Ṅ¤.¶…o□√Ėα¬ΓŸïβγx↕ε□N,ε×Ẋ3£xẏo√ †oΠN↑ċnb₃‡÷[½→](⁸ẋ…://cθ)£⌈g.ẋKżxχg.ςm/Ω∟ṡ/1f731ea3-0950-4b03-ae95-24fa812a9a28/√w-Ȯ().¶¶##Ŀ=Cσ¶¶-ẏuα→⁰tα◄₇⁰ Üu▲ΨΞẊėŻ⁵←↕Ëλ;≠.¶-ïTÄẋȦ…εṗ↑₀fı≤□N¹∫ṅ ⁰ ⌉⌋ḋṡ □,ẋ'▲∂ȷ₉'it,⁸t□ḋ≠†oȮR₃i↑↕ẏo⁹ṙ.¶-ïT¹∫[ȧġ:cθ)-£⌈g],⁵o⁶‡+□{Φ¹¬**ḃŸy**Ẇ≠s!

Try it online!

I have just revamped the compression algorithm in Husk, making it quite a lot faster. I wanted to try it on a question with a long text to compress, and here was my occasion. This took less than two seconds to compress, so I'm happy about my revamping. It's also currently shorter than any other answer to this challenge (which I realize is quite old, but I'm happy about my compression system all the same ^^).

\$\endgroup\$
4
\$\begingroup\$

PHP, 890 bytes (no built in compression)

I promised a solution less naive than gzipping (which feels too much like cheating even though it's legal here), so here it is.

<?php @$e=explode;$s='Thzbasic ideaKEkolmogorov-compl#ity] c:llengz`Da sejQtpuj_L^(thQgh<meX6 :s chXgeHnF). Wz:vz:HmXy of{emxfrom [BO R6@53417/ascii-bO-r6s) Z[ThzGU A&@15395/hF-rXdom-is-the-gU-a&sJYQr Task

Th`} `simil+x#cept<ijPquiPs pr_t6Kspecial V-LV?. Spec>lly,Lvery M+kdFn %<I am typ6 righjnF.

To pPvenjX _f_itzPcurs; _L},L#acjVyQ :vzDcX bzfQnH[heP~Pvis;s/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-=JCl+>t;s

- YQ +znojallFeHZuszXy #$al =s likeL_$etNmeXs{atLpurposz? `nojZdFnload{`} VXHp+szitxbuj_steaHZstorzij_ yQ programN`E%-golf]xso ^_ **bytes** w_s!';$m=$e('|',', |ex|tern|code|ddPs|ar|_g|ha|ion|{aj|sQrce|ifica|of{`}|s~}s/|Zpr_j|[tag:|ow|d |).

##| of a |{z|.
- Th`|orromeX|re|ou|ettysburg|texj|an|to |shortesjcodz|in|is |t |e | th|question|](http://codegolf.stackexchange.com/');foreach(str_split('x#$%&+6:;<=>?@DEFHJKLNOPQUVXZ^_`jz{}~')as$i=>$l)$s=implode($m[$i],$e($l,$s));echo$s;
\$\endgroup\$
4
\$\begingroup\$

Java (OpenJDK 8), 1055 bytes

interface T{static void main(String[]a){System.out.print("The basic idea of a [tag:kolmogorov-complexity] challenge is to print a set output in the shortest code (though that meaning has changed now). We have had many of them, from [Borromean Rings](_%s/53417/ascii-borromean-rings) to [The Gettysburg Address_%s/15395/how-random-is-the-gettysburg-address). \n##Your Task\nThis % is similar, except that it requires printing of a special text - the text of this %. Specifically, the very Markdown code that I am typing right now. \nTo prevent an infinite recursion in the %, the exact text you have to print can be found [here_revisions/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-source). \n##Clarifications\n- You are not allowed to use any external sources like the internet. \n- This means that the purpose of this % is not to download this % text and parse it, but instead to store it in you program. \n- This is [tag:code-golf], so shortest code in **bytes** wins!".replaceAll("_","])http://codegolf.stackexchange.com/").replaceAll("%","question"));}}

Try it online!

By using replaceAll for some of the long strings, I saved a few bytes.

Golfed 2 bytes by putting "](" before "_" into the replace part.

Thanks to FlipTack for golfing 19 bytes by taking out unnecessary whitespace and unnecessary stuff! (This was a really long time; I've learned a lot since then)

Thanks to Kevin Cruijssen for golfing off a few bytes. I'm not sure how to use string formatting to help me here, unfortunately.

NOTE: This answer is now referenced here and thus cannot be golfed anymore.

\$\endgroup\$
3
  • \$\begingroup\$ You have a lot of unneeded whitespace here. You don't gaps in T {, ) {System, "_", "]..., etc. And can't String[] args be written as String[]a? \$\endgroup\$
    – FlipTack
    Dec 28, 2016 at 17:25
  • \$\begingroup\$ For a shorter byte count, you could also make a function which returns the string. \$\endgroup\$
    – FlipTack
    Dec 28, 2016 at 17:27
  • \$\begingroup\$ You can use a Java 8 interface T{static void main instead of class T{public static void main to save 1 byte; you can change println to print to save 2 bytes; You can remove the spaces at "_", "[... and "%", "question" to save 2 bytes; You could replace print with printf so you won't need the replaceAll (not sure if, and how many this saves). \$\endgroup\$ Aug 11, 2017 at 8:40
3
\$\begingroup\$

Fourier, 3359 bytes

84a104a-3a32a98ava115a105a99a32a105a-5a^a97a32a111a-9a32a97a32a91a116a97a+6a58a107a+4a-3a^a+2a-8a+8a+3a-3a+7a45a99a111a-2a+3a-4a-7a120a105a116a+5a93a32a99a+5a97a108aa-7a+9a-7a-2a32a105a115a32a116a-5a32a112a+2a-9a+5a+6a32a97a32a115a101a116a32a111a+6ava-4a+5ava32a105a+5a32a116a104a-3a32a115a104a+7a+3a+2a101a115a^a32a99a111a100a^a32a40a116a104a+7a+6a103a^a32a116a104a97a116a32a109a-8a97a110a-5a+5a-7a32a104a97a115a32a99a+5a97a110a-7a-2ava32a110a^a+8a41a46a32a87a101a32a104a97a118a101a32a104a97a+3a32a109a97a110a121a32a111a-9a32a116a104a-3a+8a44a32a102a114a-3a-2a32a91a66a111a+3aa-3a-2a-8a97a110a32a82a105a+5a-7a115a93a40a104a116aa-4a58a47aa99a111a100a^a+2a+8a-3a-6a46a115a^a97a99a+8a-6a120a99a+5a97a110a-7a-2a46a99a111a-2a47a113a+4a101a115a^a105a+6ava+5a47a53417o47a97a115a99a+6aa45a98a111a+3aa-3a-2a-8a97a110a45a114a-9a+5a-7a115a41a32a116a-5a32a91a84a104a-3a32a71a101a116aa+5a-6a98a117a-3a103a32a65a100aa114a101a115aa93a40a104a116aa-4a58a47aa99a111a100a^a+2a+8a-3a-6a46a115a^a97a99a+8a-6a120a99a+5a97a110a-7a-2a46a99a111a-2a47a113a+4a101a115a^a105a+6ava+5a47a15395o47a104a+7a+8a45a114a97a110a100a111a-2a45a105a115a45a116a104a-3a45a103a-2a116aa+5a-6a98a117a-3a103a45a97a+3aa114a101a115aa41a46a10aa35aa89a111a+6a-3a32a84a97a115a-8a10aa84a104a^a115a32a113a+4a101a115a^a105a+6ava32a105a115a32a115a105a+4a-4a+3a97a114a44a32a101a120a99a+2a112a+4a32a116a104a97a116a32a105a116a32a114a101a113a+4a105a+9a101a115a32a112a+2a-9a+5a+6a105a+5a-7a32a111a-9a32a97a32a115a-3a101a99a+6a97a108a32a116a101a120a-4a32a45a32a116a104a-3a32a116a101a120a-4a32a111a-9a32a116a104a^a115a32a113a+4a101a115a^a105a+6ava46a32a83a112a101a99a+6a-3a+3a99a97a108aa121a44a32a116a104a-3a32a118a101a114a+7a32a77a97a114a-7a-7a111a+8a-9a32a99a111a100a^a32a116a104a97a116a32a73a32a97a109a32a116a+5a-9a-7a+5a-7a32a114a-9a-2a^a116a32a110a^a+8a46a10aa84a111a32a112a+2a101a118a101a+9a+6a32a97a110a32a105a+5a-8a+3a+5a-5a116a101a32a114a101a99a117a-3a^a105a+6ava32a105a+5a32a116a104a-3a32a113a+4a101a115a^a105a+6ava44a32a116a104a-3a32a101a120a97a99a116a32a116a101a120a-4a32a121a111a+6a32a104a97a118a101a32a116a-5a32a112a+2a-9a+5a+6a32a99a97a110a32a98a+3a32a102a+9a+6a-7a100a32a91a104a-3a114a101a93a40a104a116aa-4a58a47aa99a111a100a^a+2a+8a-3a-6a46a115a^a97a99a+8a-6a120a99a+5a97a110a-7a-2a46a99a111a-2a47a114a101a118a105a115a105a+6ava+5a47a1o102a731o101a97a3o45a0o950o45a4o98a0o3o45a97a+4a95o45a24o102a97a812o97a9o97a28o47a118a105a-4a119a45a115a-4a+6a-3a99a+2a41a46a10aa35aa67a108a97a114a-9a-3a+3a99a97a116a105a+6ava+5a10aa45a32a89a111a+6a32a97a114a101a32a110a^a+5a32a97a108aa+3a+8a101ava32a116a-5a32a117a-2a101a32a97a110a121a32a101a120a-4a101a114a-4a97a108a32a115a-4a+6a-3a99a+2a115a32a108a-3a+2a-6a32a116a104a-3a32a105a+5a+6a101a114a-4a-9a116a46a10a45a32a84a104a^a115a32a109a-8a97a110a+5a32a116a104a97a116a32a116a104a-3a32a112a+5a-3a-2ava+4a101a32a111a-9a32a116a104a^a115a32a113a+4a101a115a^a105a+6ava32a105a115a32a110a^a+5a32a116a-5a32a100a111a+8a-9a-2a+3a97a+3a32a116a104a^a115a32a113a+4a101a115a^a105a+6ava32a116a101a120a-4a32a97a110a100a32a112a97a114a^a101a32a105a116a44a32a98a117ava32a105a+5a+5a^a101a97a+3a32a116a-5a32a115a^a-5a+3a101a32a105a116a32a105a+5a32a121a111a+6a32a112a+2a-3a-8a114a97a109a46a10a45a32a84a104a^a115a32a105a115a32a91a116a97a+6a58a99a111a100a^a45a103a+8a-3a-6a93a44a32a115a-4a32a115a104a+7a+3a+2a101a115a^a32a99a111a100a^a32a105a+5a32a42aa98a121a-5a101a115a42aa32a119a105a+5a+5a33a

Uses isaacg's program to golf the program. This can likely be shortened even more using variables.

\$\endgroup\$
3
\$\begingroup\$

///, 976 961 bytes

/?/ code //_/shortest?//^/text //@/the//$/ the //&/ to //`/question//~/codegolf.stackexchange.com/The basic idea of a [tag:kolmogorov-complexity] challenge is&print a set output in$_(though that meaning has changed now). We have had many of @m, from [Borromean Rings](http:\/\/~\/questions\/53417\/ascii-borromean-rings)&[The Gettysburg Address](http:\/\/~\/questions\/15395\/how-random-is-@-gettysburg-address).

##Your Task

This ` is similar, except that it requires printing of a special ^-$^of this `. Specifically,$very Markdown?that I am typing right now.

To prevent an infinite recursion in$`,$exact ^you have&print can be found [here](http:\/\/~\/revisions\/1f731ea3-0950-4b03-ae95-24fa812a9a28\/view-source).

##Clarifications

- You are not allowed&use any external sources like$internet.
- This means that$purpose of this ` is not&download this ` ^and parse it, but instead&store it in you program.
- This is [tag:code-golf], so _in **bytes** wins!

-15 bytes thanks to steenbergh

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ Got it down to 961 by prepending /?/ code //_/shortest?//^/text / and adding ?, _ and ^ in the right places. \$\endgroup\$
    – steenbergh
    Dec 28, 2016 at 10:25
2
\$\begingroup\$

HTML, 1082 1072

With the same text font :P The end tag </pre> is not necessary.

<pre>The basic idea of a [tag:kolmogorov-complexity] challenge is to print a set output in the shortest code (though that meaning has changed now). We have had many of them, from [Borromean Rings](http://codegolf.stackexchange.com/questions/53417/ascii-borromean-rings) to [The Gettysburg Address](http://codegolf.stackexchange.com/questions/15395/how-random-is-the-gettysburg-address).

##Your Task

This question is similar, except that it requires printing of a special text - the text of this question. Specifically, the very Markdown code that I am typing right now.

To prevent an infinite recursion in the question, the exact text you have to print can be found [here](http://codegolf.stackexchange.com/revisions/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-source).

##Clarifications

- You are not allowed to use any external sources like the internet.
- This means that the purpose of this question is not to download this question text and parse it, but instead to store it in you program.
- This is [tag:code-golf], so shortest code in **bytes** wins!
\$\endgroup\$
2
\$\begingroup\$

Octave, 1017

Strightforward with two substitutions, I do not think it is possible to reduce even more.

 q='question';s='http://codegolf.stackexchange.com/';disp(['The basic idea of a [tag:kolmogorov-complexity] challenge is to print a set output in the shortest code (though that meaning has changed now). We have had many of them, from [Borromean Rings](',s,q,'s/53417/ascii-borromean-rings) to [The Gettysburg Address](',s,q,'s/15395/how-random-is-the-gettysburg-address).\n\n##Your Task\n\nThis ',q,' is similar, except that it requires printing of a special text - the text of this ',q,'. Specifically, the very Markdown code that I am typing right now.\n\nTo prevent an infinite recursion in the ',q,', the exact text you have to print can be found [here](',s,'revisions/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-source).\n\n##Clarifications\n\n\n- You are not allowed to use any external sources like the internet.\n- This means that the purpose of this ',q,' is not to download this ',q,' text and parse it, but instead to store it in you program.\n- This is [tag:code-golf], so shortest code in **bytes** wins!'])
\$\endgroup\$
3
  • \$\begingroup\$ Really old answer, I know, but you could save 4 bytes with this (link to TIO) \$\endgroup\$ Aug 12, 2017 at 21:58
  • \$\begingroup\$ And a further byte with this \$\endgroup\$ Aug 12, 2017 at 22:06
  • \$\begingroup\$ s='](http://codegolf.stackexchange.com/' saves 4 bytes \$\endgroup\$
    – elementiro
    Sep 29, 2020 at 19:36
2
\$\begingroup\$

Vyxal, 661 bytes

`λƛ »ǔ †₁ of a [ƈ↲:k꘍Ġ꘍τrov-₁µ] ɾṖ is to ⟑Ẇ a ƛ⊍ ∆ė in λλ ×¶½Ḣ ¬⋎ (»⟇ λ⟇ ↓₅ λβ ⌐ƈ λṠ). We λʁ λ‡ ƛ≤ of ƛ‹, λø [Bor←„an ↓₄](ṅ•://¬⋎»₅.⟩β•∵•⅛/∨§/53417/Ġ₴-ǍḂ←„an-↓₃) to [λƛ λŻ≠ŻǍṪg ¬Ġ](ṅ•://¬⋎»₅.⟩β•∵.•⅛/∨§/15395/λ₴-⌐‡-is-λλ-λẎ≠ŻǍṪg-¬Ḟ).



##λ⌐ ʀǓ



λ« ⟇Ṡ is ÷₃, øṄ λ⟇ it ↔ƒ ɽǔ of a ¬∪ ∧□ - λλ ∧□ of λ× ⟇Ṡ. ∵‟, λλ ƛ² «Ċ∧ċ ¬⋎ λ⟇ I am Ȯ» ¬ẋ λṠ.



To ɾ₃ an ĿẎ ¡⁺ꜝµẏḂ in λλ ⟇Ṡ, λλ →æ ∧□ λ• λʁ to ⟑Ẇ λ‹ be ∧½ [λḞ](ṅ•://¬⋎»₅.⟩β•∵.•⅛/Ẋ₁/1f731ea3-0950-4b03-ae95-24fa812a9a28/λ₌-⟑Ḋ).



##C⇧ċ⋏↓¢₌ẏḂs



- λß λ½ λ† ⌐⁰ to λ₇ λ¶ ↔ċ €ƈ λƒ λλ ¬Ḋ.

- λ« ×Ḣ λ⟇ λλ †¯ of λ× ⟇Ṡ is λ† to ∧ẋ λ× ⟇Ṡ ∧□ λ¬ ḟ⋎se it, λė ∆» to ¬↓ it in λ• ƛ¾.

- λ« is [ƈ↲:¬⋎-»₅], so ×¶½Ḣ ¬⋎ in **¨ƈ** ṅ↓!

Try it Online!

Probably not a winner, but it was fun.

\$\endgroup\$
1
\$\begingroup\$

Python 2, 988 bytes

I use a simple string substitution. Still golfable...

print"""The basic idea of a [tag:kolmogorov-complexity] challenge is to print a set output in the shortest code (though that meaning has changed now). We have had many of them, from [Borromean RingsZQs/53417/ascii-borromean-rings) to [The Gettysburg AddressZQs/15395/how-random-is-the-gettysburg-address).

##Your Task

This Q is similar, except that it requires printing of a special text - the text of this Q. Specifically, the very Markdown code that I am typing right now.

To prevent an infinite recursion in the Q, the exact text you have to print can be found [hereZrevisions/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-source).

##Clarifications

- You are not allowed to use any external sources like the internet.
- This means that the purpose of this Q is not to download this Q text and parse it, but instead to store it in you program.
- This is [tag:code-golf], so shortest code in **bytes** wins!""".replace('Z',"](http://codegolf.stackexchange.com/").replace('Q',"question")
\$\endgroup\$
5
  • \$\begingroup\$ You can add a space in front of the replacement text of "Q", this saves a few characters (but decreases readability). \$\endgroup\$ Sep 2, 2015 at 18:53
  • \$\begingroup\$ @heinrich5991 I cannot, since question is used in two of the URLs, causing more to be lost than gained with that adjustment. \$\endgroup\$
    – mbomb007
    Sep 2, 2015 at 19:49
  • \$\begingroup\$ You can try str.translate for multiple replacements \$\endgroup\$
    – Sp3000
    Sep 3, 2015 at 0:01
  • \$\begingroup\$ @Sp3000 doesn't translate require the entire list of alphanumeric characters, though? ... translate the characters using table, which must be a 256-character string giving the translation for each character value, indexed by its ordinal. \$\endgroup\$
    – mbomb007
    Sep 3, 2015 at 2:51
  • \$\begingroup\$ @mbomb007 Not if you use Unicode strings, like u"abc".translate({97:u"x"}) although at that point Python 3 might possibly be better \$\endgroup\$
    – Sp3000
    Sep 3, 2015 at 3:30
1
\$\begingroup\$

SOGL 0.8, 571 bytes (non-competing)

""%I│Γ"J∞‛█Τ∙‚+∑(4░║ρ│oΛe2ρ′╗m↔←A<¡►&ŗNō▼ΥικVf÷!╗‼ξ┐Wο1 sY¬ƨ⁾¡»╬j§4¡η╬Σεxτ§¼rķ(Λ‽Kp√½ΗφW≡fC╚⁹≠╬Βηs0θ⅓I+žπƨΒY³Pu⁽šnχ~░5u►℮O¹o│≈+Δ┐š;ΜTV)wm⌠⁄υ∞1;gγ¼τωΚ■FR░ŗΤ`∞‰ŗ⌡šZž█GνhΗ)Δo▲`℮↔uξxKΤ4└χ…⁄ŗ╝cJē∙ΒΤi%⁽Σσk÷YΨ►l"βj;σoƨΩ╚↔f5$φvhē≠¦jO⌠T[±žν⅛◄bk⅜³β⅜UEΙ′Η--<~Y′¦!πƧ⁾=╥ν#○∙2¡TFpπō┌↑# ±⌠℮¬‰Τ>⌠t⅝>ķ'¶↓+w(½⁷↑ø#Ξ%:║θ↕↑DƧ⅞℮5Rr⁴,«xģΜ5Χ▓#⁸\‼∞f.xΣ╬≤∑ΛB;Ο/Sšδ‚^Λ½0S/≥E=÷℮YεDHψκhψB~ν⅓┌e>#∙0℮|θR⁸½N…1─ķφ∙Y⁵№Χ$gx:χZō┐Δ=░⁄κ§o□π|÷øΣxē′↓Κηπε\╤⁽Ιβiμ^ņμΦƧK℮Δnε{ΩA7≠ΓIw¶¤╥γ╝δΞ▼□╚¼Uf↔mK←G▓a⁴ηē¦CΓ°⁵⁄χwƧB2h⌠↓■ņ-AΛ∆Y⅟VYK0○4Gx↕┐ķk#ž6æ3►ΘšXΤΕ█Rtε{►n‰6mI-υō⁰┼¶BķT³‘ ^"≠‚z|√λ⅜…w╝_└b′℮Χ]υ:.▒█m≤↔t§)U█ā⅛□⁸S$/‘ŗ

Expect this to be golfed some more.

Basically a compressed string (english words and characters) with s](http://codegolf.stackexchange.com/questions/ replaced with ^ and replaced back.

\$\endgroup\$
2
  • \$\begingroup\$ Hmm, looks like SOGL is newer than this challenge ? If this is true, you should mark you question accordingly (i.e. "Non-Competitive") \$\endgroup\$
    – zeppelin
    Dec 28, 2016 at 21:36
  • \$\begingroup\$ @zeppelin yep. Missed the date somehow. \$\endgroup\$
    – dzaima
    Dec 28, 2016 at 21:42
1
\$\begingroup\$

Dyalog APL, 638 bytes

Requires ⎕IO←0. For ⎕IO←1 just change ¯128 to ¯129.

0(220⌶)¯2(219⌶)¯128+⎕AV⍳')lec;∣↑å⍒3ÌV@Ìé*↓!K⍺┤>N.ÒrÌrkV|≡î%ta⍲#=ê¿┴´∇Ì;¿⍬┌u⍱2ØZ&C↑áa€ÛË}QOG⍀@ÍÛõÒÔþö&7á;⍺┌íp⌹,0ê<ÐîÏ⊢$`⊃´´@äz0┐R⊖Û)ä⍒
`⌹v∨P\X,Ô4─9à   AâäàZ¨ɫz¶┤Úà∊Ø⍴81⍱ýHâ⍳⋄ ⍋kññÝ;⍪T⍟↑ã)(¶>ääÁw âMîà    #∇
JYâ→Ô¯cö.CíæÕìíá¡⍣g┬q⍋`ûÓïɫ∪mbÎ┘l@ä
hPVðü$┌·┴Ì߯ö⊣>t┘åà$ÐÄ%⍵D∩õ§:⌈¥×⌹⍉⊣⊤ɫ?WM⊂^Ð≡(*uÒdã⍟⊂⍪þ3.Bt (o!NO¢AAë}⍞⍳Y⌊BÝ⊖+ÕþS∊ï⌽∊Î(ASà⍺\É∊ç  ⍞<ï¡Û∪êñ´┼⊂↓xî,€[ï⊣≤∪⍬Á┴ußI¿lE
Ñ¿≥§⍋7~ÒQtH├5⍫'

'...' the string consisting of the following bytes: F8 1C 15 13 C1 EE 5B B0 90 C5 33 68 56 E7 68 94 D9 B4 B1 CC 4B 0E E3 A4 4E 2E 6D 22 68 22 1B 56 C0 D1 98 D9 0C 24 11 C4 D8 A2 95 F2 E4 DB B7 68 C1 F2 2F DE 25 C3 32 89 5A 2C DA 43 B0 8D 11 7C 73 67 7D 51 4F 47 9F E7 69 73 7A 6D 6F 75 D5 DA 37 8D C1 0E DE 97 20 CB C2 30 95 A0 6C 98 6B 3B 3D ED BB DB DB E7 8F 2A 30 DD 5F 52 C9 73 F8 8F C5 03 ED CB 26 A6 50 9E 58 C2 6F 34 E1 39 63 09 41 8E 5C 8F 8C 5A 80 0B 2A EF 2C E3 72 8C 05 AD 89 AE 38 31 C3 5D 48 8E B2 F4 04 C6 1B 9A 9A 74 C1 D0 54 CA B0 76 F8 B9 07 EF A4 8F 8F 61 27 04 8E 4D 98 8C 09 D8 B7 03 4A 59 8E F6 6F 2D 13 D5 2E 43 97 91 70 77 97 8D F3 FF 17 E5 21 C6 ED 5B EA 6E 99 0B BD 1D 12 6A DC 1C E7 8F 03 18 50 56 78 EC 3D 3A DE 5E E4 68 8B 2D D5 7E A4 24 DC 90 3A 8C 3D 6C 82 0C 0F 44 BC 7A FC F0 B5 3C AB CB C7 7E BF 0B AC 57 2B 4D BA EB 6C D1 B9 B4 25 6D 14 76 CA BA D0 75 33 2E 42 24 FB B9 1F CC 4E 4F 3F 5B 41 41 96 7D FE B2 59 B6 42 74 C9 A9 70 75 3A 53 AD 3A 99 C8 AD 6A B9 41 53 8C 0E 9E 86 AD 92 09 FE A0 99 F3 73 BD 95 9A DB E0 BA B1 28 98 C2 7C 9B 99 7E A1 BD 07 2F 61 E4 25 8B 49 F2 1C 45 03 87 F2 A3 FC C6 37 AF 6D 51 24 48 E2 35 CF 00 9D 70 58 07 A2 CE 57 8D 07 20 44 78 B6 C4 CF 87 8A 61 0B D7 D3 E9 23 19 44 D9 B1 B8 9F 6D 27 A9 F8 2A 19 2A 50 89 8B CE 26 C6 BB 24 28 1F 07 28 90 21 1C 20 32 03 A9 E1 57 10 23 FF A1 AF A6 34 CF 64 2B 1B 55 12 F0 25 96 1B 75 C2 DD 67 0B 15 C2 5A 2C 55 55 F5 05 37 4B AB 5C 60 55 ED F6 50 F4 D4 DE 18 97 14 78 FF 90 40 91 C5 0C EF B2 D1 A0 09 80 BA 12 C6 25 37 36 35 C7 19 CE B1 B9 F8 02 B0 11 E2 1E 1C 91 4C C9 45 C3 2B 77 94 3B 13 A6 E4 07 F8 AE A2 B1 4B B0 DF BE F1 8C 7B 7D 60 FA AB AA AF 73 88 D1 07 E2 D2 A4 50 EF 2D 8C 7F 5F 87 A2 B1 99 A7 68 51 09 00 66 99 64 71 CD 73 CC 98 5D F9 36 AE EC 84 6E 81 ED 6F EC 6D 30 FB 36 A2 5F 78 DA 87 12 AA 20 3C 1F C9 83 AF DE D2 39 BB 1D 66 23 BC 18 CE 61 A8 6A EF 4E FE 81 AC 8C F9 B3

⎕AV⍳ indices of the characters in the Atomic Vector (the character set)

¯128+ subtract 128 to get 8-bit signed integers

¯2(219⌶) zlib decompress

0(220⌶) deserialize array

\$\endgroup\$
2
  • \$\begingroup\$ Didn't they recently change ⎕AV in Dyalog v16? (I think it was @ or something) \$\endgroup\$
    – Adalynn
    Aug 10, 2017 at 21:48
  • \$\begingroup\$ @Zacharý No, ⎕AV doesn't change anymore. @ has always been in, but was first assigned meaning in 16.0. \$\endgroup\$
    – Adám
    Aug 11, 2017 at 4:36
1
\$\begingroup\$

Javascript (ES6), 887 bytes

s=`Th"basic=dea ¢¦kolmog>ov-complexDy] c&lleng"H<z a se$outputEJ§(though%&$me6O&s c&nge?now). W"&v"&?m6y of%hemLfrom [B_ R+gsZ53417/ascii-b_-r+gs)<[Th"GV AjZ15395/how-r6dom-H-the-gV-aj{Your Task

TUPsimilFLKcept%&t=$@quir' zO¢sXalN-JtK$¡. SXfically,Jvery MFk£ Q"t&$I am%ypOrigh$now.

To preven$6Ef+D"@cursionEJqu'|,JKactN¤&v"to pr+$c6 b"foun?[he@^@vHions/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-}ce{ClFifica|s

- You F"no$allowed<us"6y K~al }c' lik"th"+~et¥hH me6s%&tJpurpos"¡Pnot<£load%UN6?pFs"DLbutEstead<st>"DE ¤program¥hHP¦Qe-golf]Lso §+ **byt'** w+s!`
for(i in a=`§¦¥¤£P¡~}|{N@DEFXUJK¢OzLjVHZ^<_'Q6?+&$>%="`)s=s.split(a[i]).join(`sh>t'$Q";[tag:;.
- T;you ;down;=s ;of%U;tern;sour;tion;).

##;%K$;re;it;=n;ar;peci;hH qu'tion;%h";ex;of a ;+g ;pr+t;, ;ddr's;ettysburg;is;^qu'tions/;](http://Qegolf.stackexc&nge.com/;%o ;>rome6;es;cod;an;d ;in;ha;t ;or; t; i;e `.split`;`[i])
alert(s)

String replacement taken to the extreme.

Explanation

s=`...`                     // The compressed string
a=`...`                     // List of characters to replace
b=`...`.split`;`            // List of replacements
for(i in a)                 // For every index in a
  s = s.replace(a[i], b[i]) // Replace every occurence of a[i] in s with b[i]
alert(s)                    // Print the result
\$\endgroup\$
1
\$\begingroup\$

Python 3, 950 bytes

s='''The basic idea of a [tag:kolmogorov-complexity] challenge ßto print a set output ināá(though â àing has changed now). We have had many of them, from [Borroà Rings]æås/53417/ascii-borroà-rings) to [The Gä Address](æås/15395/how-random-is-the-gä-address).

##Your Task

Tãå ßsimilar, except â it requires printing of a special text -ātext of tãå. Specifically,āvery Markdown code â I am typing right now.

To prevent an infinite recursion ināå,āexact text you have to print can be found [here]ærevisions/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-source).

##Clarifications

- You are not allowed to use any external sources likeāinternet.
- Tãàs âāpurpose of tãå ßnot to download tãå text and parse it, but instead to store it in you program.
- Tãß[tag:code-golf], so áin **bytes** wins!'''
for x in zip('æãåāàáâäß','(http://codegolf.stackexchange.com/,hß,question, the ,mean,shortest code ,that,ettysburg,is '.split(',')):s=s.replace(*x)
print(s)

Try it online!

Still not optimal...

\$\endgroup\$
2
  • 1
    \$\begingroup\$ There are probably several one-byte characters that aren't part of the input that you could use for a shorter count. For example, _ doesn't show up anywhere, so you could save at least a few bytes using that instead of a multi-byte character. \$\endgroup\$
    – hyper-neutrino
    May 29, 2021 at 3:20
  • 1
    \$\begingroup\$ @hyper-neutrino thanks for the tip, i'll do it soon \$\endgroup\$
    – Wasif
    May 29, 2021 at 3:36
1
\$\begingroup\$

05AB1E, 658 587 586 bytes

¶2×UžX’(ÿƒËŠˆ.‚‹º.ŒŒ/…é/’V’½¨›Ú€¬¾ãҲћ’™X„##«©•Xć-.ʒ¦a‘lsإʙ´XEוh6'-:lY'†ä'¥±:’ÿÿ/€×-…ï)’'€Î’ϛҢs¾ß’'€„™X’‰©„‹’™'¥Ï™'€Œ™X„€žšª™®.•p4ÊĆιÅ•©Žy!Y’ÿÿ/€ß-ïÊ-€ˆ-€€-ÿ-ƒ¹)’®’[€€ ÿ ƒ¹]’™ŽÒ`Y’ÿÿ/Ø®-ßßr«Ä€¤-£Ç)’’[ßßr«Ä€¤ £Ç]’™'€¦™'‰Ò’ [Ÿ¾:å±ëºå¯€—ov-ÄÕ]’'€€™“ÿеީ€‚€…ÿ›Ý€ˆ€„…¢€…‚áîÕ€†€€ˆ¶estƒË (ÿ€Š£È€°ï‚€Ó). ÿ€¡‚†‚Ü€‚‚¨,€š ÿÿ€„ ÿÿ.ÿÿÿÿ†ä€ˆ‡Å,•Ý€Š€•–ߜ怂€…ƒÑ„¹ -€€„¹€‚€Œ†ä. ÿ,€€‚Ò ÿƒË€Š I€ÜÜÔƒ©€Ó.ÿÿ›Ë€¤ÚÕ ÿ€†€€†ä,€€ª‚„¹€î€¡€„…¢€©€ïƒç [ÿ]ÿ.ÿÿ
“?…
- U'¡Ï’ [Ÿ¾:ƒË-Šˆ]’'€Œ™X‚2и`'€î™X“ÿÿ€™€–ï¶€„€Å€Æ–²Žç€è€€ƒ¸.ÿÿˆ¾€Š€€ŽÂ€‚€Œ†ä€ˆ€–€„„†ä„¹€ƒ³™se€•,€³î¿€„ƒï€•€†€î‚ë.ÿÿ€ˆÿ,€Êˆ¶estƒË€† **ÿ**·Ñ!“,

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ I believe this is the only valid answer here, since the question was edited by the Community bot recently. Congratulations! \$\endgroup\$
    – user
    Sep 29, 2020 at 18:08
  • 1
    \$\begingroup\$ Actually, I think you need to go back to the version of the question without spaces after ##, since the edit wasn't intended by the OP. \$\endgroup\$
    – user
    May 28, 2021 at 15:45
  • 1
    \$\begingroup\$ @user Alright, well, I'm not complaining. Saves me a byte :) \$\endgroup\$
    – Makonede
    May 28, 2021 at 15:50
0
\$\begingroup\$

Java 1130 bytes

import java.io.*;import java.util.*;import java.util.zip.*;public class P{public static void main(String[]a)throws Exception{InputStream s=new InflaterInputStream(new ByteArrayInputStream(Base64.getDecoder().decode("eNqUk0Fv2zAMhe8F+h849NIGUdw0Ddr0tu0w7LDLFqAYgh5om7aF2JIr0Un870fKSLf1tAFB4sjSx8f3qG1DkGO0BdiSEHwFCDvG+mnv287XPviDKXzXt3SyPL5A0WDbkqsJbAT20AfrWM5EYvAD9wODdcBCjY0PTJGh8CXBNTd+qBt5gwwdobOuhgajAoVWgvPHmwU8kywe9KuEDt2oggTWzaEKvoPdJx/kV47DdwHEl+uGuX/KMq1R+7ZaRMZiT6eJuhDl2esgIqx3MVuv7pcPGcbCWpOfQSYo6EZ72W1F9hdiHmM+hBo+lmWg+J9FluvVZp01/mgCutJ3xkYjHZj6jWtw4t4sLi8uL66ufvohwBbjXv9uG/H1TFOPo+1si2EOUo96ngy0DIFeByuYKQF1M2UXeyostsB0YjApiPSYfPwDvYAfurOyheQ5ztPGA4URvmHYl/7opthSta+AHfDYa5Fg64Y1rCR+qwNAB9IRELWuss4yibZiCDE1MM3CuepUh05Y8CRr9MMU+NsoFQLKCSo/uBJ2DQX6F/9FhI2T/9XDakm4Mreb9a25z29XBmmzNnf3FT4u73CDd4/ZwdLRRPG9oHMKn8XkZEeKUdcMSDKAgaRd6a9t/VHmVIQOkUBnUxqg4MTsiRShtXtKHUoj8oZ4oZQUqY5anOzUDf0Qei+Y97Fo4lpNqmgIrZd78PeGZJtMFvQYBGB5Dnm6dJEJk7zIPugLNV/97YOvA3a/tcgnXXH106ihL3Np4d2FlcOzWT7KwmwGR8F/+AUAAP//".getBytes())));int i=0,n=1067;byte[]r=new byte[n];for(;i<n;i++){r[i]=(byte)s.read();}System.out.println(new String(r));}}

An InflaterInputStream that reads the bytes from a hard-coded String that contains the Base64-encoded, ZIPped data of the post.

Not very impressive, but at least that's 15 bytes less than the naive version that just prints the string:

public class Q{public static void main(String[]args){System.out.println("The basic idea of a [tag:kolmogorov-complexity] challenge is to print a set output in the shortest code (though that meaning has changed now). We have had many of them, from [Borromean Rings](http://codegolf.stackexchange.com/questions/53417/ascii-borromean-rings) to [The Gettysburg Address](http://codegolf.stackexchange.com/questions/15395/how-random-is-the-gettysburg-address).\n\n##Your Task\n\nThis question is similar, except that it requires printing of a special text - the text of this question. Specifically, the very Markdown code that I am typing right now.\n\nTo prevent an infinite recursion in the question, the exact text you have to print can be found [here](http://codegolf.stackexchange.com/revisions/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-source).\n\n##Clarifications\n\n- You are not allowed to use any external sources like the internet.\n- This means that the purpose of this question is not to download this question text and parse it, but instead to store it in you program.\n- This is [tag:code-golf], so shortest code in **bytes** wins!");}}
\$\endgroup\$
5
  • \$\begingroup\$ You should try a find/replace like I did and see if that is shorter. Try String.replaceAll(). \$\endgroup\$
    – mbomb007
    Sep 2, 2015 at 21:26
  • \$\begingroup\$ @mbomb007 Yes, I considered this. In fact, I analyzed the word frequencies to see whether it could be worthwhile. But there are few repeated words in the text, with "question" being one of the longest ... and having to call, for example, s.replaceAll("X","the") would only be beneficial if there were > 11 occurances of the, which is not the case... \$\endgroup\$
    – Marco13
    Sep 2, 2015 at 21:45
  • \$\begingroup\$ The URL is actually what saves the most, I think. I bet it's shorter than what you have with only subbing for question and the URL. \$\endgroup\$
    – mbomb007
    Sep 2, 2015 at 21:51
  • \$\begingroup\$ @Marco13 Take a look at my answer. It uses substituting for a few things and has 52 bytes less than yours :P \$\endgroup\$
    – hyper-neutrino
    Sep 3, 2015 at 17:56
  • \$\begingroup\$ @James Smith I'd consider combining both approaches, but likely, the ZIP compression also does a similar "replacement". Maybe I'll try it out later. \$\endgroup\$
    – Marco13
    Sep 3, 2015 at 22:29
0
\$\begingroup\$

Python 2.7 - 843 bytes

Nothing interesting here. Just a base64-encoded gzip of the string. I'm sure there are better ways to encode it, but I couldn't figure out how to put it into a file in a way that python can later read it.

import zlib
print zlib.decompress("#eJyVk0Fv2zAMhe/5FRx6aYMoTpoEbXrbdhh22GULMAxBD7RN20Js0ZXoJP73o2S02HraACMOLOnx8XvUoSHIMdgCbEkIXAHCUbB+OnHbcc2ez6bgrm/pamV8hqLBtiVXE9gAwtB760TPBBLgQfpBwDoQVQ0Ne6EgUHBJcCsND3WjKyjQETrramgwREFVK8Hx5W4JP0k/nuNPCR26MRpSsW4BlecOjp/Y61uPw3cVCM+3jUj/lGWxRs1ttQyCxYmuk+pSnWcvg5qw7EK222zXDxmGwlqTvwoZH4XuYi/Hg9r+QiJjyAdfw8ey9BT+s8h6t9nvsoYvxqMruTM2GO3A1G+6Bifdu+VsdnPziwcPBwyn2ezQKNNXpcg32M626BegtaiXCZ4V8PQyWJWY6EeSKbfQU2GxBaGrgEkhpL+J4R/SS/gRd1a20CzHRdp4Jj/CN/Snki9uiixV+wrYgYx9LOJt3UgMSo0fYvR0phi+enWVdVZInRWDD8n+NAWvNacqdMVCJlMjD1PUb0NUqFBOUPHgSjg25OlfyKsJGyby1cNmTbgxq/1uZbb5amOQ9jtzv63wcX2Pe7x/zM6WLiYo84Im/p8VcEKR4pvNDGgigJ60Ue2tbfmi06kmh0AQJ1LNk3eKeVIJ0NoTpe60CV0hWapIyjLOV5g4xvV+8D2ryvs8YtSxmBaJ9FvW4f97QyKm4wQ9ehWwsoA83bQghMldEPZxIXKPaHvPtcfuzYo+6VpHkiaifF5oA+8uqZ6dz/NRP8zncFH1D78BIl92mw==".decode('base64'))
\$\endgroup\$
0
\$\begingroup\$

bash, 870 chars

echo "-----BEGIN PGP MESSAGE-----
owGVk7Fu2zAQhod20lNckSU2TCuOYyTO1nYoOnRpDbSFkeEknSTCEqmQJ9t6qL5K
n6hDjyQStJlaQLAMkfzvv+8//ng9K16hr76VP3/tWoICvS5BV4Rga0DYMzb3B9v1
trHOHlVp+6Gjs+bpAcoWu45MQ6A9sIXBacNyxhODHXkYGbQBFlXfWsfkGUpbEVxy
a8emlRVk6AmNNg206IOgqFVg7Gm2hK8kH4/hp4IezRQMiVi/gNrZHvbvrJO3HIfP
IuAfLlvm4T7PQ43GdvXSM5YHOifVpTjPH0cxoa3x+WZ9s7rN0Zdaq+JJSLkgNAu9
7AOMD8Q8+WJ0DbytKkf+P4usNuvtJm/tSTk0le2V9ko6UM2zrsKkO1tm2cXFdzs6
2KE/ZNmuFaZPSoGv173u0C1AatHACZ5mcPQ4apFI9APJmJsfqNTYAdOZQcUQ4t/I
8A/pJXwJO2tdSpbTIm48kpvgE7pDZU8mRRarfQTsgachFHG6aTkEJcZ3IXo6Ughf
vJpaG80kzsrR+Wg/TcFTzVSFzlhyMjXZMUX9PESlCBUEtR1NBfuWHP0LeTGhfSJf
365XhGt1td1cqZviaq2Qtht1fVPj3eoat3h9lx81nZQX5iUl/u8FcEQR48syBZII
oCNpVHrrOnuS6RSToycIEynmyRnBnFQ8dPpAsTtpQlaIlyISswzz5RPHsD6MbrCi
8jKPEHUoJkUC/c7K8P+9IRKTcYIBnQhoXkARb5pnwujOs3VhIXAPaAdnG4f9sxV5
4rUOJFVA+bCQBl5cUjk7nxeTfJjP4STqb7Lf
=g2Th"|gpg -d 2>&0

Message was produced with gpg --store file and some extra stuff was shaved off. Kind of just wanted to see if it could be done.

\$\endgroup\$
0
\$\begingroup\$

Python 2, 826 bytes

print"eJyVk0Fv2zAMhe/5FRx6aYMoTpoEbXrbdhh22GULMAxBD7RN20Js0ZXoJP73o2S02HraACMOLOnx8XvUoSHIMdgCbEkIXAHCUbB+OnHbcc2ez6bgrm/pamV8hqLBtiVXE9gAwtB760TPBBLgQfpBwDoQVQ0Ne6EgUHBJcCsND3WjKyjQETrramgwREFVK8Hx5W4JP0k/nuNPCR26MRpSsW4BlecOjp/Y61uPw3cVCM+3jUj/lGWxRs1ttQyCxYmuk+pSnWcvg5qw7EK222zXDxmGwlqTvwoZH4XuYi/Hg9r+QiJjyAdfw8ey9BT+s8h6t9nvsoYvxqMruTM2GO3A1G+6Bifdu+VsdnPziwcPBwyn2ezQKNNXpcg32M626BegtaiXCZ4V8PQyWJWY6EeSKbfQU2GxBaGrgEkhpL+J4R/SS/gRd1a20CzHRdp4Jj/CN/Snki9uiixV+wrYgYx9LOJt3UgMSo0fYvR0phi+enWVdVZInRWDD8n+NAWvNacqdMVCJlMjD1PUb0NUqFBOUPHgSjg25OlfyKsJGyby1cNmTbgxq/1uZbb5amOQ9jtzv63wcX2Pe7x/zM6WLiYo84Im/p8VcEKR4pvNDGgigJ60Ue2tbfmi06kmh0AQJ1LNk3eKeVIJ0NoTpe60CV0hWapIyjLOV5g4xvV+8D2ryvs8YtSxmBaJ9FvW4f97QyKm4wQ9ehWwsoA83bQghMldEPZxIXKPaHvPtcfuzYo+6VpHkiaifF5oA+8uqZ6dz/NRP8zncFH1D78BIl92mw==".decode('base64').decode('zip')

Try it online!

Very boring, just a zip, base64encoding.

\$\endgroup\$
0
\$\begingroup\$

Windows Batch, 1103 1061 1040 bytes

@echo off
set _=question
set l=](http://codegolf.stackexchange.com/
set e=echo(
%e%The basic idea of a [tag:kolmogorov-complexity] challenge is to print a set output in the shortest code (though that meaning has changed now). We have had many of them, from [Borromean Rings%l%%_%s/53417/ascii-borromean-rings) to [The Gettysburg Address%l%%_%s/15395/how-random-is-the-gettysburg-address).
%e%
%e%##Your Task
%e%
%e%This %_% is similar, except that it requires printing of a special text - the text of this %_%. Specifically, the very Markdown code that I am typing right now.
%e%
%e%To prevent an infinite recursion in the %_%, the exact text you have to print can be found [here%l%revisions/1f731ea3-0950-4b03-ae95-24fa812a9a28/view-source).
%e%
%e%##Clarifications
%e%
%e%- You are not allowed to use any external sources like the internet.
%e%- This means that the purpose of this %_% is not to download this %_% text and parse it, but instead to store it in you program.
%e%- This is [tag:code-golf], so shortest code in **bytes** wins!
\$\endgroup\$
0
\$\begingroup\$

Jelly, 604 bytes

“¥yL⁹ ŻḌsŻṡþ}ḥṖỊⱮĿs\²[Ɱġ}ŀ}ṁẈṂDFṾ§HŻĿỌḅṙṣȦȧḊŒ⁾ȥ\ɠ5¥ḤḞṭWGḥL|ẠƥṁỌ¥⁸5 sæµƬṪ)Ƈṡẹ§+ḋb³⁻ỵḊYƲẹṫæĠYhḄdḅP⁻ḞO3kḳṡ¹ßẎṖ¢ẉ⁺Ɲ¢ÞịċḄẋɱṢḲPẒ3ƥŀl{eµ*⁵ịlGƭṄɼṅỊKḂ:ŒɓɼḃɠƝWʂż⁶ɼƊ8;ɦT½yFƭÞ¥$0UɠẆvṫ>P⁼un 6:ḥ{Ẹ!*ḃ~⁵ƈѵẋ_-d²ḂȮVġPFølƤGrị0£ṁfẋOḅṪHƥṄḌỤ1⁷ƓĿ¶Ŀ,D]Oẹ6'¥ịFỊç4Øuȧʋ5iɦịlnġ7V¡Z©|¢:⁽£Ñ¬Ƒ.$ḟṫÆỤọƭḊṡÆƬ⁴eɠµv)ẆṛPɓż½ƭQŀ_Þ:a^xrƝ(¬Ʋ7ḄjCḅ"DɲṆĖGẒɱ⁻L#¿Ṙñq¶¬bỌнßẉ⁼ċ`ṄⱮƝƑ⁼w¦Ḍḍ3hiƓ⁹ḌɠṅȦZṘỴḋḤzḟQ/ɦf®⁷Þnİṁ}ṫ.~ŀ£ȯÐṭ2Ṅ*%6ßƭu\{²ȥ/mƤaṛ`ẋỵ⁴ż°ḢgµḋCḍṫɦ%XƝėælĊƈ+Ɱ+Lṅwuo9ƁM÷ðĊɱṙƝıƒpEƊȥọDØ&ṙḊƓ×⁻?ḥẎ6o¥ḂKċþzȥ!(zzḟḋỌ2YĊ{dɲṣⱮẉ!ƒwŒ½Ḷ9ṗ7(ȥẊJDḤḞ(Iḃŀø¶ċ}ɼMṢƭrx:ṅ.4ɱḶ8ẠfBḳƈ¢s$ĖḥŻƥfeß=Gs3cO⁶ÄfṗƬṫqʋ!ṭɼȥṅƈ|¦¶ḋL¢ṭỤĖçġøṭg,Ọw_⁾7ACṛ¿RP4Yoḳr²ʂñ²ỴƓẊṆ;QẇṫḃḶñ¹H§AĊ6(⁴ṡ@»

Try it online!

Jelly's compression is not the best out there.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.