Skip to main content
Share Your Experience: Take the 2024 Developer Survey
38 votes

Letter, Number, Symbol, Space, Repeat

Haskell 300 bytes This code should have no trailing newline. The function m1 takes the input as a Char and returns the answer ...
Ørjan Johansen's user avatar
30 votes

Write a program that always prints N when it is shifted N times up the ASCII alphabet

Ook!, 95 programs, 19992 14066 bytes ...
Sp3000's user avatar
  • 61.8k
27 votes

When I grow up I want to be ASCII

JavaScript (Node.js), 39 bytes A port of my CP-1610 answer. I/O format: a Unicode code point. n=>n>>7?Buffer("ACEIOOU")[n/4&7]^n&32:n ...
Arnauld's user avatar
  • 193k
26 votes

Print every printable ASCII character without using it

Python 2, 1075 1065 1043 1040 1039 bytes Each program has the form print'\<octal char code>', except: ' → ...
Copper's user avatar
  • 3,930
22 votes

Print every printable ASCII character without using it

CJam, 269 bytes Each of the programs are in the form '<char - 1>) except for: Space => S, 1 byte ...
xenia's user avatar
  • 8,142
20 votes

Square and square

JavaScript (ES6), N = 5 With a leading newline instead of a trailing newline. alert ((a=` `+!!0 )+a+a +a+a) JavaScript (ES6), N = 6 ...
darrylyeo's user avatar
  • 7,897
20 votes

When I grow up I want to be ASCII

PHP, 42 39 34 bytes <?=iconv('','us//TRANSLIT',$argn); -3 Bytes thanks to @Neil Try it online!
Oxgeba's user avatar
  • 301
19 votes

Map inputted ASCII characters

JavaScript (ES6) + HTML, 114 + 16 = 130 bytes Saved 16 bytes thanks to @Shaggy ...
ETHproductions's user avatar
17 votes

Print the ASCII Code page

Python 3, 42 bytes print(('%c'*16+'\n')*6%(*range(32,127),9)) Try it online! Includes a trailing tab on the last line and a trailing newline.
xnor's user avatar
  • 145k
16 votes

Map inputted ASCII characters

QBasic 4.5, 81 85 bytes Added 4 bytes to comply with the spacing-rule. DO LOCATE 7,1 LINE INPUT A$:i=ASC(A$) LOCATE i\16-1,(i MOD 16+1)*2 ?CHR$(i) LOOP And the ...
steenbergh's user avatar
  • 8,094
15 votes

Print the ASCII Code page

Python 3, 52 bytes for i in range(95):print(chr(i+32),end='\n'[~i%16:]) Try it online!
tsh's user avatar
  • 34.9k
15 votes

Output a Latin square with a program which is a Latin square

C89 (using implicit int), 811 bytes (\$ n = 28 \$) ...
anatolyg's user avatar
  • 13.7k
14 votes

Print every printable ASCII character without using it

Brainfuck, 1770 1710 1703 1686 bytes 60 bytes saved by Dennis 17 bytes saved by Sp3000 DNP: 46 (.) ...
betseg's user avatar
  • 8,733
14 votes

Letter, Number, Symbol, Space, Repeat

Retina, 113 bytes Letter, Number, Space, Symbol, Repeat ...
Leo's user avatar
  • 12.7k
13 votes

Print every printable ASCII character without using it

ASCII constrained x86 Machine Code for DOS, 3104 3101 2913 bytes Well... It's shorter than Java, I guess... 32 30 bytes for almost all characters, for exceptions see below. Most of the time it just ...
Michael Ehrenreich's user avatar
12 votes

Visualize nested array

APL, 32 bytes {1=≡⍺:⎕←⍺,⍨⍵↑1↓⍵/'->'⋄⍺∇¨⍵+1}∘0 Test: ...
marinus's user avatar
  • 31.2k
12 votes

Draw an ASCII Grid

Python 3, 49 bytes lambda n:f'\n{"--+"*~-n}--\n'.join([' |'*~-n]*n) Try it online!
dingledooper's user avatar
  • 22.7k
12 votes

Print the ASCII Code page

Prelude, 50 42 bytes 88+ 6(1-) v^^( 1-++!)^6-!) 1- v+(1-) v(1- Try it online! Explanation 88+ 6(1-) 1- v+ Push \$16\$ to ...
Dingus's user avatar
  • 11.2k
12 votes

Output a Latin square with a program which is a Latin square

APL (Dyalog Unicode), 109 bytes Full program that prints to stdout. ...
Adám's user avatar
  • 30.3k
11 votes

Print every printable ASCII character without using it

Java 8, 6798 6582 6577 bytes sigh This is basically a port of my Python 2 answer, but with all the boilerplate that comes with writing a full program in Java. Now without any DNPs at all! Thanks, ...
Copper's user avatar
  • 3,930
11 votes

Letter, Number, Symbol, Space, Repeat

Cardinal 2240 2224 bytes Template used LSNW ...
fəˈnɛtɪk's user avatar
  • 4,194
11 votes
Accepted

Make a flag wave

05AB1E, 25 23 26 25 bytes -2 thanks to Adnan -1 thanks to Emigna +3 thanks to Jonathan Allan (thanks for spending the time to catch that invalidity!) ...
Magic Octopus Urn's user avatar
11 votes

When I grow up I want to be ASCII

JavaScript (Node.js), 22 bytes s=>s.normalize`NFD`[0] Try it online! save 2 bytes, thanks Arnauld.
tsh's user avatar
  • 34.9k
11 votes

When I grow up I want to be ASCII

T-SQL, 35 33 bytes SELECT v COLLATE Greek_BIN FROM t Input is taken from a pre-existing table t with CHAR(1) column v, per our ...
BradC's user avatar
  • 6,787
11 votes
Accepted

Quines that print what their index is

Deorst, 1 byte Try it online! Commentator, 1 byte Try it online! Snails, 1 byte ...
dingledooper's user avatar
  • 22.7k
10 votes

Print every printable ASCII character without using it

MATL, 305, 302, 300 297 bytes Every single program looks like this: 33c 34c 35c .... Except for Digits. Here are the programs for 0-9: ...
DJMcMayhem's user avatar
  • 59.2k
10 votes

Take the square root of a string

sh + coreutils, 58 bytes tr '$%&)+0389:>CDGLMQVW]`bjpqu' 1u.#:BFO%+M/L2Aa,795d0@H=C Try it online! The modular square root is typically not unique; we ...
Anders Kaseorg's user avatar
10 votes

When I grow up I want to be ASCII

iconv, 21 20 bytes iconv -tus//TRANSLIT Try it online! Link includes test suite. Edit: Thanks to @NahuelFouilleul for a 1 byte saving. Port of @Oxgeba's PHP ...
Neil's user avatar
  • 171k
10 votes

When I grow up I want to be ASCII

05AB1E (legacy), 24 23 22 bytes žy›i•M¦>á•₂вI28&èI96&+ -2 bytes thanks to @Grimmy. I/O as unicode codepoint. Try it online. Explanation: ...
Kevin Cruijssen's user avatar
10 votes

Print the ASCII Code page

Zsh, 26 bytes printf %s {\ ..~}|fold -16 Attempt This Online!
pxeger's user avatar
  • 23.8k

Only top scored, non community-wiki answers of a minimum length are eligible