As the title says, your task is to print the largest string using the shortest code without taking any input value.


  • The program must take no input and print the largest string to STDOUT

  • The string must contain only ASCII Characters. If you don't know the ASCII Characters, take a look at the table

  • No Loops are allowed

  • No multiplication, exponentiation or any kind of elevation is permitted.

  • The score is measured by subtracting the amount of bytes of your code to the amount of bytes of your string. Example. My code is 60 Bytes and it generates an string of 300 Bytes. My score will be 300-60=240

  • The highest score wins.



The output of my program is ReferenceError: a is not defined = 32 bytes

My Score will be 32-26 = 6


By Loops i mean any repetitive structure. For example for, while, do while, recursive functions etc..

  • 1
    \$\begingroup\$ Generating a 65535x65535 image and printing its content base64 encoded? Sounds allowed, but horribly boring. \$\endgroup\$
    – manatwork
    Mar 14, 2018 at 18:29
  • 2
    \$\begingroup\$ That's still not an objectively observable requirement. \$\endgroup\$
    – hyper-neutrino
    Mar 14, 2018 at 18:43
  • 6
    \$\begingroup\$ Might I suggest posting in the Sandbox to get feedback before posting challenges? This type of challenge is tough to specify, but it's possible it can be saved with some additional effort and requirements. \$\endgroup\$
    – Giuseppe
    Mar 14, 2018 at 18:50
  • 4
    \$\begingroup\$ The shell utility yes by definition has ∞ output, though is not explicitly a loop in the shell language. Allowed? \$\endgroup\$ Mar 14, 2018 at 18:52
  • 3
    \$\begingroup\$ If program P scores S, then you can construct a program that scores 2*S by repeating the source of P twice. \$\endgroup\$
    – recursive
    Mar 14, 2018 at 19:53

2 Answers 2


R, 541-9 = 532

When passing a built-in function name to R, the console describes it parameters. I'm sure there are longer ones, but I went for the low-hanging fruit




function (all.available = FALSE, lib.loc = NULL) 
if (is.null(lib.loc)) 
    lib.loc <- .libPaths()
if (all.available) {
    ans <- character()
    for (lib in lib.loc[file.exists(lib.loc)]) {
        a <- list.files(lib, all.files = FALSE, full.names = FALSE)
        pfile <- file.path(lib, a, "Meta", "package.rds")
        ans <- c(ans, a[file.exists(pfile)])
s <- search()
invisible(.rmpkg(s[substr(s, 1L, 8L) == "package:"]))
<bytecode: 0x103fdf200>
<environment: namespace:base>

Edit: Thanks Giuseppe for the link

  • \$\begingroup\$ @dzaima seems right \$\endgroup\$
    – hyper-neutrino
    Mar 14, 2018 at 18:43
  • \$\begingroup\$ You can add a link to Try it online so we can verify your results! And welcome to R golfing, by the way :) \$\endgroup\$
    – Giuseppe
    Mar 14, 2018 at 18:47

Python 3, 937


Try it online!

  • \$\begingroup\$ Wouldn't help() or import this have better code/output ratio? \$\endgroup\$
    – manatwork
    Mar 14, 2018 at 18:53
  • \$\begingroup\$ @manatwork oh yeah thanks \$\endgroup\$
    – hyper-neutrino
    Mar 14, 2018 at 19:18

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