title: Write lines in detention

text:
# Question
Title: Write lines in detention
# Introduction

Bad news guys - you got detention. Your English teacher doesn't understand this site and wants you to *"stop doing math on your digital dohickeys, this is English class!"*

She sentenced you to write her favorite saying on the blackboard 25 times, which will give a total of 100 lines on the blackboard.

```
The eighteen-hundreds were a time for rum.
The nineteen-hundreds were a time for fun.
The two-thousands are a time to run
a civilized classroom.

```

Lucky for you, you are an avid reader (not to mention an expert code-golfer)! You have a read about a trick that might possibly get you off easy.

(Foxtrot by Bill Amend)

Unfortunately for Jason, it didn't work out. But you have a better idea! Since your English teacher thinks you're doing math, if you leave all the numbers out of your program it just might work! You also want to keep your program as short as possible because you are a lazy student and don't want to write a lot on the board.

## Write a program that complies with the following rules:

* Your program must print the 4 above lines 25 times. The lines must be outputted in that order, repeating. Total exactly 100 lines of output (a trailing newline at the very end or a leading newline at the very beginning is okay).
* You cannot use the characters `0123456789`. Your teacher gets confused by math and will call you out!
* You can use any imports and external libraries without counting the imports. Your English teacher doesn't know about programming. Jason could have saved a lot of work by not writing `#include <stdio.h>` and you don't want to make his same mistakes!
* Score your program by `byte` count. Lowest score wins!

# Answer
# CJam, ~~109~~ ~~107~~ ~~106~~ ~~104~~ 103 bytes

```
0000000: 22 0c 20 4f 18 41 e4 d8 a5 f3 95 cf 5e 2b cb 1c  ". O.A......^+..
0000010: 44 64 2f bf 28 23 e2 47 4e 4e 77 73 fc 43 09 a2  Dd/.(#.GNNws.C..
0000020: 09 0b fb 18 29 e8 e8 49 5d fc 00 da b8 70 b6 3e  ....)..I]....p.>
0000030: 0c 24 d7 5a 5b 28 1c 45 2e 90 63 86 04 5c 3e 95  .$.Z[(.E..c..\>.
0000040: 4b ae 66 22 48 48 2a 62 46 47 2b 62 22 54 0a 20  K.f"HH*bFG+b"T.
0000050: 2d 2e 22 27 7b 2c 57 25 7c 66 3d 7b 28 2f 29 2a  -."'{,W%|f={(/)*
0000060: 7d 5a 2a 43 44 2b 2a                             }Z*CD+*

```

The above is a reversible xxd dump.

### Testing

You can generate and execute the above code by running this in the online interpreter:

```
"bxyyeighxrum.yninexfun.ytwo-thousands abto run
a civilized classroom.y
The xteen-hundreds webfor bre a time ""T
 -."'{,W%|f#31bHH*b:c`'\2*/'\*"HH*bFG+b""T
 -."`"'{,W%|f={(/)*}Z*CD+*"]:+~

```

To see the generated code (without executing it), remove the final `~`.

To count the number of bytes (one character is one byte in ISO-8859-1), replace the final `~` with a `,`.

### Printable version (122 bytes)

```
"bxyyeighxrum.yninexfun.ytwo-thousands abto run
a civilized classroom.y
The xteen-hundreds webfor bre a time "{(/)*}Z*CD+*

```

After pushing the string (S), the following gets executed:

```
{    }Z*        " Repeat 3 times:     ";
 (              "     Q := S.shift()  ";
  /             "     T := S.split(Q) ";
   )            "     R := T.pop()    ";
    *           "     S := T.join(R)  ";
        CD+*    " S *= 12 + 13        ";

```

### Moar golfing

After pushing the unprintable string (U), the following gets executed:

```
HH*b                        " U := U.base(17 * 17) ";
    FG+b                    " U := U.base(15 + 16) ";
        "T\n -."            " P := 'T\n -.'        ";
                '{,W%|      " P |= 'zyx...\0'      ";
                      f=    " U[i] -> P[U[i]]      ";

```

This pushes the string of the printable version. The rest of the code works as before.
> 9 votes

# Answer
# JavaScript (ES6) 164

```
B='teen-hundreds were a time',alert(B.replace(/./g,
"The eigh"+B+" for rum.\nThe nine"+B+" for fun.\nThe two-thousands are a time to run\na civilized classroom.\n"))

```

**Test** In FireFox/FireBug console.
> 76 votes

# Answer
# Python : ~~188 173 160~~ 153

```
a="teen-hundreds were a time"
print"The eigh%s for rum.\nThe nine%s for fun.\nThe two-thousands are a time to run\na civilized classroom.\n"%(a,a)*len(a)

```

I don't python much, but this seems pretty short to me.

**Edit:** So I was wrong, it wasn't short at all! Thanks for the assistance in comments :D
> 34 votes

# Answer
## CJam, ~~151 140 135 132 130~~ 128 bytes (Tweetable)

```
"TeighYrum.TnineYfun.Ttwo-thousands are a time to run
a civilized classroom.""YT"["teen-hundreds were a time for ""
The "]erAF+*

```

Try it here

I am able to shorten this down to 110 bytes by converting this to unicode, but since that is not beating the other unicode solution, I would rather not put it :)
> 29 votes

# Answer
# PHP, 0 bytes

> You can use any imports and external libraries without counting the imports.

To run this code, you must import a library called `data://text/plain,<?php...classroom.\n";` with this:

```
<?php require_once 'data://text/plain,<?php
  for($i=ord("z");$i>ord("a");$i--)
    echo "The eighteen-hundreds were a time for rum.
The nineteen-hundreds were a time for fun.
The two-thousands are a time to run
a civilized classroom.
";'; ?>

```

And you must have `allow_url_include` enabled in your `php.ini`.

No more numbers or extensions, thanks to Dennis.
> 24 votes

# Answer
## Ruby, ~~185~~ ~~180~~ 176 bytes

EDIT: String interpolation, thanks @britishtea

It's my first golf ever, and I'm not much of a Rubist (but I certainly love Ruby). Anyway, this is it (shortened, Doorknob's suggestion).

```
t=' were a time for '
s="The eighteen-hundreds#{t}rum.
The nineteen-hundreds#{t}fun.
The two-thousands are a time to run
a civilized classroom."
s.split.size.next.times{puts s}

```
> 14 votes

# Answer
# Java ~~249~~ ~~231~~ ~~230~~ 222

My first answer! Why not start off using the language I know so well.

```
class c{public static void main(String[]g){for(int a='!';a++<':';out.println("The eighxrum.\nThe ninexfun.\nThe two-thousands are a time to run\na civilized classroom.".replaceAll("x","teen-hundreds were a time for ")));}}

```

Ungolfed

```
import static java.lang.System.*;
class c
{
    public static void main(String[]g)
    {
        for(int a='!';a++<':';out.println("The eighxrum.\nThe ninexfun.\nThe two-thousands are a time to run\na civilized classroom.".replaceAll("x","teen-hundreds were a time for ")));
    }
}

```
> 13 votes

# Answer
# **C** 171

```
a='a';b="teen-hundreds were a time for ";main(){for(;a++<'z';)printf("The eigh%srum.\nThe nine%sfun.\nThe two-thousands are a time to run\na civilized classroom.\n",b,b);}

```

At first, I tried the simplistic version (189 bytes), which was better than the other C solution...

```
main(a){for(a='a';a<'z';++a)printf("The eighteen-hundreds were a time for rum.\nThe nineteen-hundreds were a time for fun.\nThe two-thousands are a time to run\na civilized classroom.\n");}

```

which I later optimized a bit...
> 11 votes

# Answer
## JavaScript, ES6, ~~174 172~~ 154 bytes

Using @edc65's `replace` trick. Thanks!

```
alert((d="teen-hundreds were a time").replace(/./g,`The eigh${d} for rum.
The nine${d} for fun.
two-thousands are a time to run
a civilized classroom.
`))
```

Works only in latest Firefox (34 and above) due to use of template strings.
> 9 votes

# Answer
## BrainFuck (1,597 characters)

```
+++++++++++++++++++++++++[>->-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.+[->+++<]>++.++++.--.+.++++++++++++.+++[->+++<]>..+++++++++.[----->++<]>+.[->++++++++<]>.[--->+<]>---.-------.----------.++++++++++++++.-------------.-.--[--->+<]>---.+[---->+<]>+++.--[->++++<]>-.[->+++<]>.+++++++++++++.-------------.--[--->+<]>-.[->+++<]>+.-[->+++<]>.---[->++++<]>.-----------.++++.--------.--[--->+<]>-.++[->+++<]>.+++++++++.+++.[-->+++++<]>+++.---[----->++<]>.+++.--------.+[----->++<]>++.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.+[----->+<]>+.-----.+++++.---------.[--->+<]>---.+++[->+++<]>..+++++++++.[----->++<]>+.[->++++++++<]>.[--->+<]>---.-------.----------.++++++++++++++.-------------.-.--[--->+<]>---.+[---->+<]>+++.--[->++++<]>-.[->+++<]>.+++++++++++++.-------------.--[--->+<]>-.[->+++<]>+.-[->+++<]>.---[->++++<]>.-----------.++++.--------.--[--->+<]>-.++[->+++<]>.+++++++++.+++.[-->+++++<]>+++.++[->+++<]>.-[--->+<]>--.-------.[----->++<]>++.>++++++++++.>-[--->+<]>-.[---->+++++<]>-.---.--[--->+<]>-.---[->++++<]>.+++.--------.[->+++++<]>++.+[--->++<]>.------------.+++++++.++++++.--.++[->+++<]>++.+++++++++++++.----------.--[--->+<]>---.+[---->+<]>+++.[->+++<]>+.--[--->+<]>---.-------------.--[--->+<]>-.[->+++<]>+.-[->+++<]>.---[->++++<]>.-----------.++++.--------.--[--->+<]>-.---[->++++<]>.-----.[--->+<]>-----.---[----->++<]>.+++.-------.>++++++++++.--[--->++++<]>+.-[->+++<]>.+[->+++<]>.++++++.[->++++++<]>.[------>+<]>.+++.---.-[--->+<]>++.---[->+++<]>.-.-[--->+<]>-.+[->+++<]>.+++++++++.-----------.--[--->+<]>--..-.---..--.+[----->++<]>++.>++++++++++.[[-]<+]<-]

```

This can still be golfed further, if anyone is interested.

You can test this out and confirm that it gives the correct output while meeting all of the rules.
> 8 votes

# Answer
## Perl - 145

I'm happy to see so many answers! Here's a Perl solution.

```
$s="teen-hundreds were a time for";print"The eigh$s rum.
The nine$s fun.
The two-thousands are a time to run
a civilized classroom.
"for b..z

```
> 7 votes

# Answer
**Since she hates math so much, why not Mathematica (177)**

```
   a = "teen-hundreds were a time for "; Do["The eigh" <> a <> "rum.
   The nine" <> a <> "fun.
   The two-thousands are a time to run a civilized classroom." // Print, {StringLength@a}]

```
> 7 votes

# Answer
# Javascript ES6, 198 193 bytes

```
m=Math;alert("The eighteen-hundreds were a time for rum.\nThe nineteen-hundreds were a time for fun.\nThe two-thousands are a time to run\na civilized classroom.\n".repeat(~~(m.exp(m.PI)+m.E)))

```

Your teacher doesn't want any numbers, but since they are an english teacher, they've got no clue what `Math.floor(Math.exp(Math.PI)+Math.E)` means.

More readably:

```
alert("The eighteen-hundreds were a time for rum.\n\
 The nineteen-hundreds were a time for fun.\n\
 The two-thousands are a time to run\na civilized\n classroom.".repeat(Math.floor(Math.exp(Math.PI)+Math.E)))

```

Must be run in the latest firefox
> 6 votes

# Answer
**Javascript - ~~178 Bytes~~ 176 Bytes**

My first golf, thought I'd give it a shot with bit twiddling operators, didn't turn out quite as well as hoped, but oh well!

```
c="teen-hundreds were a time for "
b=!!c
alert(Array((b+b+b<<b+b)+b<<b).join("The eigh"+c+"rum.\nThe nine"+c+"fun.\nThe two-thousands are a time to run\na civilized classroom.\n"))

```

Since I'm already in detention, and obviously have troubles behaving myself... **Javascript - 71 Bytes**

This one will probably get me in deeper trouble, but, if I already landed myself in detention, AND I'm planning on cheating my detention, apparently I lack good judgement on how I should behave myself in class. Maybe if I can pull one over my on teacher, I can pull one over on all the other golfers out there.

```
b=+true;alert( Array((b+b+b<<b+b)+b<<b).join($('code')[+!b].innerHTML))

```

Quick! Chrome/IE 11/Firebug users, open your consoles RIGHT NOW and try it.

(Please don't hurt me too much, I thought it was funny)
> 6 votes

# Answer
## C# - ~~229~~ 216 Bytes

Free `using` FTW!

```
using c=System.Console;
class S{static void Main(){var a="teen-hundreds were a time";for(int b=a.Length,i=b-b;i++<b;)c.Write("The eigh"+a+" for rum.\nThe nine"+a+" for fun.\nThe two-thousands are a time to run\na civilized classroom.\n");}}

```

Alternative, same byte count (more `using`abuse, though)

```
using i=System.Int32;
using c=System.Console;
class S{static void Main(){var a="teen-hundreds were a time";for(int b=new i();b++<a.Length;)c.Write("The eigh"+a+" for rum.\nThe nine"+a+" for fun.\nThe two-thousands are a time to run\na civilized classroom.\n");}}

```
> 5 votes

# Answer
# Befunge-93, ~~268~~ ~~260~~ 256 (grid size: 72x6=432)

```
#v"K">:!#@_v>$"enin">,,,,::-" rof emit a erew sderdnuh neet">:#,_$::!!-#
, ,,,"The "<|\!\%-"\^"::%-" #":-!!:
   -"#-"-::$_ "hgie"^v1"two-thousands are a time to run"
$_$  "nuf"v"rum"
v1-"##",,,<      >:#,_"moorssalc dezilivic a"1
_# < ^,,\-"AK."$_,#!:

```

This is my first time golfing, so I figured I'd try a language that hadn't already been done for this problem, since I wouldn't be adding anything otherwise. Since it's Befunge-93 compatible (fits inside an 80x25 grid and uses only Befunge-93 instructions), it should work in Befunge-98 too. Just in case, I also avoided having the pointer pass over any non-instruction characters other than space. I couldn't remember whether the specification actually defined those characters as no-ops, and I'll be having no nasal demons in MY code.

You can't really ungolf Befunge code. The key thing to note here is that Befunge pushes characters to the stack as their ASCII values, making it relatively simple to refer to numbers without literally referring to them. The `"K"` in the top left is 75, referring to the number of repetitions times the number of "the" clauses per repetition; I use modulus and some other craftiness on (copies of) this number to determine which path to take through the printing on each go-around. `::-` is a nice idiom for zero, useful for zero-terminating strings; I use it twice here.

On occasion the pointer needs to pass through a place where I'm defining a string, hence the specific choices of characters used to get certain numbers at some points.

The nice thing about a lot of Befunge interpreters is that you can watch the pointer dart around the grid, as well as see what values are in the stack. That way you can step through and see how the program works yourself, more or less! I'd recommend using http://befungius.aurlien.net/ if you don't have your own preferred Befunge interpreter.

This can probably be pared down a bit (or a lot) more. Please give me feedback! If I need to provide a better explanation, someone let me know; I'm new to this.

*Edit* \- shaved off a few bytes by getting rid of the unnecessary redirect to the last row when the program terminates (just putting the `@` where the `^` used to be).

*Another edit* \- shaved off some more bytes in various places, mostly with trickery. (Also added the grid size, as seems to be the trend with Befunge answers.)
> 5 votes

# Answer
## Pyth 135 ~~136 140~~

```
*ltG%"The eigh%srum%snine%sfun%stwo-thousands are a time to run\na civilized classroom.\n"*hhZ("teen-hundreds were a time for "".\nThe

```

Note the trailing space.

Uses pretty much the same trick as @Geobits and his commenter friends in the Python answer to construct the string. Now also uses some of this answer.

This uses the built-in variable `G`, which contains `abcdefghijklmnopqrstuvwxyz` and gets one less than its length to produce the 25 outputs.
> 4 votes

# Answer
# Ruby - ~~152~~ 141

```
puts"The eight#{e="een-hundreds were a time for "}rum.
The ninet#{e}fun.
The two-thousands are a time to run
a civilized classroom.
"*(?X-??)

```

http://repl.it/2Om/6
> 4 votes

# Answer
# LiveScript - 181

```
p=(a,b)->"The #{a}teen-hundreds were a time for #b.\n"
each console.log,map (->(p \eigh \rum)+(p \nine \fun)+'The two-thousands are a time to run\na civilized classroom.'),[\A to\Y]

```

Required imports:

```
{each, map} = require 'prelude-ls'

```

If you want to run it under Node.js, install the `LiveScript` (**not** `livescript`) and `prelude-ls` packages from npm, replace `alert` with `console.log` and run `lsc prog.ls`, where `prog.ls` contains the program.
> 3 votes

# Answer
# PHP (~~175~~ ~~157~~ 156 bytes; 152 with unix EOF):

Not the most golfed solution, but surely does the job and is smaller than some attempts.

Here is the code:

```
$a=a;$f='re a time';$r="teen-hundreds we$f for";while($a++<z)echo"The eigh$r rum.
The nine$r fun.
The two-thousands a$f to run
a civilized classroom.
";

```

---

Old version:

```
$a=a;while($a++!=z)echo"The eighteen-hundreds were a time for rum.
The nineteen-hundreds were a time for fun.
The two-thousands are a time to run
a civilized classroom.
";

```

---

This works because php cycles the chars, and we just check if it isn't `z` and stop.

(One curiosity is that when php reaches `z`, it then goes to `aa`.)
> 3 votes

# Answer
# Python 2 - 155

***Note:*** since control characters don't show on SE, I've replaced it with `\x19`.

```
a,b='\nThe ','teen-hundreds were a time for '
print(a+'eigh'+b+'rum.'+a+'nine'+b+'fun.'+a+'two-thousands are a time to run\na civilized classroom.')*ord('\x19')

```

Base 64 version:

```
YSxiPScKVGhlICcsJ3RlZW4taHVuZHJlZHMgd2VyZSBhIHRpbWUgZm9yICcKcHJpbnQoYSsnZWln
aCcrYisncnVtLicrYSsnbmluZScrYisnZnVuLicrYSsndHdvLXRob3VzYW5kcyBhcmUgYSB0aW1l
IHRvIHJ1bgphIGNpdmlsaXplZCBjbGFzc3Jvb20uJykqb3JkKCcZJyk=

```
> 3 votes

# Answer
# Python, 165 bytes

```
h="hundreds were a time for "
t="The "
for i in h:print t+"eighteen-"+h+"rum.\n"+t+"nineteen-"+h+"fun.\n"+t+"two-thousands are a time to run\na civilized classroom."

```

It worked out really nicely that the length of h is 25, that was not intentional. =)
> 3 votes

# Answer
## Python 2 - 143

A silly answer:

```
from this import i
a="teen-hundreds were a time for ",".\nThe "
print"The eigh%srum%snine%sfun%stwo-thousands are a time to run\na civilized classroom.\n"%(a+a)*i

```

Note that the full count is 162. I left out all of `from this import i`.

Uses similar replacements to my pyth strategy, but I couldn't resist posting this after discovering the hilariousness of importing from this :)
> 3 votes

# Answer
# 05AB1E, 91 bytes

```
AgG“TheŸ¯een-““«Ã€à€…€º€‡ “©“ê¶m.“««“The¥Šteen-“®„ˆ¦.««“The‚•-““šä€™€…€º€„‡Ð“«“a–Ìized¬¸.“»

```

Try it online!
> 3 votes

# Answer
# C, 215 203 199 bytes

```
main(a){a<<='\xC'+'\xD';while(a>>=!!a)printf("The eighteen-hundreds were a time for rum.\nThe nineteen-hundreds were a time for fun.\nThe two-thousands are a time to run\na civilized classroom.\n");}

```

Ungolfed

```
main(a)
{
  a<<='\xC'+'\xD';
  while(a>>=!!a)
    printf("The eighteen-hundreds were a time for rum.\nThe nineteen-hundreds were a time for fun.\nThe two-thousands are a time to run\na civilized classroom.\n");
}

```

I used bit shifting to iterate without any number.

`a<<='\xC'+'\xD'` sets a to 0b1\[25 zeros\]

`a>>=!!a` shifts right one bit for each time we iterate the loop

**Edit :** `a` equals argc, so its value is already 1 when the program is run with no arguments. Changed `a>>='\xB'-'\xA'` to `a>>=!!'\xA'` which is 4 bytes shorter. Also the text was displayed only 24 times. Fixed it. Removed extra brackets in the `while`.

**Edit 2:** changed `!!'\xA'` to `!!a`. Seems to work and saves 4 bytes
> 2 votes

# Answer
# Ruby, 145

```
?K.upto(?c){puts"The eigh#{x="teen-hundreds we#{t="re a time "}for "}rum.
The nine#{x}fun.
The two-thousands a#{t}to run
a civilized classroom."}

```

# Explanation

* Use `String#upto` to print the lines 25 times. The range `"K".."c"` is 25 characters.
* Use basic String interpolation to shorten the lines.
> 2 votes

# Answer
## T-SQL: 206

Makes use of a cross join on five rows to generate 25 rows selecting the phrase. The line breaks are important for the output.

```
with c as(SELECT\ N FROM(VALUES(\),($),($),($),($))A(B))SELECT REPLACE('The eigh$rum.
The nine$fun.
The two-thousands are a time to run
a civilized classroom.','$','teen-hundreds were a time for ')FROM c a,c b

```
> 2 votes

# Answer
# Bash, 151 bytes

Pretty much a straight port of your own answer

```
t="teen-hundreds were a time for"
for i in {a..y};{
echo "The eigh$t rum.
The nine$t fun.
The two-thousands are a time to run
a civilized classroom."
}

```
> 2 votes

# Answer
**Perl - 152 146 bytes**

```
$_="-hundreds were a time for";say"The eighteen$_ rum.\nThe nineteen$_ fun.\nThe two-thousands are a time to run\na civilized classroom.\n"x y///c

```

This makes use of perl's string repetition operator and exploits a substring of length 25.

Ungolfed version:

```
$_ = "-hundreds were a time for";
say "The eighteen$_ rum.\nThe nineteen$_ fun.\nThe two-thousands are a time to run\na civilized classroom.\n"x y///c

```
> 2 votes

# Answer
## C, 196 chars

This isn't an easy task for good ol' C. Factoring out the "The %steen-hundreds ..." pattern saves me a whole *two* characters.

Whitespace for clarity, include not counted.

```
#include <stdio.h>
main(){
  for (char*p="The %steen-hundreds were a time for %s.\n",
           *s="The two-thousands are a time to run\na civilized classroom.",
           *q=p;
       *q++ - 'a';
       puts(s))
   printf(p,"eigh","rum"), printf(p,"nine","fun");
}

```
> 2 votes

# Answer
## Golfscript - 139 134

```
'TeighYrum.TnineYfun.Ttwo-thousands aRto run
a civilized classroom.''#
'{-}**'Y'/'teen-hundreds weRfor '*'T'/'
The '*'R'/'re a time '*

```

Teacher: *Joshy* `*` *, are you hashtagging in class again? Two weeks detention! #howdoesthatfeel*

`*` name preserved to protect idensity

EDIT: Found shorter code.
> 2 votes

# Answer
## Racket 173

```
(let([x"teen-hundreds were a time for "])(for([z(+ #xa #xf)])(displayln(~a"The eigh"x"rum.\nThe nine"x"fun.\nThe two-thousands are a time to run\na civilized classroom."))))

```

Ungolfed:

```
(let ([x "teen-hundreds were a time for "])
  (for([z(+ #xa #xf)])
    (displayln (~a "The eigh"x"rum.\nThe nine"x"fun.\nThe two-thousands are a
     time to run\na civilized classroom."))))

```
> 2 votes

# Answer
# PHP - 157

```
$f='re a time';$r="teen-hundreds we$f for";echo str_repeat("The eigh$r rum.\nThe nine$r fun.\nThe two-thousands a$f to run\na civilized classroom.\n",aa^SU);

```
> 2 votes

# Answer
# GML (Game Maker Language), 169

```
a="teen-hundreds were a time for "b="The eigh"+a+"rum#The nine"+a+'fun#The two-thousands are a time to run#a civilized classroom#"c=b+b+b+b+b;d=c+c+c+c+c;show_message(d)

```
> 2 votes

# Answer
# Common Lisp (165 bytes)

```
(format t"~v{~{The ~(~A~)~#[~;-thousands are~:;teen-hundreds were~] a time ~A
~}~:*~}"(+ #xA #xF)'((eigh"for rum."nine"for fun."two"to run
a civilized classroom.")))

```

# Explanations

* 25 equals to 10 + 15, which is equivalent to A + F in base 16. Hence `(+ #xA #xF)`.
* 25 is passed to the `~v{ ... ~}` constructs, which iterates over arguments at most `v` times, where `v` is given as an argument of `format`
* `~:*` rewinds current argument to the previous element in the argument list; inside the `~{...~}` constructs, that practically means *infinite loop*. However, this infinite loop is bounded by `~v`, ie. 25.
* `~#[<zero>~;<one>~;:<else>~]` is a switch, based on the value of the remaining number of arguments in the list (due to the `#` modifier).
* `~(...~)` downcases the contained text

Note: I could have used fewer characters by using `~R` on 18, 19 and 2 (and using a litteral 25) but this is forbidden.
> 2 votes

# Answer
# Rant, 191 bytes

Not the shortest solution, but still cool. I wrote a subroutine to write the first three lines, and designed it so calling it with an empty argument returned a string 25 characters long. I then pass its length to the repeater.

```
[pin:][$[_:a]:The [arg:a][sync:;ordered]{thousands a|teen-hundreds we}re a time ][r:[len:[$_:]]]{[step:][$_:eigh]for rum.\N[$_:nine]for fun.\N[step:][$_:two-]to run\Na civilized classroom.\N}

```

Ungolfed:

```
[pin:]
[$[_:a]:The [arg:a][sync:;ordered]{thousands a|teen-hundreds we}re a time ]
[r:[len:[$_:]]]
{
    [step:]
    [$_:eigh]for rum.\N
    [$_:nine]for fun.\N
    [step:]
    [$_:two-]to run\N
    a civilized classroom.\N
}

```

Try it online
> 2 votes

# Answer
**LATEX ~~239~~ 226**

The byte count does not include the `\documentclass` command nor any `\usepackage` commands. I would argue both count as using external packages, as the former includes definitions in an external .cls file, and usepackage is practically synonymous with an include statement. Output is a pdf file containing the 100 lines with no other text, formatted appropriately. Try it at writelatex.com!

```
\begin{document}\newcounter=\def\_{re a time }\def\-{een-hundreds we\_}\StrLen\-[\b]\forloop=\parindent{\value=<\b}{The eight\-for rum.\\The ninet\-for fun.\\The two-thousands a\_to run\\a civilized classroom.\\}\end{document}

```

Ungolfed:

```
\documentclass{letter}

\usepackage{forloop}
\usepackage{parskip}
\usepackage{xstring}
\usepackage{nopageno}

\begin{document}

\newcounter=

\def\_{re a time }
\def\-{een-hundreds we\_}

\StrLen\-[\b]

\forloop=\parindent{\value=<\b}{

    The eight\-for rum.\\
    The ninet\-for fun.\\
    The two-thousands a\_to run\\
    a civilized classroom.\\

}

\end{document}

```

**Edit:** New and improved. Also made link go to read-only version of code. Thank you Dennis!
> 2 votes

# Answer
## Perl, ~~140~~ 139

improving on chilemagic answer. feature say for 3 bytes, text redundancy for 3 bytes.

```
$r="re a time";$s="teen-hundreds we$r for";say"The eigh$s rum.
The nine$s fun.
The two-thousands a$r to run
a civilized classroom."for b..z

```
> 2 votes

# Answer
# TeX - 169

```
\def\s{teen-hundreds were a time for }\def\p{The eigh\s rum.

nine\s fun.

The two-thousands are a time to run

a civilized classroom.

}\def\m{\p\p\p\p\p}\m\m\m\m\m\bye

```

Note that the blank lines are intentional and actually required for the output to be properly formatted.
> 2 votes

# Answer
# EXCEL, 168 Bytes

Decided to add this for fun. Instead of using the length() I decided to use character codes... If SUBSTITUTE wasn't such a long command, I could have joined in on the string compression too. I am drooling over C# which can use: 'Z'%'A'

Similar to the other Excel, but not using any row / column references.

Decided to add this for fun. Instead of using the length() I decided to use character codes... If SUBSTITUTE wasn't such a long function I could have joined in on the string compression too.

Similar to the other Excel, but not using any row / column references.

```
=REPT("The eighteen-hundreds were a time for rum.
The nineteen-hundreds were a time for fun.
The two-thousands are a time to
run a civilized classroom. ",ARABIC("XXV"))

```
> 2 votes

# Answer
# Brainfuck, 659 bytes

```
++++++++++++[->>++>+++++++>++++++++>+++>++++++++>+++++++++>+++++++++>+++++++++>++++>+[<]<]>>+>>+>---->++++>+>>--->-->--[<]>[->.>>>++++.---.<.>.>>>.--.+.<<+++++++.<..>>++.>>-.<.<<+.>.<<-.>---.<+.-.>+.<<.>>++++.<+.>-----.<.<.<.>.>>++.>>+.<-.<<.<.>+.>>++.<--.<<.>>.+++.>--.>>+.>.<<<<<<<<.>>>++.---.<.>>>+.>.<.<<.>-.<..>>.>>-.<-.<<+.>.<<-.>---.<+.-.>+.<<.>>++++.<+.>-----.<.<.<.>.>>++.>>+.<-.<<.<.>+.>>++.<--.<<.>.>+++.>-.>>+.>.<<<<<<<<.>>>++.---.<.>>-.+++.>+.>>-.<<<---.>>-.<.<+.--.<<<.>>>>-.<<-.>.<<.<.>>>-.<+.<.<.>.>>++.>>+.<-.<<.<.>>.>++.<<<.>>--.+++.>-.>>>.<<<<<<<.>.<++.>>>>>.<<+.>>.<--.>.<<++++.<.-.<.<.>>>>.<<---.>-------..-.---..--.>>>+.>.<<<<<+++<<--<<]

```

Try it online!

I found this using my own mediocre Brainfuck cruncher.
> 2 votes

# Answer
# Vyxal, 95 bytes

```
`λƛ e⋏ṫ⟑⌈-←¾ λ□ a λṙ λ⟑ ≥⁋.
λƛ ∵‹⟑⌈-←¾ λ□ a λṙ λ⟑ ×ė.
λƛ ƛ»-ʁḢ λ½ a λṙ to ÷Ḣ
a ↔Ŀized τ⟇.
`₁½½*

```

Try it Online!

```
`...`     # Dictionary compressed string
     ₁½½  # 100 / 2 / 2 = 25
        * # That many times

```
> 2 votes

# Answer
# Java 247 229 225

Not counting package and import statements

```
class A{public static void main(String[] a){String s="teen-hundreds were a time for "; for(int i='a';i++<'z';)out.print("The eigh"+s+"rum.\nThe nine"+s+"fun.\nThe two-thousands are a time to run\na civilized classroom.\n");}}

```

Ungolfed

```
    package a;
    import static java.lang.System.*;
    class A{
        public static void main(String[] a){
            String s="teen-hundreds were a time for ";
            for(int i='a';i++<'z';)
            out.print("The eigh"+s+"rum.\nThe nine"+s+"fun.\nThe two-thousands are a time to run\na civilized classroom.\n");
        }
    }

```
> 1 votes

# Answer
# C# (193)(189)

(Executable in LINQPad)

Golfed:

```
void Main(){for(int i='!';i++<':';)"The eighteen-hundreds were a time for rum.\nThe nineteen-hundreds were a time for fun.\nThe two-thousands are a time to run\na civilized classroom.".Dump();}

```

Ungolfed:

```
void Main()
{
    for(int i='!';i++<':';)
        "The eighteen-hundreds were a time for rum.\nThe nineteen-hundreds were a time for fun.\nThe two-thousands are a time to run\na civilized classroom.".Dump();
}

```

**After update:**

```
void Main(){var x="teen-hundreds were a time for ";for(int i='!';i++<':';)"The eigh_rum.\nThe nine_fun.\nThe two-thousands are a time to run\na civilized classroom.".Replace("_",x).Dump();}

```

Ungolfed:

```
void Main()
{
    var x="teen-hundreds were a time for ";

    for(int i='!';i++<':';)
        "The eigh_rum.\nThe nine_fun.\nThe two-thousands are a time to run\na civilized classroom.".Replace("_",x).Dump();}

```
> 1 votes

# Answer
# Haskell (~~210~~ 192 chars)

My code is fairly simple:

```
import Data.Char
i x y="The "++x++"teen-hundreds were a time for "++y++".\n"
main=putStr.unlines.replicate(ord '\EM')$(i"eigh""rum"++i"nine""fun"++"The two-thousands are a time to run\na civilized classroom.")

```

Joins a 25x replicated list of the desired string and prints it. (\EM is ASCII 25)

### Edit

Updated score to omit import and trailing newline from count.
> 1 votes

# Answer
**MATLAB ~~175~~ 193**

R2014a

Fun with fprintf. I hope I didn't miscount, first timer here.

```
a = 'a time ';b = 'teen-hundreds were %sfor';for i = length([]):length(b);fprintf(['The eigh',b,' rum.\nThe nine',b,' fun.\nThe two-thousands are %sto run\na civilized classroom.\n'],a,a,a);end

```

Ungolfed

```
a = 'a time ';
b = 'teen-hundreds were %sfor';
for i = length([]):length(b);
    fprintf(
        [
            'The eigh',
            b,
            ' rum.\nThe nine',
            b,
            ' fun.\nThe two-thousands are %sto run\na civilized classroom.\n'
        ],
        a,
        a,
        a
    );
end

```

Note that fprintf prints to MATLAB's console by default, unless a valid file identifier is supplied as the first argument. ~~The character sequence %1$s instructs fprintf to print the first argument after the format string as a string. In this case, the variable b needs to be 25 characters long, so using %s instead of %1$s actually costs a couple more characters overall, once all strings have been manipulated.~~

Edit: fixed to conform to rules. Lesson learned: don't post early morning.
> 1 votes

# Answer
# Delphi (229 227 224/238)

Not great but still fun.
Repeats for each char in set \['B'..'Z'\].

This is a procedure so use clauses aren't included. You will need the unit `IdGlobal` for this to work. Including the unit it will be 238.

```
procedure W;var C:Char;begin for C in['B'..'Z']do writeln(StringsReplace('%eigh^+for rum.*%nine^+for fun.*%two-thousands are+to run*a civilized classroom.',['%','^','*','+'],['The ','teen-hundreds were',^J,' a time ']));end;

```

### Ungolfed

```
procedure W;
var C:Char;
begin
  for C in['B'..'Z']do
    writeln(StringsReplace('%eigh^+for rum.*%nine^+for fun.*%two-thousands are+to run*a civilized classroom.',['%','^','*','+'],['The ','teen-hundreds were',^J,' a time ']));
end;

```

### Replace broken up

```
StringsReplace(
'%eigh^+for rum.*%nine^+for fun.*%two-thousands are+to run*a civilized classroom.', //source string
['%','^','*','+'], //Patterns to replace
['The ','teen-hundreds were',^J,' a time '])//Replace pattern with.

```
> 1 votes

# Answer
**Java: 252 bytes**

```
class M{public static void main(String a[]){String t="teen-hundreds were a";for(int i='!'-'!';i<'z'-'a';i++){System.out.println("The eigh"+t+" time for rum.\nThe nine"+t+" time for fun.\nThe two-thousands are a time to run\na civilized classroom.");}}}

```

ungolfed:

```
    class M {
    public static void main(String a[]) {
        String t = "teen-hundreds were a";
        for (int i = '!' - '!'; i < 'z' - 'a'; i++) {
            System.out
                    .println("The eigh"
                            + t
                            + " time for rum.\nThe nine"
                            + t
                            + " time for fun.\nThe two-thousands are a time to run\na civilized classroom.");
        }
    }
}

```
> 1 votes

# Answer
# Rebol - 162 160

```
b: a:"teen-hundreds were a time"forall b[print reword{The eigh$X for rum.
The nine$X for fun.
The two-thousands are a time to run
a civilized classroom.}[X a]]

```
> 1 votes

# Answer
# Shell, 161

```
sed 's/x/xxxxx/g;s/x/The eigh#rum.\nThe nine#fun.\nThe two-thousands are a time to run\na civilized classroom.\n/g;s/#/teen-hundreds were a time for /g'<<<xxxxx

```
> 1 votes

# Answer
# Haskell - 183

```
a#b="The "++a++"teen-hundreds were a time for "++b++".";
main=forM_['A'..'Y'](\_->forM["eigh"#"rum","nine"#"fun","The two-thousands are a time to run\na civilized classroom"]putStrLn)

```

Required imports:

```
import Control.Monad
import Data.Char
import Data.List

```
> 1 votes

# Answer
# Groovy - 149

**Golfed:**

```
x="teen-hundreds were a time";print"""The eigh$x for rum.
The nine$x for fun.
The two-thousands are a time to run
a civilized classroom.
"""*x.size()

```
> 1 votes

# Answer
# Cobra - 194

```
class P
    def main
        print ('[n="\nThe "]eigh'+(p='teen-hundereds we[m="re a time "]for ')+'rum.[n]nine[p]fun.[n]two-thousands a[m]to run\na civilized classroom.\n').repeat(c'S'to int-c':'to int)

```
> 1 votes

# Answer
# PowerShell

### Count = ~~203~~ 199

```
$c,$d,$e,$f,$g,$h,$i,$j=("The,eigh, for ,rum.,nine,fun., to run, a time"-split",");$a="teen-hundreds were$j";[char[]]$a|%{"$c $d$a$e$f`n$c $g$a$e$h`n$c two-thousands are$j$i`na civilized classroom."}

```

### Explanation

```
# Chop up this string of repeated words/phrases
$c,$d,$e,$f,$g,$h,$i,$j=("The,eigh, for ,rum.,nine,fun., to run, a time"-split",");

# Steal everyone else's idea to get 25 chars exactly
$a="teen-hundreds were$j";

# Cast to char array and pipe into foreach
[char[]]$a|%{...}

# Spell everything out
"$c $d$a$e$f`n$c $g$a$e$h`n$c two-thousands are$j$i`na civilized classroom."

```
> 1 votes

# Answer
## Groovy : 167 chars

Inspired by jmm's answer.

```
a="teen-hundreds were a time for"
b="two-thousands are a time "
s="The eigh$a rum.\nThe nine$a fun.\nThe ${b}to run\na civilized classroom."
b.size().times{println s}

```
> 1 votes

# Answer
# Scala - 159

```
val(f,h)=('z'-'a',"teen-hundreds were a time for")
print(s"""The eigh$h rum.
The nine$h fun.
The two-thousands are a time to run
a civilized classroom.
"""*f)

```
> 1 votes

# Answer
**C99: 211**

Doubt I'll be winning any prizes any time soon:

```
main(){char*s="The %steen-hundreds were %s for %s.\n",*t="a time",c='A';for(;c<'Z';++c){printf(s,"eigh",t,"rum");printf(s,"nine",t,"fun");printf("The two-thousands are %s to run\na civilized classroom.\n", t);}}

```
> 1 votes

# Answer
Ruby, 198 bytes

```
a='teen-hundreds were a time'
b='The eigh'
c='The nine'
d=' for'
e=' rum'
f=' fun'
a.length.times{puts b+a+d+e+"\n"+c+a+d+f+"\n The two-thousands were a time to run a \n civilized classroom"}

```
> 1 votes

# Answer
# T-SQL - 177

Using the string from the other T-SQL answer here.

```
PRINT(REPLICATE(REPLACE('The eigh$rum.
The nine$fun.
The two-thousands are a time to run
a civilized classroom.','$','teen-hundreds were a time for '),ASCII('K')/LEN('AAA')))

```

Okay, this should properly follow the rules this time, silly me. I had almost completely forgotten about the super convenient `REPLICATE` function. `ASCII('K')` gives us 75, dividing that by `LEN('AAA')` which is 3 gives us the 25 we need. I could've used the character with the ASCII value 25, but having a control character seems like a bit of a cop out to me.
> 1 votes

# Answer
# Forth (gforth), 174 bytes

```
: x ." teen-hundreds were a time for ";
: f bl true cell+ do ." The eigh"x .\" rum.\nThe nine"x .\" fun.\nThe two-thousands are a time to run\na civilized classroom.\n"loop ;

```

Try it online!

### Code Explanation

```
: x                                      \ start a new word definition
  ." teen-hundreds were a time for "     \ outputs "teen-hundreds were a time for "
;                                        \ end word definition

: f                                      \ start a new word definition
  bl                                     \ ascii value of space (32)
  true cell+                             \ true (-1) + size of cell (8 in 64-bit) = 7
  do                                     \ counted loop from 7 to 31 (total of 25)
    ." The eigh"x                        \ output "The eigh" and call x
    .\" rum.\nThe nine"x                 \ output "rum\nThe nine" and call x
    .\" fun.\nThe two-thousands are a time to run\na civilized classroom.\n" \ output the rest
  loop                                   \ end loop
;                                        \ end word definition

```
> 1 votes

# Answer
# Perl 6, 147 bytes

```
my $t="teen-hundreds were a time for";say "The eigh$t rum.
The nine$t fun.
The two-thousands are a time to run
a civilized classroom." for 'a'..'y'

```

Try it online!
> 1 votes

# Answer
# EXCEL , ~~160~~ 164 bytes

asked Teacher if I could use Excel, Teacher said Yes.

asked Teacher if I could click around, Teacher said Yes.

So click Wrap Text, merge `A-TwentyFive` to `A-OneHundredTwentyFive` and Paste this in Cell `A-TwentyFive`

```
=REPT("The eighteen-hundreds were a time for rum.
The nineteen-hundreds were a time for fun.
The two-thousands are a time to run
a civilized classroom.
",ROW())

```
> 1 votes

# Answer
# Zsh, 136 bytes

```
repeat \##� <<.
The eigh${A=teen-hundreds we${B=re a time} for} rum.
The nine$A fun.
The two-thousands a$B to run
a civilized classroom.

```

Attempt This Online!

The  represents ASCII 0x19 = 25.
> 0 votes

---
Tags: code-golf, kolmogorov-complexity, restricted-source
---


# Question
Title: Print all ASCII alphanumeric characters without using them
## Challenge

Print the following characters:

```
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890

```

The catch is that you may not use any one of them in your code.

You may print them in arbitrary order, with or without a leading or trailing newline, but you may not print any other characters.

## Rules

* You may not use any characters from the set mentioned above
* You may use any other characters
* No cheating
* Standard loopholes banned
* This is , shortest answer wins.

## Clarifications

* If your language uses a different charset, you may not use codepoints in that charset that correspond to alphanumeric characters.
* Returning a string from a function is considered a valid form of output.
* You may return a char array.

# Answer
# , ~~8~~ 7 bytes

*1 byte saved thanks to @DJMcMayhem by putting it all in one regex statement*

```
¬/{Ó×ü_

```

Try it online!

Outputs:

```
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

```

Note: `×` is **not** `x` or `X`, it is `0xd7`

Hexdump:

```
00000000: ac2f 7bd3 d7fc 5f                        ./{..._

```

### Explanation

```
¬/{            " inserts every character in the range / to {

```

Now the output looks like:

```
/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{

```

We have to remove all the non-alphanumeric characters and the `_` (since it is not included in `\W`), so let's do that using regex

```
Ó×ü_           " removes every character that is non-alphanumeric or an underscore _
               " vim equivalent of :s/\W\|_//g

```
> 21 votes

# Answer
# Octave, ~~52 46~~ 40 bytes

```
['['-('"':'+'),'{'-(_='!':':'),_+'@','']

```

This evaluates to

```
9876543210ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz

```

### Explanation

Here we are using the fact that characters are implicitly converted to integers when arithmetic operations like `+-` or the range function `:` are applied. When concatenated with an empty string (`[...,'']`), the numbers again are converted to characters.

Try it online!
> 52 votes

# Answer
# brainfuck, ~~77~~ ~~76~~ ~~75~~ 72 bytes

```
++++++++[>+>++++++>++++>-<<<<-]>++[>.+<-]>>[>+>++>+++<<<-]>++[>+.>+.<<-]

```

Try it online!

### How it works

The interpreter begins with a tape of **0** cells.

```
++++++++

```

This sets the first cell to **8**, leaving the tape in the following state.

```
   8
   ^

```

```
[>+>++++++>++++>-<<<<-]

```

This increments the second cell once, the third cell **6** times, the fourth cell **4** times, decrements the fifth cell once, then goes back to the beginning of the tape and decrements the first cell. After **8** iterations, the tape looks like follows.

```
  0   8  48  32  -8
  ^

```

```
>++

```

We advance to the second cell and increment it twice, getting ready to print the digits.

```
  0  10  48  32  -8
      ^

```

```
[>.+<-]

```

This prints the third cell, increments it, then goes back to the second cell and decrements it. After **10** iterations, we've printed `0123456789` and the tape looks like follows.

```
  0   0  58  32  -8
      ^

```

```
>>

```

Time to prep the tape for the letters! We begin by advancing two cells.

```
  0   0  58  32  -8   0   0
              ^

```

```
[>+>++>+++<<<-]

```

This increments the fifth cell once, the sixth cell twice, the seventh cell thrice, then goes back to the fourth cell and decrements it. After **32** iterations, the tape looks like follows.

```
  0   0  58   0  24  64  96
              ^

```

```
>++

```

As a last step before printing the letters, we advance to the fifth cell and increment it twice.

```
  0   0  58   0  26  64  96
                  ^

```

```
[>+.>+.<<-]

```

Finally, we advance to the sixth cell to increment and print it, do the same for the seventh cell, then go back to the fifth cell and decrement it. After **26** iterations, we've printed `Aa...Zz`.
> 30 votes

# Answer
# Ruby, 42 bytes

```
->{[*?/...?:,*?@...?[,*?`...?{]-[?/,?@,?`]}

```

A function that returns a char array. A program that outputs just the characters is 49 bytes:

```
$><<([*?/...?:,*?@...?[,*?`...?{]-[?/,?@,?`])*''

```

This simply uses the ascii characters on either side of the relevant ranges to define a range. For example, `?/...?:` means the characters between a forward slash and a colon, excluding the end. To get rid of the beginnings, we subtract an array containing the three beginning characters.
> 26 votes

# Answer
# 6502 machine language, ~~74~~ ~~70~~ 68 bytes

Hex dump (6502 programs are generally not relocatable; the code here is stored starting at location $0603):

```
0600:          a9 24 0a 8d 20 06 8d 21 06 8d 23 06 8d
0610: 25 06 09 20 8d 1a 06 8d 1c 06 ea aa ea a8 a9 00
0620: ea ea 98 ea 8a ea a2 ff a9 7b a0 60 20 3a 06 a9
0630: 5b a0 40 20 3a 06 a9 3a a0 2f 85 80 c8 e8 98 95
0640: 00 c8 c4 80 d0 f7 60

```

You can see that this uses none of the prohibited bytes: $41 through $5a, $61 through $7a, or $30 through $39.

This is a function with no arguments that, when called, returns a pointer to the character array "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" at the top of the stack, in accordance with standard 6502 calling conventions.

By way of explanation, here's a disassembly:

```
Address  Hexdump   Disassembly
-------------------------------
$0603    a9 24     LDA #$24
$0605    0a        ASL A
$0606    8d 20 06  STA $0620
$0609    8d 21 06  STA $0621
$060c    8d 23 06  STA $0623
$060f    8d 25 06  STA $0625
$0612    09 20     ORA #$20
$0614    8d 1a 06  STA $061a
$0617    8d 1c 06  STA $061c
$061a    ea        NOP
$061b    aa        TAX
$061c    ea        NOP
$061d    a8        TAY
$061e    a9 00     LDA #$00
$0620    ea        NOP
$0621    ea        NOP
$0622    98        TYA
$0623    ea        NOP
$0624    8a        TXA
$0625    ea        NOP
$0626    a2 ff     LDX #$ff
$0628    a9 7b     LDA #$7b
$062a    a0 60     LDY #$60
$062c    20 3a 06  JSR $063a
$062f    a9 5b     LDA #$5b
$0631    a0 40     LDY #$40
$0633    20 3a 06  JSR $063a
$0636    a9 3a     LDA #$3a
$0638    a0 2f     LDY #$2f
$063a    85 80     STA $80
$063c    c8        INY
$063d    e8        INX
$063e    98        TYA
$063f    95 00     STA $00,X
$0641    c8        INY
$0642    c4 80     CPY $80
$0644    d0 f7     BNE $063d
$0646    60        RTS

```

The machine-language code is self-modifying. For stack manipulation, I needed to use PHA and PLA to push and pop the accumulator, but these instructions have opcodes $48 and $68, which are prohibited (they're the ASCII codes for the letters 'H' and 'h'). So, for PHA, I take the number $24, do an arithmetic shift left (ASL), and store the resulting $48 in the four spots in the code where it needs to be executed. Then, for PLA, I use a bitwise OR on the $48 in the accumulator to compute $68, and store it in the two spots in the code where it's needed.

There were several instructions other than PHA and PLA that I also couldn't use because their opcodes happen to be the same as ASCII letters or digits, but I found direct workarounds for those others.

The desired character array is computed and stored starting at location 0 (it doesn't really matter where it's stored since we just need to be sure that a pointer to it is returned the top of the stack).

You can try this out at Nick Morgan's 6502 assembler and emulator. Here's a screenshot; the monitor box at the bottom shows the output string (in locations $00 through $3D) after the program is run.
> 23 votes

# Answer
# Haskell, ~~75 72 63 58~~ 56 bytes

```
__=[__|[_',ä]<-["/:","@[","`{"],__<-[_'..],_'<__,__<ä]

```

Try it online! Call with `__`. Output:

```
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

```

Thanks to xnor who suggested `__` and `_'` as two byte variable names instead of `(!)` or similar, saving 9 bytes. I especially like how `_'` breaks the syntax highlighting. And thanks again to xnor for generalizing the ranges, saving another 4 bytes.
**Edit:** I found out that Unicode chars are allowed as identifiers in Haskell, so e.g. `ä`, `ö`, ... can also be used as two byte identifiers. Since there was one three byte identifier left in the program I replaced it by `ä`, saving another 2 bytes.

**Explanation:**

`__` and `_'` are valid variable names. From the language specification:

> An identifier consists of a letter followed by zero or more letters, digits, underscores, and single quotes. \[...\] Underscore, `_`, is treated as a lower-case letter, and can occur wherever a lower-case letter can. However, `_` all by itself is a reserved identifier, used as wild card in patterns.

So the code is equivalent to

```
s = [x|[a,b]<-["/:", "@[", "`{"], x<-[a..], a<x, x<b]

```

In the list comprehension `a` gets bound to `'/'` and `b` to `':'` (`"/:"` is equivalent to `['/',':']`, so the pattern matching succeeds). Then the range `[a..]` builds the string of all characters greater equal `'/'`:

```
"/0123456789:;<=>?@ABCDE ... \1114110\1114111"

```

For each character `x` in this string it's then checked whether `'/'<x` and `x<':'`, resulting in the chars `0123456789`. Then `a` and `b` are bound to `@` and `[`, yielding the chars `ABCDEFGHIJKLMNOPQRSTUVWXYZ` and so on.
> 18 votes

# Answer
# Perl (5.10 or 5.12), ~~30~~ 29 bytes

This program consists mostly of unprintable characters, so here's a hexdump:

```
00000000: 5f 3d 7e 7e 22 d7 c0 84 8c 9e 86 df 9e d1 d1 85 _=~~"...........
00000010: d3 be d1 d1 a5 d3 cf d1 d1 c6 82 d6 22          ............"

```

This program's very simple: we're regexing (`=~`) an underscore (`_`; thanks @Dennis for pointing out that this works) against a regex. The regex is specified as an expression, rather than literally; specifically, we're taking the bitwise complement (`~`) of a string. Reversing the bitwise complement to get at the underlying string, we get the following regex that's being executed:

```
(?{say a..z,A..Z,0..9})

```

In Perl versions 5.10 and 5.12, the `(?{…})` syntax was an experimental syntax for allowing regexes to run arbitrary code at runtime. In this case, we use it to run a straightforward Perl program to print the desired output. (Versions earlier than 5.10 can't be used because they don't have `say`.)

Modern versions of Perl have disabled `(?{…})` by default for security reasons, but if you have such a version of Perl, you can disable the check (and thus run this program) via `-Mre=eval` as a command-line argument (together with the standard `-M5.010` that specifies the version of the language to implement, and which doesn't count against the bytecount).
> 15 votes

# Answer
# Java (OpenJDK 9), 277 bytes

Yes, Java, you read that well!

```
$->""+($='='+'=')+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+($='-'+'-')+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+--$+($='_'-'&')+--$+--$+--$+--$+--$+--$+--$+--$+--$

```

Try it online!

This prints the ranges, but reversed, since the order has no importance.

```
zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA9876543210

```

I played on the absence of "no input" rule to implicitly define a `char` which is required to make the whole thing work. If that's cheating, please say so.

## Ungolfed & testing

```
public class PCG105781 {
  interface X { String apply(char x); }

  public static void main(String[] args) {
    X x = $
        -> "" // Force the result as a String.
        // The line below appends "zyxwvutsrqponmlkjihgfedcba"
        // '=' + '=' is 122 as int. $=122 casts 122 as a char, 'z'
        + ($ = '=' + '=') + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$
        // The line below appends "ZYXWVUTSRQPONMLKJIHGFEDCBA"
        // '-' + '-' is 90 as int. $=90 casts 90 as a char, 'Z'
        + ($ = '-' + '-') + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$
        // The line below appends "9876543210"
        // '_' - '&' is 57 as int. $=57 casts 57 as a char, '9'
        + ($ = '_' - '&') + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$ + --$
      ;

    System.out.println(x.apply('_'));
  }
}

```
> 13 votes

# Answer
# Actually ~~8~~ ~~5~~ 4 bytes

```
'>┘▀

```

How it works:

```
 '>    Pushes > onto the stack as a string
           STACK: [>]
    ┘  Converts the top item of the stack to it's ordinal
           STACK: [62]
     ▀ Push all digits from base n(top item of the stack)
           STACK: [012...xyz]

```

Print is implicit at the end of the program.

Edit 1: Replaced putting the alphabet in lower/uppercase and then the number range(10) with just getting base 62's printable characters.

Edit 2: changed "\>" to '\> thanks to Mego :) saved 1 byte.

Try it online!
> 12 votes

# Answer
# PHP, 69 bytes

```
<?=~"ÏÎÍÌËÊÉÈÇÆ¾½¼»º¹¸·¶µ´³²±°¯®¬«ª©¨§¦¥žœ›š™˜—–•”“’‘ŽŒ‹Š‰ˆ‡†…";

```

The code is stylized using Windows-1252 here. Below is a reversible *xxd* hexdump.

```
00000000: 3c 3f 3d 7e 22 cf ce cd cc cb ca c9 c8 c7 c6 be  <?=~"...........
00000010: bd bc bb ba b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 af ae  ................
00000020: ad ac ab aa a9 a8 a7 a6 a5 9e 9d 9c 9b 9a 99 98  ................
00000030: 97 96 95 94 93 92 91 90 8f 8e 8d 8c 8b 8a 89 88  ................
00000040: 87 86 85 22 3b                                   ...";

```

Try it online!
> 11 votes

# Answer
# Brainfuck, ~~89~~ 85 bytes

Because brainfuck ignores alphanumeric characters anyway, this is just a constant-output challenge... (Edit: See Dennis' Solution for a version which is 10 bytes shorter)

```
+[-[--<]>>--]++++++++++[<+.>-]<++++++++>+[-[---<]>>-]<-<<+++++[>+++++<-]>+[>.+<<<.+>>-]

```

**Try it online!**

This code is a good example of basic counted loops in brainfuck:

```
+[-[--<]>>--]   Create value 47: char just before '0'
++++++++++      Set adjacent cell to 10: to be used as a counter

[               While the counter is not 0:
 <+.              Increment and print the char
    >-            Decrement the counter
       ]        (End loop: Exits when all digits have been printed)

<++++++++>           The char is now at '9' so add 8 to make it 'A'
+[-[---<]>>-]<-      In another cell create lowercase 'a'
<<+++++[>+++++<-]>+  Create 26: the number of times to loop

[                While the counter is not 0:
 >.+               Print and increment the lowercase char
    <<<.+          Print and increment the uppercase char
         >>-       Decrement the counter
            ]    (End loop: Exits when all letters have been printed)

```

Note that this uses wrapping shortcuts to generate numbers, meaning that the interpreter needs to have 8-bit wrapping cells (such as the one I linked to).
> 9 votes

# Answer
# JavaScript (ES6), 983 bytes

Turns out in ES6 there's a lot of characters you can use in JavaScript variable names! Works great after you exhaust the six 1-2 byte variable names with `$` and `_`.

```
_=~[]
$={}
Á=++_
À=![]+""
Â=À[_]
Ã=++_
Ä=À[_]
Å=++_
Æ=($+"")[_]
Ç=(_[_]+"")[_]
È=++_
É=(!""+"")[_]
Ë=++_
Ì=++_
Ê=($+"")[_]
Í=++_
µ=++_
Î=++_
Ï=++_
_="\\"
Ð=$.$
È_=(!""+"")[Ã]
Å_=$+""
Ñ=Å_[Ã]
Ò=(Ð+"")[Ã]
__=Å_[Í]
Ó=(!""+"")[Å]
$_=Å_[Ì]+Ñ+Ò+(!$+"")[È]+__+È_+Ó+Å_[Ì]+__+Ñ+È_
$$=È_+(!""+"")[È]+__+Ó+È_+Ò
$=Á[$_][$_]
$($($$+"\""+Ê+Ñ+_+Ã+Ì+Í+_+Ã+Í+È+Ñ+À[Å]+É+"."+À[Å]+Ñ+_+Ã+Ë+µ+"('"+Ä+Æ+Ê+Ç+É+Â+_+Ã+Ë+µ+_+Ã+Ì+Á+_+Ã+Ì+Ã+_+Ã+Ì+Å+_+Ã+Ì+È+À[Å]+_+Ã+Ì+Ì+_+Ã+Ì+Í+Ñ+_+Ã+Í+Á+_+Ã+Í+Ã+_+Ã+Í+Å+_+Ã+Í+È+__+Ó+_+Ã+Í+Í+_+Ã+Í+µ+_+Ã+µ+Á+_+Ã+µ+Ã+_+Ã+µ+Å+_+Ã+Á+Ã+_+Ã+Á+Å+_+Ã+Á+È+_+Ã+Á+Ë+_+Ã+Á+Ì+_+Ã+Á+Í+_+Ã+Á+µ+_+Ã+Ã+Á+_+Ã+Ã+Ã+_+Ã+Ã+Å+_+Ã+Ã+È+_+Ã+Ã+Ë+_+Ã+Ã+Ì+_+Ã+Ã+Í+_+Ã+Ã+µ+_+Ã+Å+Á+_+Ã+Å+Ã+_+Ã+Å+Å+_+Ã+Å+È+_+Ã+Å+Ë+_+Ã+Å+Ì+_+Ã+Å+Í+_+Ã+Å+µ+_+Ã+È+Á+_+Ã+È+Ã+_+Ã+È+Å+Ã+Å+È+Ë+Ì+Í+µ+Î+Ï+Á+"')\"")())()

```

---

# JavaScript, 1223 bytes

This was my answer before I learned about the above.

```
_=~[]
$={}
___=++_
____=![]+""
$$$$=____[_]
__$=++_
$_$_=____[_]
_$_=++_
$_$$=($+"")[_]
$$_$=(_[_]+"")[_]
_$$=++_
$$$_=(!""+"")[_]
$__=++_
$_$=++_
$$__=($+"")[_]
$$_=++_
$$$=++_
$___=++_
$__$=++_
_="\\"
_$_$=$.$
_$$_=(!""+"")[__$]
_$__=$+""
_$=_$__[__$]
__$_=(_$_$+"")[__$]
__=_$__[$$_]
___$=(!""+"")[_$_]
$_=_$__[$_$]+_$+__$_+(!$+"")[_$$]+__+_$$_+___$+_$__[$_$]+__+_$+_$$_
$$=_$$_+(!""+"")[_$$]+__+___$+_$$_+__$_
$=___[$_][$_]
$($($$+"\""+$$__+_$+_+__$+$_$+$$_+_+__$+$$_+_$$+_$+____[_$_]+$$$_+"."+____[_$_]+_$+_+__$+$__+$$$+"('"+$_$_+$_$$+$$__+$$_$+$$$_+$$$$+_+__$+$__+$$$+_+__$+$_$+___+_+__$+$_$+__$+_+__$+$_$+_$_+_+__$+$_$+_$$+____[_$_]+_+__$+$_$+$_$+_+__$+$_$+$$_+_$+_+__$+$$_+___+_+__$+$$_+__$+_+__$+$$_+_$_+_+__$+$$_+_$$+__+___$+_+__$+$$_+$$_+_+__$+$$_+$$$+_+__$+$$$+___+_+__$+$$$+__$+_+__$+$$$+_$_+_+__$+___+__$+_+__$+___+_$_+_+__$+___+_$$+_+__$+___+$__+_+__$+___+$_$+_+__$+___+$$_+_+__$+___+$$$+_+__$+__$+___+_+__$+__$+__$+_+__$+__$+_$_+_+__$+__$+_$$+_+__$+__$+$__+_+__$+__$+$_$+_+__$+__$+$$_+_+__$+__$+$$$+_+__$+_$_+___+_+__$+_$_+__$+_+__$+_$_+_$_+_+__$+_$_+_$$+_+__$+_$_+$__+_+__$+_$_+$_$+_+__$+_$_+$$_+_+__$+_$_+$$$+_+__$+_$$+___+_+__$+_$$+__$+_+__$+_$$+_$_+__$+_$_+_$$+$__+$_$+$$_+$$$+$___+$__$+___+"')\"")())()

```

I ran `console.log('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')` through jjencode and golfed the result manually. There are definitely more optimizations that can be done.
> 7 votes

# Answer
# Befunge, ~~73~~ ~~72~~ ~~59~~ ~~57~~ ~~55~~ 53 bytes

```
"{"< ^+`"`"\+*`\":"\`"/":\*`\"["\`"@":::::-!!
#@_^,_!

```

Try it online!

This is a single loop counting down from `{` (i.e. one character after `z`). On the first iteration, the `"{"<` sequence pushes two copies of `{` onto the stack - one being the the initial loop counter, and the other being used to decrement that counter using the sequence `!!-` (two NOTs make `1`, which is then subtracted) . On subsequent iterations, the loop counter is already on the stack, so only one `{` is required to setup the decrement sequence.

The rest of the code is just a long boolean expression calculating if the character is in range. If it is, the branch on the second line splits left to write out the value. If not, the right branch wraps around to test if we've reached zero and should terminate. The two branches merge in the middle to go up and repeat the loop. Note that all vertical direction commands go upwards, since we can't use a `v`, but that's fine because the instruction pointer automatically wraps at the top of the playfield.

Thanks to Mistah Figgins for initially coming up with a better technique for the loop increment.

But special thanks to Jo King for an even better approach counting down rather than up, as well as a more compact branch layout.
> 7 votes

# Answer
# Self-modifying Brainfuck, 32 bytes

```
<[-<+.>]<<[-<+.>]<<[-<+.>]`@/

```

Try it online!

`xxd -r`-reversible hexdump (contains unprintables):

```
00000000: 3c5b 2d3c 2b2e 3e5d 3c3c 5b2d 3c2b 2e3e  <[-<+.>]<<[-<+.>
00000010: 5d3c 3c5b 2d3c 2b2e 3e5d 601a 401a 2f0a  ]<<[-<+.>]`.@./.

```
> 7 votes

# Answer
# Jelly, ~~17~~ 16 bytes

```
“:[{“/@`‘Ḷḟ"/ỌḊ€

```

Try it online!

### How it works

```
“:[{“/@`‘Ḷḟ"/ỌḊ€  Main link. No arguments.

“:[{“/@`‘         Yield [[58, 91, 123], [47, 64, 96]].
         Ḷ        Unlength; map each n to [0, ..., n-1].
          ḟ"/     Reduce by vectorizing filter-false.
                  This yields [[47, ..., 57], [64, ..., 90], [96, ..., 122]].
             Ọ    Unordinal; replace each n with the corr. Unicode character.
              Ḋ€  Deqeue each; remove the first character of each of the three
                  generated strings ('/', '@', and '`').

```
> 6 votes

# Answer
# Julia 0.4, 46 bytes

```
_()=['¥':'®';'¶':'Ï';'Ö':'ï'].-['~'-'	']

```

This is a generic function that returns a character array.

Try it online!

### Alternate version, 47 bytes, ASCII-only

```
_(_=_==_)=['/'+_:':'-_;'@'+_:'['-_;'`'+_:'{'-_]

```

Try it online!
> 6 votes

# Answer
# JavaScript (ES6), ~~812~~ ~~745~~ ~~657~~ ~~650~~ ~~536~~ ~~520~~ 416 bytes

```
(À=(Á=!($={})+(Ø=""))[Â=_=+[]],Ã=(Ä=!_+Ø)[Å=++_],Æ=(Ç=$+Ø)[_],È=(É=$.$+Ø)[_],Ê=Ä[Ë=++_],Ì=Ä[Í=++_],Î=++_,Ï=Ç[Ð=++_],Ñ=Ç[Ò=++_],Ó=++_,$=$[Ô=Ï+Æ+È+Á[Í]+Ñ+Ã+Ê+Ï+Ñ+Æ+Ã][Ô],$($((Õ=Ã+Ä[Í]+Ñ+Ê+Ã+È)+`"${Ù=($=À)+Æ+(Ö=Ô[Ð])}($ ${[Æ+$+"[["+Î+ ++_,Ø+Ð+_+"],["+Ò+Ð,Ø+ ++_+Å+"],["+_+Ó,Ú=Ø+Å+Ë+Í]}]])${Ù}(_=$[Â];_<$[Å];)Ø+=${(_="\\")+Ú+Ñ+Ö+(Û=(_=_+Å)+Ð)+Å+Ô[Ë]+_+Î+Ó}.${$+Ö+Æ+Û+Ð+_+Â+Í+Û+Â+Á[Å]+Ö+_+Â+Í+Æ+É[Ë]+Ì}(_++);${Õ} Ø"`)()))

```

**Edit:** Using ISO8859-1 encoding, this solution is 416 bytes instead of 520 bytes. The full program is 432 bytes, taking into account the extra 16 bytes for

```
f=\r\n
416 byte submission here\r\n
alert(f())

```

This is a function submission, as opposed to a full program. I spent quite a long time golfing JJEncode (hat-tip to darrylyeo for that), but instead of golfing

```
console.log('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')

```

I golfed

```
for($ of[[48,58],[65,91],[97,123]])for(_=$[0];_<$[1];)Ø+=String.fromCharCode(_++);return Ø

```

where `Ø` is initialized to `""` in the overhead.

Rewritten with comma operators converted to newlines:

```
À=(Á=!($={})+(Ø=""))[Â=_=+[]]
Ã=(Ä=!_+Ø)[Å=++_]
Æ=(Ç=$+Ø)[_]
È=(É=$.$+Ø)[_]
Ê=Ä[Ë=++_]
Ì=Ä[Í=++_]
Î=++_
Ï=Ç[Ð=++_]
Ñ=Ç[Ò=++_]
Ó=++_
$=$[Ô=Ï+Æ+È+Á[Í]+Ñ+Ã+Ê+Ï+Ñ+Æ+Ã][Ô]
// function that returns string
$($((Õ=Ã+Ä[Í]+Ñ+Ê+Ã+È)+`"${Ù=($=À)+Æ+(Ö=Ô[Ð])}($ ${[Æ+$+"[["+Î+ ++_,Ø+Ð+_+"],["+Ò+Ð,Ø+ ++_+Å+"],["+_+Ó,Ú=Ø+Å+Ë+Í]}]])${Ù}(_=$[Â];_<$[Å];)Ø+=${(_="\\")+Ú+Ñ+Ö+(Û=(_=_+Å)+Ð)+Å+Ô[Ë]+_+Î+Ó}.${$+Ö+Æ+Û+Ð+_+Â+Í+Û+Â+Á[Å]+Ö+_+Â+Í+Æ+É[Ë]+Ì}(_++);${Õ} Ø"`)())

```

## Explanation

This script starts by initializing a few built-in types and coercing them into strings. The strings we can get without using alphanumeric characters are:

```
{}+""     -> "[object Object]"
!{}+""    -> "false"
!+[]+""   -> "true"
{}[{}]+"" -> "undefined"

```

From these strings, and the necessary digits in order to reference individual characters, we can obtain the strings `return` and `constructor`, which can be used like:

```
$={}[Ô="constructor"][Ô]
$(("return"+`"encoded script"`)())

```

The object's constructor is `Object()`, and its constructor is `Function()`, which we can use essentially like `eval()`.

In this case, the encoded script to be executed is the nested `for` loops concatenating all the alphanumeric characters to a string using their code points and returning it.

For alphabetical characters in the encoded script that can't be accessed using the built-ins, JJEncode uses octal escapes to represent them, then decodes the entire string by returning it from an inner function. The outer function can then be called to execute the source.

## Demo

```
f=
(À=(Á=!($={})+(Ø=""))[Â=_=+[]],Ã=(Ä=!_+Ø)[Å=++_],Æ=(Ç=$+Ø)[_],È=(É=$.$+Ø)[_],Ê=Ä[Ë=++_],Ì=Ä[Í=++_],Î=++_,Ï=Ç[Ð=++_],Ñ=Ç[Ò=++_],Ó=++_,$=$[Ô=Ï+Æ+È+Á[Í]+Ñ+Ã+Ê+Ï+Ñ+Æ+Ã][Ô],$($((Õ=Ã+Ä[Í]+Ñ+Ê+Ã+È)+`"${Ù=($=À)+Æ+(Ö=Ô[Ð])}($ ${[Æ+$+"[["+Î+ ++_,Ø+Ð+_+"],["+Ò+Ð,Ø+ ++_+Å+"],["+_+Ó,Ú=Ø+Å+Ë+Í]}]])${Ù}(_=$[Â];_<$[Å];)Ø+=${(_="\\")+Ú+Ñ+Ö+(Û=(_=_+Å)+Ð)+Å+Ô[Ë]+_+Î+Ó}.${$+Ö+Æ+Û+Ð+_+Â+Í+Û+Â+Á[Å]+Ö+_+Â+Í+Æ+É[Ë]+Ì}(_++);${Õ} Ø"`)()))
console.log(f())
```
> 6 votes

# Answer
# bash (on linux), ~~507~~ ~~493~~ ~~490~~ 485 bytes

this stores an array of characters in the global variable `__`

```
: {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_
__=(/????/????/??/??)
___=${__%??}
__=(${__[@]#$___?})
____=${___#/*/?}
____=${____%?/*/}
_____=${____%?}
____=${____#?}
___=${___%??/}
______=($___*_??)
______=${______#$___???????}
______=${______%??_*}
_______=($___$_____???*)
_______=${_______#$___??}
_______=${_______%????}
___=$#
___=$((++___))$((___+++++___+___--))$___
$_____$_______$______$____{,} ___="\({$______..$'\\$___'}\)"
__=(${__[@]} ${___[@]} ${___[@]^})

```

it needs to be executed on a freshly booted linux machine with `/proc`, or something like a pid namespace

explanation:

```
# {var}>file opens a file descriptor >= 10 to that file
: {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_ {_}>_
# at startup no pid is > 999 so there's no other /proc/pid/fd/??
__=(/????/????/??/??)                                 # /proc/self/fd/1[0-9]
___=${__%??}                                          # /proc/self/fd/
__=(${__[@]#$___?})                                   # {0..9}
____=${___#/*/?}                                      # elf/fd/
____=${____%?/*/}                                     # el
_____=${____%?}                                       # e
____=${____#?}                                        # l
___=${___%??/}                                        # /proc/self/
______=($___*_??)                                     # /proc/self/timerslack_ns
______=${______#$___???????}                          # ack_ns
______=${______%??_*}                                 # a
_______=($___$_____???*)                              # /proc/self/environ
_______=${_______#$___??}                             # viron
_______=${_______%????}                               # v

___=$#                                                # 0
___=$((++___))$((___+++++___+___--))$___              # 172 (z in octal)

# eval eval                   ___="\({a..$'\172'}\)"
$_____$_______$______$____{,} ___="\({$______..$'\\$___'}\)"
#   {0..9}   {a..z}    {A..Z}
__=(${__[@]} ${___[@]} ${___[@]^})

```

to try it out we can add `declare -p __` at the end to display the result

```
$ sudo unshare --fork --pid --mount-proc bash golf
declare -a __=([0]="0" [1]="1" [2]="2" [3]="3" [4]="4" [5]="5" [6]="6" [7]="7" [8]="8" [9]="9" [10]="a" [11]="b" [12]="c" [13]="d" [14]="e" [15]="f" [16]="g" [17]="h" [18]="i" [19]="j" [20]="k" [21]="l" [22]="m" [23]="n" [24]="o" [25]="p" [26]="q" [27]="r" [28]="s" [29]="t" [30]="u" [31]="v" [32]="w" [33]="x" [34]="y" [35]="z" [36]="A" [37]="B" [38]="C" [39]="D" [40]="E" [41]="F" [42]="G" [43]="H" [44]="I" [45]="J" [46]="K" [47]="L" [48]="M" [49]="N" [50]="O" [51]="P" [52]="Q" [53]="R" [54]="S" [55]="T" [56]="U" [57]="V" [58]="W" [59]="X" [60]="Y" [61]="Z")

```
> 6 votes

# Answer
# C, 128 bytes

Yes, C. And it even is shorter than a few of the esoteric ones.

```
__($$,_,$,_$,$_){$>_$?_$=_$?!$:$,$=*(""-_+$_++)&*"{":_;_$?*(""-_+$$++)=$++:_;$&&__($$,_,$,_$,$_);}_(_){__(_,"",_,!!_,"½´ÞÅþå");}

```

Call `_` on a sufficiently large, empty `char *` buffer.

<sub>May be a teensy wee bit compiler dependent. Tested using GCC; file was saved in codepage 1252.</sub>
> 6 votes

# Answer
# 05AB1E, ~~18~~ ~~15~~ 11 bytes

*-4 thanks to Adnan, because if the input size is 1, 05AB1E will use 0 for b on first command.*

```
•£•Ýç©á®þ«˜

```

Try it online!

```
•£•Ÿ            # Push [0..122] using implicit 0 and the base-214 of `£`.
    ç           # Convert to ASCII chars.
     ©          # Store full array in register.
      á         # Push the same array with ONLY letters.
       ®        # Push contents of register (char)[0..122].
        þ       # Push only the digits.
         «˜     # Concat to list, flatten it.

```

I tried so many different approaches, but the key points here that made it hard:

```
- Basic commands will not work, only extended and a select few of the basics.
- Extended commands are pretty complex.
- Eval (.V) will not work.
- To push numbers you can do a base 214 compression.
- ALL sequence pushes (E.G. žK) won't work.
- ALL number pushes won't work, except for compression and the -1 an empty register pushes.

```
> 5 votes

# Answer
# Brain-Flak, 171 bytes

Includes +3 for `-A`

```
(((((()()()){}){}){}){})(((()()())){}{}){({}[()]<(({})())>)}{}(({})(()()()()){})(((((()()()){}){}){}())<{({}[()]<(({})())>)}{}(({})(()()()){}())>){({}[()]<(({})())>)}{}

```

Try it online!

```
(((((()()()){}){}){}){}) # push 48
(((()()())){}{})         # push 9
{({}[()]<                # for 9..0
(({})())                 # pop a, push a, push a+1
>)}{}                    # end for
(({})(()()()()){})       # pop a, push a, push a + 8
(((((()()()){}){}){}())< # push 26 and save a 26 for later
{({}[()]<                # for 26..0
(({})())                 # pop a, push a, push a+1
>)}{}                    # end for
(({})(()()()){}())       # pop a, push a, push a + 7
>)                       # push that 26 that we held
{({}[()]<                # for 26..0
(({})())                 # pop a, push a, push a+1
>)}{}                    # end for

```

There is probably a way to do this without having to repeat the add 1 "function".
> 5 votes

# Answer
# J, 171 bytes

```
(+:>.+:^^*_){.".(':',~(+:+:>.^*_){(*:>.^*_)!:(+:<.^+:*_)''),',',(":(>:*:+:+:+:*_),(<.^<:^<:^*_),<:*:<.^+:*_),'+/',('.',~(+:<.+:^*_){(*:>.^*_)!:(+:<.^+:*_)''),":+:<.*:>:^*_

```

Ow... my brain hurts... Try it online!

Here's so you can see all of it one line (it won't run, though, with line breaks.)

```
(+:>.+:^^*_){.".(':',~(+:+:>.^*_){(*:>.^*_)!:(+:<.^+:*_)''),',',(":(>:*:+:+:+:*_),(<.^<:^<:^*
_),<:*:<.^+:*_),'+/',('.',~(+:<.+:^*_){(*:>.^*_)!:(+:<.^+:*_)''),":+:<.*:>:^*_

```

Only guaranteed to work with J version `j805/j64/linux/release/commercial/www.jsoftware.com/2016-12-11T08:02:52`, in that order. (Only the first 12 characters matter.)

## Explanation

Most of the program is devoted to constant generation. With those constants replaced with their values, the program looks like this:

```
(62){.".(':',~(12){(9)!:(14)''),',',(":(65),(97),48),'+/',('.',~(10){(9)!:(14)''),":26

```

With some parentheses removed, and some numbers made nicer:

```
62{.".(':',~12{9!:14''),',',(":65 97 48),'+/',('.',~10{9!:14''),":26

```

This is composed of a bunch of `,` and `,~`s, which append and prepend arguments. Here are the separate values:

1. `":26`
2. `('.',~10{9!:14'')`
3. `'+/'`
4. `(":65 97 48)`
5. `','`
6. `(':',~12{9!:14'')`

`1` is `26` as a string.

`9!:14''` generates the following string on TIO:

```
j805/j64/linux/release/commercial/www.jsoftware.com/2016-12-11T08:02:52

```

with `2`, we obtain the `10`th character (`i` from `linux`), and add a `.` to the end of it, yielding `i.`.

`3` and `5` are self-explanatory.

`4` is the list of numbers `65 97 48` as a string.

`6` is similar to `2`, except it's the `12`th character (`u` from `linux`) and adds a `:` to the end, yielding `u:`.

This, all together, yields `u:,65 97 48+/i.26`. `".` evaluates this, giving us:

```
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:;<=>?@ABCDEFGHI

```

(Note: `+/` is tabulated addition.)

Then, with `62{.`, we take the first `62` characters from this, giving us `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.
> 5 votes

# Answer
# Brainfuck, 55 bytes

```
+++[[<+>->++<]>]<<[-<->]<<<<++[->>+.>+.<<<]<--[->>.+<<]

```

Output:

```
aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789

```

Try it online!

---

Initializes the tape to *3·2<sup>n</sup>*, and works from there.

```
+++[[<+>->++<]>]    initialize the tape
                    |   0 |   3 |   6 |  12 |  24 |  48 |  96 | 192 | 128 |   0 |   0 |
                                                                                ^
<<[-<->]            subract 128 from 192
                    |   0 |   3 |   6 |  12 |  24 |  48 |  96 |  64 |   0 |   0 |   0 |
                                                                        ^
<<<<++              increment 24 twice
                    |   0 |   3 |   6 |  12 |  26 |  48 |  96 |  64 |   0 |   0 |   0 |
                                                ^
[->>+.>+.<<<]       output aAbBcC ~ zZ
                    |   0 |   3 |   6 |  12 |   0 |  48 | 122 |  90 |   0 |   0 |   0 |
                                                ^
<--[->>.+<<]        decrement 12 twice; output 0 ~ 9
                    |   0 |   3 |   6 |   0 |   0 |  58 | 122 |  90 |   0 |   0 |   0 |
                                          ^

```
> 5 votes

# Answer
# Perl 6, 43 bytes

```
{|('`'^..^'{'),|('@'^..^'['),|('/'^..^':')}

```

A lambda that returns a list of characters.
Explanation:

```
   '`'                                       # The character before "a" (in Unicode order)
          '{'                                # The character after "z"
      ^..^                                   # Endpoint-exclusive range between them
 |(          )                               # Slip the range into the outer list
               |('@'^..^'[')                 # Same thing for "A" to "Z"
                             |('/'^..^':')}  # Same thing for "0" to "9"

```

Depends on a bugfix to the Rakudo Perl 6 interpreter which was only committed to the git repo today, and isn't part of an official Rakudo release yet. In fact, I encountered the bug while answering this challenge, and managed to get fixed with the help of one of the Perl 6 core devs. The rules of this site, as I understand them, did't allow answers to compete in such a situation, so I marked it as noncompeting but now it's fine.
> 5 votes

# Answer
# MAWP, 197 bytes

Here's a funny solution.

```
__________________________________________________________________________________________________________________________;;;;;;;;;;;;;;;;;;;;;;;;;;%%%%%%;;;;;;;;;;;;;;;;;;;;;;;;;;%%%%%%%;;;;;;;;;;

```

MAWP almost exclusively uses alphanumeric characters to print values, so instead we spam the `_`(stack length) operator to generate ASCII values till 122.

The rest is printing the required characters and removing the unnecessary ASCII values. The whole thing is printed in reverse to conserve bytes.

Try it!
> 5 votes

# Answer
# Python 3, 2188 bytes

```
_=('/')
((('')-_)+(('‘')-_)+(('’')-_)+(('“')-_)+(('”')-_)+(('•')-_)+(('–')-_)+(('—')-_)+((':')+_)+((';')+_)+(('<')+_)+(('=')+_)+(('>')+_)+(('?')+_)+(('@')+_)+(('Ÿ')-_)+((' ')-_)+(('¡')-_)+(('¢')-_)+(('£')-_)+(('¤')-_)+(('¥')-_)+(('¦')-_)+(('§')-_)+(('¨')-_)+(('©')-_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+((' ')+_)+(('!')+_)+(('"')+_)+(('#')+_)+(('$')+_)+(('%')+_)+(('&')+_)+(("'")+_)+(('(')+_)+((')')+_)+(('*')+_)+(('+')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('')+_)+(('	')+_)+(('''
''')+_)+(('')+_),='')

```

The code contains some unprintable characters that may not display properly. See the TIO link for the actual code.

Try it online!

There doesn't seem to be a way to do any sort of looping without access to keywords, so I had to make this monster.

Here is an explanation of why this works.
> 5 votes

# Answer
# PHP 7.0+, 110 bytes

God bless bitwise strings!

```
<?=($__='`@`@'^'*/).')(($_='->.<:'^'__@[_')('>'^_,'%'^_)),$__($_('|'^'=','|'^'&')),$__($_(':'^"\n",';'^']'^_));

```

Replace the `\n` with a real \*NIX-style newline.
It is present in the code to avoid problems with newlines, but isn't counted in the score.

This throws a bunch of warnings, but those could be supressed by appending an `@` in front of every stray `_`.

---

**Warning free**, 113 bytes

```
<?=($__='`@`@'^'*/).')(($_='->.<:'^'__@[_')('>'^@_,'%'^@_)),$__($_('|'^'=','|'^'&')),$__($_(':'^"\n",';'^']'^@_));

```
> 4 votes

# Answer
# 65c02 machine language + Apple \]\[ ROM, 25 bytes

```
A9 E0 20 0F 80 A9 C0 20 0F 80 A2 0A A9 AF 2C A2 1A 1A 20 ED FD CA D0 F9 60

```

Prints `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`.

Should start at `$8000`.

## Disassembly

```
8000-   A9 E1       LDA   #$E0
8002-   20 0F 80    JSR   $800F
8005-   A9 C1       LDA   #$C0
8007-   20 0F 80    JSR   $800F
800A-   A2 0A       LDX   #$0A
800C-   A9 B0       LDA   #$AF
800E-   2C          HEX   2C     ; SKIPS NEXT 2 BYTES
800F-   A2 1A       LDX   #$1A
8011    1A          INC
8012-   20 ED FD    JSR   $FDED
8015-   CA          DEX
8016-   D0 F9       BNE   $8011
8018-   60          RTS

```
> 4 votes

# Answer
# MarioLANG, 255 233 199 bytes

```
+
+
+
+
+
+
+
+
)
><
+"
+
+(
+(
+(
+(
++
+)
)+
++
++
++
+)
++
++
++
++
++
++
++
+)
()
()
-
[!)+)+)-)--)+++((
=#==============
>((+(+      >((+
"======<    "====<
![-)).).((((![-)).
#===========#=====

```

Try it online!

The more time Mario spends in the air, the less floor you have to draw and the less characters you use for the solution...
> 4 votes

# Answer
# C (clang), 116 bytes

"Arbitrary order" indeed.

The function `_` takes a pointer to target string as an argument. Since that pointer is to int, it is assumed that `sizeof(int) == 4`.

In the TiO link the result is printed as-is, as well as sorted, for easier ocular inspection.

```
$;*ö;Å(å,ä){(å+=$)<ä?*ö++=å,Å(å,ä):$;}_(*ä){ö=ä;$='&&&&'^'$$$$';Å('?_@`','[{\\|');$+=$;Å('/.-,','?>=<');*--ö&=';:';}

```

Try it online!
> 4 votes

# Answer
# Python 3, ~~119~~ 114 bytes

```
ᵖʳⅰₙｔ(*ﬁˡｔₑʳ(ﬆʳ.ⅰˢªˡₙｕᵐ,ᵐªｐ(ᶜʰʳ,ʳªⁿｇₑ(ºʳｄ('{')))),ˢᵉᵖ='')

```

Try it online!

-5 from using ﬁ and ﬆ ligatures thanks to m90. I'm going to write ﬆr in my Python code from now on.

# Python 3, ~~119~~ 117 bytes

```
_=ﬆʳⁱⁿᵍ=ºʳᵈ('>');ᵖʳⁱⁿᵗ(__ⁱᵐᵖºʳᵗ__([*ᵛªʳˢ()][~_+_]).ᵖʳⁱⁿᵗªᵇˡᵉ[:_])

```

Try it online!
> 4 votes

# Answer
# JavaScript, 371 bytes

```
(ÿ=(À=!($={})+(ø=""))[ò=ì=+[]],ý=(Þ=!ò+ø)[++ì],ó=(Ó=$+ø)[ì],Ú=$.$+ø,ú=Þ[í=ì+ì],é=Þ[î=í+ì],ç=Ó[Ì=î+í],þ=Þ[ò],Î=Ì+í,$=$[Ç=ç+ó+Ú[ì]+À[î]+þ+ý+ú+ç+þ+ó+ý][Ç],$($((È=ý+é+þ+ú+ý+Ú[ì])+`"${ÿ+ó+ý}(_=ò;_<Ì<<Ì;)ø+=${(ß="\\")+ì+í+î+þ+ý+(Ð=(ð=ß+ì)+Ì)+ì+Ç[í]+(æ=ð+í*í+Î)}.${ÿ+ý+ó+Ð+Ì+ð+ò+î+Ð+ò+À[ì]+ý+ð+ò+î+ó+Ú[í]+é}(_++);${È} ø.${ý+é+ð+í*î+ò+À[í]+À[ì]+ç+é}(/${ß+ß+ð+í+Î}|_/${æ},'')"`)()))()

```

The `(...)()` scaffolding is only there to make it easier to paste it into the F12 console, and doesn't count toward the total, as per the rules. Output:

```
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

```

This is based on the same method as the other JavaScript solutions: using string coercion to get at some internal string constants to build a string to get at the constructor of the constructor of an object. A constructor is a function, so its constructor is Function, which allows us to build a new one, essentially like `eval`.

One difference with previous solutions is that I tried to use more ‘sensible’ variable names, which made it easier to try out new ideas:

```
ç   c         Ç   constructor        ò   0      ß   \
é   e         Ó   [object Object]    ì   1      ð   \1
ó   o         Ú   undefined          í   2      Ð   \15
þ   t         Þ   true               î   3
ú   u                                Ì   5
                                     Î   7
ÿ   f         À   false
ý   r         È   return
æ   \147 = g

```

The trick that ended up saving the most was to first generate way too much and then filtering out all the characters I didn't need.
> 3 votes

# Answer
# Javascript, 1273 ~~1351~~ ~~1610~~ bytes

This solution works essentially the same way as the other two answers on this thread here and here, where it uses letters from the `true`, `false`, `undefined`, and `[object Object]` strings to build the functions that it needs to generate the other letters.

Since a good number of the letters are already put into the object, I tried adding all of the remaining minuscule letters and the numbers to the object, and then applied `toUpperCase` to all of the values in the object to generate the missing majuscule letters.

**Update:**

I was able to improve the way that the octal values were being set, but they're still taking up 13 x 30 bytes (or they will be 30 bytes each after I changes the numbers to different keys), each one now follows this general pattern: `$.ž=\'\\'+$.一+$.七+$.二+'\';`.

An additional 49 bytes can be easily taken out by switching the keys for the numbers to 2 byte characters.

Current submission:

```
$=~[];_={ť:!""+"",ň:![]+"",û:$._+'',ô:{}+"",ø:''};$={零:++$,ƒ:_.ň[$],ť:_.ť[$],一:++$,â:_.ň[$],ř:_.ť[$],ô:_.ô[$],ň:_.û[$],二:++$,ľ:_.ň[$],û:_.ť[$],ƅ:_.ô[$],ď:_.û[$],三:++$,ŝ:_.ň[$],ĵ:_.ô[$],四:++$,ě:_.ň[$],五:++$,ĉ:_.ô[$],î:_.û[$],六:++$,七:++$,八:++$,Ô:_.ô[$],九:++$};_.ĉ=$.ĉ+$.ô+$.ň+$.ŝ+$.ť+$.ř+$.û+$.ĉ+$.ť+$.ô+$.ř;_.ř=$.ř+$.ě+$.ť+$.û+$.ř+$.ň;_.ƒ=(0)[_.ĉ][_.ĉ];_.ƒ(_.ƒ(_.ř+' "$.Û=\'\\'+$.一+$.二+$.五+'\';$.Ĉ=\'\\'+$.一+$.零+$.三+'\';$.Ě=\'\\'+$.一+$.零+$.五+'\';$.ĝ=\'\\'+$.一+$.四+$.七+'\';$.ĥ=\'\\'+$.一+$.五+$.零+'\';$.ǩ=\'\\'+$.一+$.五+$.三+'\';$.ӎ=\'\\'+$.一+$.五+$.五+'\';$.ƥ=\'\\'+$.一+$.六+$.零+'\';$.ǫ=\'\\'+$.一+$.六+$.一+'\';$.ư=\'\\'+$.一+$.六+$.六+'\';$.ŵ=\'\\'+$.一+$.六+$.七+'\';$.ӽ=\'\\'+$.一+$.七+$.零+'\';$.ŷ=\'\\'+$.一+$.七+$.一+'\';$.ž=\'\\'+$.一+$.七+$.二+'\';"')())();_.ƒ(_.ƒ(_.ř+' "_.â=\''+$.Ô+$.ƅ+$.ĵ+$.ě+$.ĉ+$.ť+'.'+$.ǩ+$.ě+$.ŷ+$.ŝ+'($).'+$.ƒ+$.ô+$.ř+$.Ě+$.â+$.ĉ+$.ĥ+'\';_.ƅ=\''+$.ť+$.ô+$.Û+$.ƥ+$.ƥ+$.ě+$.ř+$.Ĉ+$.â+$.ŝ+$.ě+'\';"')())();_.ƒ(_.ƒ(_.ř+' "'+_.â+'((ǩ)=>{$[ǩ.'+_.ƅ+"()]=($[ǩ]+'')."+_.ƅ+"()});"+_.â+"((ǩ)=>{_.ø+=$[ǩ];});"+$.â+$.ľ+$.ě+$.ř+$.ť+'(_.ø);"')())()

```
> 3 votes

# Answer
# C (clang), 132 bytes

```
é,ú,í,ó;_(*$){ú-=ú;í=++ú+ú;ó=í*í<<í*í;*$++=!é?é=í<<í*í,é+=í<<í+ú:é;é+=(é+ú!=ó+í*~í?:í<<í)-(é-ó-í*~í==í<<í<<í)*í*~í;~é>í-ó<<ú&&_($);}

```

Try it online!

Edit: -32 bytes thanks to @ceilingcat
> 3 votes

# Answer
## CJam, 15 bytes

```
"{`[@:/"_:,:^\-

```

Try it online!

### Explanation

```
"{`[@:/" e# Push this string. Note that these are the characters just above and
         e# below the a-z, A-Z and 0-9 ranges, respectively.
_        e# Get a copy of the string.
:,       e# Turn each character into a range, i.e. all characters from the null byte
         e# to the the character below the given one. E.g. { is turned into "...xyz".
:^       e# Fold symmetric set difference over the list. Gives us the characters that
         e# appear in an odd number of the strings. Those are the letters, the digits
         e# as well as `, @ and /.
\        e# Pull the other copy of the string on top.
-        e# Remove these characters from the string. That leaves only the alphanumerics.

```
> 2 votes

# Answer
# , 8 chars / 19 bytes

```
ᶐ+ᶛ+⩥Ⅹă⬯

```

Try it here!

is the uppercase alphabet,  is the lowercase alphabet, and `⩥Ⅹă⬯` is range () from `0` to `10` (, the unicode roman numeral) minus `1`, joined by (`ă`) nothing ().
> 2 votes

# Answer
# Perl 6, 50 bytes

```
{([~] '/'^..^':')~([~] '@'^..^'[')~[~] '`'^..^'{'}

```

Block that returns the string since I don't think there's any way to print without using alphanumeric characters.

Try it online!
> 2 votes

# Answer
# Husk, 12 bytes

```
ṁ?;ȯ→½;□…" ~

```

Try it online!

This was much more difficult in Husk than I expected - which probably indicates that it isn't an optimal solution!

First creates a list of all printable ASCII characters `…" ~`, and then aps a function across each of them. The function checks (`?`) whether each character is alphanumeric (): if it is, then it returns it as a list; if it isn't it returns an empty list (`ȯ→½;`), by the complicated method of first creating a one-element list (`;`), dividing it into two halves (`½`), and then selecting the second (smaller) half ().
> 2 votes

# Answer
## WSF, 145 bytes

Prtty much a direct translation of Dennis's answer.

Stack Exchange cannot display the code, so here is a reversible `xxd` hexdump:

```
00000000: 2020 2020 2020 2020 2020 2020 2020 2020
00000010: 0a20 200a 2020 200a 2020 2020 2020 2020  .  .   .
00000020: 2020 2020 200a 2020 2020 2020 2020 200a       .         .
00000030: 2009 0920 0920 0920 0920 2009 0a09 200a   .. . . .  ... .
00000040: 2020 2020 0a20 200a 0909 2020 0920 2009      .  ...  .  .
00000050: 0a09 200a 200a 0a20 200a 2020 200a 2020  .. . ..  .   .
00000060: 2020 200a 2020 2020 2020 0920 0920 0920     .      . . .
00000070: 2009 0a09 200a 2020 2020 0a20 200a 2020   ... .    .  .
00000080: 0909 200a 2020 0909 0920 0920 2009 0a09  .. .  ... .  ...
00000090: 0a

```

The interpreter runs it perfectly, producing the following output:

```
0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz

```
> 1 votes

# Answer
# Stacked, 70 bytes

```
(π²²~~:' '#.-):'='#.'#'#.%+..#:'/'#.(πτ/~_:π²~~+|>)+#:++$∪#/!

```

Leaves a character array on the top of the stack. This simply uses some character and pi magic. Try it here!
> 1 votes

# Answer
# x86 machine code, 30 bytes

Hexdump:

```
8b d7 8b f9 2b c9 b1 1a b0 7b 2a c1 aa 2c 20 aa
2c 11 3c 3a 7d 01 aa e2 ef 88 0f 8b fa c3

```

Represented as if it had Windows 1252 encoding, with control characters using the Control Pictures visualization:

```
‹×‹ù+É±␚°{*Áª, ª,␑<:}␁ªâïˆ␏‹úÃ

```

It's 32-bit code (IA-32) using `fastcall` calling convention - receives the pointer to output in `ecx`.

Assembly code:

```
    mov edx, edi;
    mov edi, ecx;
    sub ecx, ecx;
    mov cl, 26;
myloop:
    mov al, 'a' + 26;
    sub al, cl;
    stosb;
    sub al, 'a' - 'A';
    stosb;
    sub al, 'A' - '0';
    cmp al, '9'+1;
    jge myskip;
    stosb;
myskip:
    loop myloop;
    mov [edi], cl;
    mov edi, edx;
    ret;

```

Does 26 iterations (`cl` = 26 down to 1). At each iteration, calculates and outputs a lowercase letter, an uppercase letter and a number. If the number is out of range, doesn't output it.

The output is written to address in `ecx`, and null-terminated.

The result:

```
aA0bB1cC2dD3eE4fF5gG6hH7iI8jJ9kKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ

```

Interesting things about this code:

* Save-restore of the `edi` register is usually done by `push`-`pop`, but `push edi` is alphanumeric (`W`) - so I did it with `mov edx, edi` and `mov edi, edx`
* Zeroing a register is usually done by `xor`, but to avoid an alphanumeric character, I did it with `sub`; same byte count
* `jge` is one of only a few conditional jump instructions that are allowed
> 1 votes

# Answer
# PHP, 339 bytes (no bitwise string)

Of course not the shortest code, but an alternate method using the Array to string cast.

```
<?=$_=([]._)[-~-~-~-_],++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,$_=([]._)[_],++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,$_=-_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_,++$_;?>

```

`([]._)` cast an array to string leading "Array\_", then you can take both "A" and "a" and use increment string method.

`-~-~-~-_` is giving "3" using multiple minus bitwise not() (maybe this can be improved)
> 1 votes

# Answer
# GW-BASIC, 109 bytes

Hex dump of file:

```
FE 88 A9 C5 C2 1A 0E BF  11 A2 17 7B DC 10 87 D6
B8 8D A1 F3 E2 F3 A3 18  2B 1C E7 A1 14 7D 8D 3E
15 27 0C 2C 0B 2E F9 F1  C0 7D C4 5D 00 F1 89 C4
82 A5 D8 3C C9 CF 17 F0  D7 89 AF 40 8A AE 9D 03
8B EE A4 91 91 2F 5B DE  D5 AA 18 FE B9 AD C8 3A
5D F7 04 1A F2 1A 7C EC  DF 2C DD 88 D3 94 3B 40
7F EB B9 2C 1A B2 F3 C0  8C D3 95 10 1A

```

As you can see, none of the forbidden characters (`30`..`39`, `41`..`5A`, `61`..`7A`) are used. To run, use `LOAD"filename.bas` and then `RUN`.
> 1 votes

# Answer
# Pyt, 3 bytes

```
ɬɳǰ

```

Explanation:

```
ɬ           Pushes "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
ɳ          Pushes "0123456789"
ǰ         Joins the strings on the stack with no delimiter
Implicit print

```

Try it online!
> 1 votes

# Answer
# Befunge-93, ~~38~~ 33 bytes

```
"/*@:`:":^
,\~+:" "->!#$_::%$\~-:

```

Try it online!

Uses a different method than this answer. The first line pushes these six numbers: (47, 10 + 32), (64, 26 + 32), (96, 26 + 32), representing the 0-9, A-Z and a-z ranges respectively (lengths are summed with 32 so that they can all be printable non-alphanumeric characters, as well as 32 itself), as well as an extra number that gets consumed shortly after (can be any truthy value). Then, execution jumps to the second line, which loops to print all of these ranges.
> 1 votes

# Answer
# Stax, 2 bytes

```
Éè

```

Run and debug it

This isn't very interesting. Just a built-in constant. I used the packed program encoding to avoid alphanumerics, but normally, this is known as `VL`.
> 1 votes

# Answer
# 05AB1E, 34 bytes

```
žĆт₂·-.$Ð₆₂-£?₂₆₂-->.$Ð₂£?₆ÍÍ.$₂£?

```

Try it online!

```
žĆт₂·-.$Ð₆₂-£?₂₆₂-->.$Ð₂£?₆ÍÍ.$₂£?  # full program
             ?                      # output without trailing newline...
            £                       # first...
         ₆                          # 36...
           -                        # minus...
          ₂                         # 26...
            £                       # characters of...
žĆ                                  # the 05AB1E code page...
      .$                            # excluding the first...
  т                                 # 100...
     -                              # minus...
   ₂                                # 26...
    ·                               # times 2...
      .$                            # characters
                         ?          # output without trailing newline...
                        £           # first...
                       ₂            # 26...
                        £           # characters of...
        Ð                           # the 05AB1E code page excluding the first 48...
                    .$              # plus...
              ₂                     # 26...
                  -                 # minus...
               ₆                    # (36...
                 -                  # minus...
                ₂                   # 26)...
                   >                # plus 1...
        Ð           .$              # characters
                                 ?  # output without trailing newline...
                                £   # first...
                               ₂    # 26...
                                £   # characters of...
                      Ð             # the 05AB1E code page excluding the first 65...
                             .$     # plus...
                          ₆         # 36...
                           Í        # minus 2...
                            Í       # minus 2...
                      Ð      .$     # characters

```
> 1 votes

# Answer
# Jelly, 5 bytes

```
⁵Ḷ;ØẠ

```

Try it online!

Outputs `0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`

## How it works

```
⁵Ḷ;ØẠ - Main link. Takes no arguments
⁵     - 10
 Ḷ    - [0, 1, ..., 9]
   ØẠ - “ABC...XYZabc...xyz”
  ;   - Concatenate
        Implicitly smash together into a string and print

```
> 1 votes

# Answer
# Charcoal, 10 bytes

```
βα⪫Ｅ…⁰χＩιω

```

Try it online!

### Explanation

```
β            Lowercase alphabet (implicitly printed)
 α           Uppercase alphabet (implicitly printed)
  ⪫        ω Join by ""
   Ｅ   Ｉι  Map with cast
     …⁰χ     Range from 0 to 10

```
> 0 votes

# Answer
# MathGolf, 12 bytes

```
▄_Äδ☻♥+$♂(Ä└

```

Try it online!

## Explanation

```
▄              lowercase alphabet as string
 _             duplicate TOS
  Äδ           capitalize each letter and push to the stack
    ☻♥+        push 16+32 = 48
       $       pop(48), push ord(48) = "0"
        ♂(     push 10-1 = 9
          Ä    start block of length 1
           └   push TOS+1 without popping (pushes "1"-"9")

```
> 0 votes

# Answer
# !@#$%^&\*()\_+, 43 bytes

```
>^^!(!_++^!!@[_^+)`!(!_++^!!@{_^+)	(!#_^_)#

```

Try it online! Outputs `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz9876543210`.

Perfect language for the challenge. That long space you see is a tab.

```
>^^!(!_++^!!@[_^+)

```

This starts a loop from "A"-1 ("\>" + 2) and continues printing while incrementing up until "\[" ("Z" + 1), printing "A".."Z". Similar for the letters from "a" to "z".

```
	(!#_^_)#
```

The tab has char code 0x09. This is a loop that counts down from 9 to 1, printing them as numbers. Then, 0 is printed, being the last value of the loop iterator.
> 0 votes

# Answer
# Vyxal, 5 bytes

```
«¬`«Ė

```

Try it Online!

```
«¬`«  # (not at all) compressed string 'kr' (constant for alphanumeric values)
    Ė # Evaluate

```
> 0 votes

# Answer
# Zsh, 47 bytes

```
__=({$?..\{})
__=${__//[:-@[-\`\{]}
<<<${__// }

```

Attempt This Online!

Store the range of characters between `0` (obtained as `$?`) and `}` into `$__`, then removes all the special characters in between (`:` to `@`, `[` to ```, and `{`), and finally removes all the spaces (effectively joining the array)
> 0 votes

---
Tags: code-golf, string, kolmogorov-complexity, restricted-source
---