Skip to main content
5 of 8
added 381 characters in body
Tobia
  • 5.7k
  • 24
  • 39

APL

Here's a lazy attempt:

{⍞←n}⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⍣n⊢n←↑⍴⎕AV

99 char or byte* program, prints a number with 3 × 25643 or 107507747624534602106757229467285 325349838983867263177675199476846262009816647725378282119677037141557248 digits.

Score is something like 2.56 × 1010750774762453460210675722946728532534983898386726317767519947 6846262009816647725378282119677037141557248 / 1003.

Explanation

  • ⎕AV is a predefined array with 256 characters (it's the legacy charset of APL)
  • n←↑⍴⎕AV defines n to be is its number of elements, or 256
  • {⍞←n} will print this number "256" without a newline
  • {⍞←n}⍣n will print it 256 times ( is the "power operator": it's neither *, /, nor ^, because it's not a math operation, it's a kind of loop)
  • {⍞←n}⍣n⍣n will repeat the previous operation 256 times, therefore printing it 256^2 times
  • {⍞←n}⍣n⍣n⍣n will print it 256^3 times
  • I could fit 43 ⍣n in there, so it prints 256^43 times the string "256".

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
*: For the purpose of scoring, a N char long APL program can be considered to be N bytes long, because traditionally—before Unicode—APL files were saved with a specific single-byte charset which would map all the special symbols in the upper 128 values. Most interpreters can still read and write files in this charset.

Tobia
  • 5.7k
  • 24
  • 39