-11
\$\begingroup\$

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

Rules

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

Example

try{a.b}catch(e){alert(e)}

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

My Score will be 32-26 = 6


Update

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

\$\endgroup\$

closed as unclear what you're asking by caird coinheringaahing, Mr. Xcoder, Giuseppe, FryAmTheEggman, Laikoni Mar 14 '18 at 18:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ Generating a 65535x65535 image and printing its content base64 encoded? Sounds allowed, but horribly boring. \$\endgroup\$ – manatwork Mar 14 '18 at 18:29
  • 2
    \$\begingroup\$ That's still not an objectively observable requirement. \$\endgroup\$ – HyperNeutrino Mar 14 '18 at 18:43
  • 5
    \$\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 '18 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\$ – Digital Trauma Mar 14 '18 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 '18 at 19:53
3
\$\begingroup\$

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

Code:

.packages

Output:

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)])
    }
    return(unique(ans))
}
s <- search()
invisible(.rmpkg(s[substr(s, 1L, 8L) == "package:"]))
}
<bytecode: 0x103fdf200>
<environment: namespace:base>

Edit: Thanks Giuseppe for the link

\$\endgroup\$
  • \$\begingroup\$ @dzaima seems right \$\endgroup\$ – HyperNeutrino Mar 14 '18 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 '18 at 18:47
1
\$\begingroup\$

Python 3, 937

help()

Try it online!

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

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