| Bytes | Lang | Time | Link |
|---|---|---|---|
| 003 | Jalapeño | 250323T222349Z | ATaco |
| 011 | AWK | 250323T022752Z | xrs |
| 008 | ☾ | 250322T163847Z | noodle p |
| 009 | Uiua | 250322T163729Z | noodle p |
| 031 | SAKO | 250322T161237Z | Acrimori |
| 300 | Bespoke | 250120T030705Z | Josiah W |
| nan | Piet + asciipiet | 220415T065504Z | Bubbler |
| 010 | StackCell | 230603T184942Z | Starwort |
| 003 | Thunno 2 | 230603T181738Z | The Thon |
| 005 | Stax | 230404T140004Z | emirps |
| 009 | ><> Fish | 230402T162849Z | The Thon |
| 054 | Zalgo | 230404T010555Z | Bubbler |
| 009 | ><> | 230404T003226Z | Bubbler |
| 016 | Forth gforth | 230402T220752Z | allisonl |
| 001 | Code Beautify Number to Word Converter | 230402T175812Z | The Empt |
| 005 | vemf | 230327T183825Z | mí |
| 009 | Befunge98 PyFunge | 230329T231259Z | yeah ok |
| 052 | Aheui esotope | 230328T055553Z | Bubbler |
| 040 | Go | 230328T174434Z | bigyihsu |
| 080 | FerNANDo | 230328T162904Z | AlephSqu |
| 015 | Julia 1.0 | 230328T160453Z | Ashlin H |
| 003 | Vyxal | 230327T214646Z | lyxal |
| 010 | Nim | 230327T194305Z | xigoi |
| 010 | Z80Golf | 230327T192310Z | lynn |
| nan | 230327T191612Z | The Thon | |
| 005 | Rattle | 210819T143657Z | d01 |
| 011 | Minecraft Command Blocks | 220515T214143Z | LostXOR |
| 078 | EEL 78 Bytes | 220515T210655Z | user1117 |
| 006 | tinylisp | 220417T204344Z | des54321 |
| 030 | Emmental | 220415T221045Z | Ohentis |
| 012 | rusty_deque | 220415T211325Z | bigyihsu |
| nan | Wolfram Language/Mathematica | 220415T184751Z | Romanp |
| 005 | TIBasic | 220415T144734Z | Youserna |
| 008 | International Phonetic Esoteric Language | 200916T033044Z | bigyihsu |
| 009 | Cascade | 210817T212129Z | emanresu |
| 009 | Factor | 220415T075645Z | chunes |
| 160 | Taxi | 191022T145131Z | Engineer |
| 010 | Red | 210601T155303Z | Aaroneou |
| 020 | AWK | 210525T142346Z | Pedro Ma |
| 004 | Barrel | 210525T104948Z | LorenDB |
| 003 | Vyxal | 210525T053841Z | wasif |
| 016 | 8086 DOS .COM file | 210525T012734Z | EasyasPi |
| 005 | 05AB1E | 210524T231123Z | Dylan Mi |
| 003 | Vyxal | 210524T144823Z | Aaroneou |
| 070 | Java 8 full program | 191021T113656Z | Kevin Cr |
| 006 | Zsh | 210524T115925Z | pxeger |
| 006 | Knight | 210524T050343Z | EasyasPi |
| 032 | Duocentehexaquinquagesimal | 210518T200731Z | Makonede |
| 004 | Japt | 210406T102659Z | Etheryte |
| 005 | BRASCA | 210406T072642Z | SjoerdPe |
| 606 | Pxem | 210406T051300Z | user1004 |
| 030 | StupidStackLanguage | 200923T001938Z | Lebster |
| 600 | VTFF | 200922T180408Z | Ethan Ch |
| 030 | naz | 200921T201824Z | sporebal |
| 050 | Turing Machine Code | 191019T150626Z | ouflak |
| 030 | MAWP | 200916T034037Z | Razetime |
| 006 | Pip | 200916T033327Z | Razetime |
| 064 | C# .NET Core | 191019T235951Z | Hand-E-F |
| 004 | Charcoal | 191219T121754Z | mabel |
| 006 | Underload | 191215T005834Z | Madison |
| 800 | Shakespeare Programming Language | 191025T123911Z | Hello Go |
| 005 | W | 191027T112314Z | user8505 |
| 006 | APL Dyalog Unicode | 191020T044505Z | Sherlock |
| 006 | Hexagony | 191104T081534Z | Bubbler |
| 030 | Malbolge | 191104T023041Z | ceilingc |
| 009 | Tcl | 191025T141903Z | Patrick |
| 006 | Runic Enchantments | 191025T204228Z | Draco18s |
| 005 | Gaia | 191025T131852Z | Business |
| nan | 191025T100344Z | trolley8 | |
| 009 | Hexagony | 191024T070736Z | boboquac |
| 018 | C# Visual C# Interactive Compiler | 191024T062004Z | pocki_c |
| 020 | Python | 191023T035634Z | yarr33 |
| 060 | Whitespace | 191021T122322Z | Kevin Cr |
| 030 | Lost | 191021T130024Z | Kevin Cr |
| 029 | C gcc | 191023T013909Z | S.S. Ann |
| 021 | Inform 7 | 191022T163231Z | Draconis |
| 010 | TSQL | 191021T170829Z | JuanCa |
| 050 | Pepe | 191022T155934Z | RedClove |
| 080 | Hexadecimal Stacking PseudoAssembly Language | 191022T110203Z | Dorian |
| 006 | dc | 191022T103155Z | Radovan |
| 004 | cat | 191022T102842Z | Stack Ex |
| 004 | Excel | 191021T082700Z | Wernisch |
| 005 | Erlang | 191022T063050Z | Yuri Gin |
| 090 | Piet | 191022T034657Z | gastropn |
| 020 | Cubix | 191021T205118Z | MickyT |
| 006 | R | 191021T133138Z | Leonhard |
| 009 | Perl 5 | 191021T140045Z | Chris |
| nan | Commodore BASIC TheC64/Mini | 191021T115324Z | Shaun Be |
| 018 | Ceylon Web IDE | 191020T230608Z | Paŭlo Eb |
| 009 | Ruby | 191020T213258Z | G B |
| 006 | PowerShell | 191020T213127Z | gastropn |
| 003 | Husk | 191020T205849Z | Fyr |
| 009 | Bash | 191019T172736Z | Paul-B98 |
| 080 | BrainFlak | 191020T143211Z | Wheat Wi |
| 006 | MSM | 191020T082743Z | nimi |
| 003 | Google Translate | 191020T131836Z | Nat |
| 006 | GolfScript | 191019T142647Z | user8505 |
| 005 | Pyth | 191020T092157Z | trillian |
| 015 | SWIProlog | 191020T091224Z | anderium |
| 800 | COW | 191020T080527Z | Night2 |
| 010 | R | 191020T074858Z | Robin Ry |
| 030 | bit** | 191020T072603Z | Night2 |
| 400 | Poetic | 191020T015151Z | JosiahRy |
| 005 | Scheme | 191020T004638Z | SYZYGY-D |
| 003 | Keg | 191019T133725Z | user8505 |
| 009 | Cascade | 191020T000008Z | Jo King |
| 006 | Backhand | 191019T234810Z | Jo King |
| 020 | C gcc | 191019T204048Z | GammaFun |
| 004 | Japt | 191019T213707Z | Shaggy |
| 030 | CSS | 191019T134405Z | Night2 |
| 010 | JavaScript | 191019T133643Z | rydwolf |
| 018 | Emoji | 191019T153019Z | Night2 |
| 040 | brainfuck | 191019T184243Z | Level Ri |
| 090 | Brainf*** | 191019T183537Z | HiddenBa |
| 010 | Lua | 191019T182505Z | 12Me21 |
| 006 | BASIC | 191019T182256Z | 12Me21 |
| 040 | Malbolge | 191019T170958Z | dingledo |
| 006 | Zsh | 191019T165932Z | GammaFun |
| 003 | 05AB1E legacy | 191019T162902Z | AZTECCO |
| 005 | Japt | 191019T155201Z | AZTECCO |
| 010 | Batch | 191019T151119Z | Neil |
| 005 | Retina 0.8.2 | 191019T150730Z | Neil |
| 004 | ink | 191019T145755Z | Sara J |
| 016 | Lua | 191019T145718Z | ouflak |
| 010 | Labyrinth | 191019T141158Z | Jonathan |
| 010 | Red | 191019T142254Z | Galen Iv |
| 002 | MathGolf | 191019T140210Z | user8505 |
| 015 | Python 3 | 191019T140128Z | Jonathan |
| 006 | Ruby | 191019T135848Z | user8505 |
| 016 | Python 3 | 191019T135427Z | hyperneu |
| 003 | SOGL V0.12 | 191019T135351Z | the defa |
| 010 | Python 2 | 191019T135332Z | Jonathan |
| 004 | Jelly | 191019T134546Z | Jonathan |
| 004 | PHP | 191019T133851Z | Night2 |
Jalapeño, 3 bytes
◹⇥₀„
Prints four
Hex-Dump of Bytecode
0 1 2 3 4 5 6 7 8 9 A B C D E F
0000: 73 dd 22
In a funny mirror of the Google Translate Answer, Jalapeño has a few multi-character byte representations. In this case, Hex 0xDD is represented by the glyphs ⇥₀. As such, the source code is four characters, but only 3 bytes.
☾, 8 bytes
(but 6 characters)
☾"six"
Uiua, 9 bytes
&p "nine"
(the space isn't needed, just to make the code 9 chars)
Bespoke, 300 bytes
Some characters did go inside software
You got a programmer a job to estimate
It goes out to tHRee and to HuNDReD
Confused, you say "I-I believe how it printed is not so bad"
In your defense, it never is easy for my computer to run
It clearly is one bad P.C.
Though Bespoke program counts it in full!
Outputs tHRee HuNDReD.
This is 100 bytes better than my Poetic solution. Does that mean Bespoke is 100 times better than Poetic? You be the judge.
Piet + ascii-piet, 40 bytes (3×14=42 codels)
ttllldabknmEmqusbeeeeeute_rbacqtuljvff ?
Prints FORTY. A fantastic use case of a white trap :) Also I like the fact that the program is packed so perfectly.
How it works
A classic 3-row layout with a 1 DP+ at the left edge.
Commands Stack
2 3 dup dup * [2 3 9]
dup dup 1 - * [2 3 9 72]
2 - [2 3 9 70] Setup the stack so that repeatedly adding and
printing gives FORT
dup outC + dup outC +
dup 1 DP+ outC + dup outC
[84] Print FORT, turning right at R2C1
> [84] No-op (stack underflow) to take care of the crossing
5 + outC [] Finally print Y
Piet + ascii-piet, 50 bytes (4×13=52 codels)
ttttliametf M tt iillldedMnjlvjcfll i Mkmuuljcbjjj
Prints fifty. Not sure if I can do 40, but I guess pretty much unlikely.
How it works
The execution path: First row -> (turn right) -> 3rd-to-last column -> (turn right) -> last row in reverse -> (turn right twice) -> 3rd row -> transfer to 2nd row at the red 5 block -> end.
...>>>>>>>v X
.. ....>>+>X
>>>>>>>.. v X
^<<<<<<<<..
Commands:
Commands Stack
6 dup 3 * 1 - * [102] Push 102 ('f')
dup outC [102] Print 'f'
dup 3 + outC [102] Print 'i' (= 'f' + 3)
dup outC [102] Print 'f'
2 dup dup + [102 2 4]
dup * - - [116] Add 14 to 'f' (= 't')
dup outC [116] Print 't'
5 inC + outC [] Add 5 and print 'y'
(inC is ignored; it is to reuse the crossing purple cell)
StackCell, 10 bytes
"net":[;:]
Explanation:
"net": Push the letters 'n', 'e', and 't' to the stack:: Duplicate the top element of the stack ('t')[: Consume the top element of the stack, and if zero jump to the next]in the source;: Consume and print the top element of the stack ('t' on the first iteration, then 'e', then 'n'):: Duplicate the top element of the stack ('e' on the first iteration, 'n' on the second iteration, and 0 on the third iteration)]: Consume the top element of the stack, and if non-zero jump to the previous[in the source
Zalgo, 54 bytes
t̝̐̄̇h̝̐̈̆i̝̐̉̆r̝̐̂̇t̝̐̄̇y̝̐̉̇
Escaped with each cluster per line:
t\u031d\u0310\u0304\u0307
h\u031d\u0310\u0308\u0306
i\u031d\u0310\u0309\u0306
r\u031d\u0310\u0302\u0307
t\u031d\u0310\u0304\u0307
y\u031d\u0310\u0309\u0307
Prints thirty. Pushing a constant and printing takes 4 characters, and the first number whose length in English is strictly smaller than 1/4 of its value is 30. For stylistic reasons, each grapheme cluster in this code prints its root character (e.g. t̝̐̄̇ prints t). Python code used to generate the source.
Zalgo, 25 bytes, 1 grapheme cluster
I̝̝̝̐̏̆̐̎̆̐̅̆
Escaped:
I\u031d\u031d\u031d\u0310\u030f\u0306\u0310\u030e\u0306\u0310\u0305\u0306
Prints one. Validity of this answer depends on the definition of "character" in this challenge. Python code used to generate the source.
Forth (gforth), 16 bytes
S" sixteen" TELL
I tried doing ." <number>" but that didn't line up with anything under 20. I guess I could have padded with whitespace or a 0 DROP or something but that feels like cheating. Also this should work with any sane forth, not just gforth.
Befunge-98 (PyFunge), 9 bytes
"NINE,,@#
Explanation
" Start stringmode
NINE,,@# Push "NINE,,@#", wrap to left
" End stringmode
N Reflect (no fingerprint loaded)
" Start stringmode, wrap to right
NINE,,@# Push "#@,,ENIN"
" End stringmode, wrap to right
@# Jump over halt
,, Print "NI"
E Reflect
,, Print "NE"
@ Halt
Slightly different (maybe nicer) solution
"Nine@,k3
Instead of bouncing back and forth over ,,, this just iterates it with 3k,. Also allows the subjectively nicer "Nine" instead of "NINE".
Aheui (esotope), 52 bytes
발밦밞발밞다받받밞밞따댜먛뻐더희xxxx
Contains 20 chars (16 hangul and 4 unused ascii) and prints TWenty. 19 seems to be out of reach. NINTeen barely fits, but the correct spelling of 19 is "nineteen".
밞바밣밞다밦발바발타밞밞따받탸먛뻐더희
Aheui (esotope), 40 bytes, solves for bytes instead
발박받밞밝발박따땨먛뻐더희
Prints FORTY. The strictly increasing nature of FORTY is useful again.
Each Hangul character costs 3 bytes, so 40 bytes can fit 13 chars and a newline. Luckily FORTY can be printed in exactly 13 chars (4 for charcode differences, 5 for the value 70, 3 for "dup; print; add" loop, and 1 for halt).
발박받밞 Push 5, 2, 3, 9
밝발박따따 Push 70 (7 * 5 * 2)
빠맣다 Loop: dup; print as char; add
Break when add fails
희 Halt
Go, 45 40 bytes, to STDERR
package main
func main(){print("forty")}
- -5 bytes for using
forty, by @The Thonnu
Go, 59 bytes, to STDOUT
package main
import."fmt"
func main(){
Print("fifty nine")}
An extra character is needed here (in this case a newline on line 3) because if it is not, then the byte count cycles between fifty eight (59 bytes) and fifty nine (58 bytes).
FerNANDo, 80 bytes
1 1
01
10 01
0 1 1 0 01 10 0 10
0 1 1 01 10 01 0 10
0 1 1 01 01 10 10 1
01 01
01
Loops twice, printing "eig" on the first loop and "hty" on the second. Coincidentally, using the two-character names 01 and 10 increased the code to exactly the right length.
Z80Golf, 10 bytes
00000000: 3e74 ff3e 65ff 3e6e ff76 >t.>e.>n.v
ld a, 't'
rst 38h
ld a, 'e'
rst 38h
ld a, 'n'
rst 38h
halt
Rattle, 5 bytes
five|
This is pretty simple - it takes "five" as a variable then outputs it implicitly
Minecraft Command Blocks, 11 bytes
w @a eleven
Whispers eleven to every player
If @ whispers to you: is not allowed
tellraw @a "twenty four"
outputs just twenty four and is 24 bytes.
EEL - 78 Bytes
=83 !>=69 !>=86 !>=69 !>=78 !>=84 !>=89 !>=32 !>=69 !>=73 !>=71 !>=72 !>=84
Explanation
EEL (Easy Esoteric Lang) is an esoteric programming language created by me, easy to manage, hence the name. Below is a brief description of the language.
.-EEL is based on a vector of bytes initialized to zero, on which basic arithmetic operations can be performed, whose length is equal to 64Kb.
.-EEL allows the reading and writing of one byte at a time in the form of an ASCII character in the standard input and output respectively.
.-EEL has a brief help section which can be viewed from the interpreter.
.-EEL is extremely sensitive, so a wrong input byte can cause a wrong output.
.-EEL does not have an error/exception handling system, so it may crash unexpectedly if a fatal error such as division by zero occurs.
Defined operations:
=000 -> Copy the value of number 000 to the current byte.
+000 -> Add to the current byte, the value of number 000.
-000 -> Subtract to the current byte, the value of number 000.
*000 -> Multiply to the current byte, the value of number 000.
/000 -> Divide to the current byte, the value of number 000 (cannot be zero).
%000 -> Calculate the modulo of the current byte and the value of number 000 (cannot be zero).
> -> Go to the next byte of the vector.
< -> Go to the previous byte of the vector.
? -> Read a ASCII character from STDIN and assign it to current byte.
! -> Write to current byte in STDOUT as an ASCII character.
: -> Open/close the space for comments.
. -> Exit the program.
$ -> Reference to current byte.
NOTES:
The 000 number can be s current byte reference operator ($).
The 000 number (x) must be an integer number, such 0 < x <= 255.
There must be a space character u+0020 after each number 000.
tinylisp, 6 bytes
Very simple solution, (q quotes the name after it to prevent it from being evaluated, the parentheses are implicitly closed at the end of the line, and the result of the top-level statement is implicitly outputted,
(q six
rusty_deque, 12 bytes
"twelve"~ol~
Wolfram Language/Mathematica, Multiple Solutions, Bytes vary
four
"seven"
Print@"fifteen"
Echo@"fifteen";
Text[+"sixteen"]
FromCharacterCode@{70,105,102,116,121,32,70,73,118,101}
All of these work and are quite trivial, except for the last one, which actually took a bit of thought.
TI-Basic, 5 bytes
"FIVE
Also works with "SEVEN".
Taxi, 164 160 bytes
"One hundred sixty" is waiting at Writer's Depot.
Go to Writer's Depot: w 1 r 3 l 2 l.
Pickup a passenger going to Post Office.
Go to Post Office:n 1 r 2 r 1 l.
This also throws an error because I don't return the taxi to the garage so my boss fires me. It's not a requirement to not throw errors, though, so I guess I'm fired.
Barrel, 4 bytes
four
Implicitly prints the unknown instructions "four". However, this could potentially be voided by later modifications, so here's a safe 5-byter that uses a string:
'five
8086 DOS .COM file, 16 bytes
Hexdump:
0CD5:0100 B4 09 BA 08 01 CD 21 C3-73 69 78 74 65 65 6E 24 ......!.sixteen$
Assembly source:
// NASM syntax with C comments because no SE highlighting
[org 0x100]
section .text
global start
start:
// int 21:09: write $-terminated string in ds:dx
mov ah, 0x09
mov dx, str
int 0x21
// exit
ret
str:
db "sixteen$"
8086 DOS .COM file, dirty exit, 10 bytes
This one prints "ten" and then does whatever, likely in the form of a crash.
0CD5:0100 B4 09 BA 07 01 CD 21 74-65 6E ......!ten
// NASM syntax with C comments because no SE highlighting
[org 0x100]
section .text
global start
start:
// int 21:09: write $-terminated string in ds:dx
// but it prints even if it isn't $-terminated so why bother?
// It's real mode, it'll find a $ eventually™
mov ah, 0x09
mov dx, str
int 0x21
// exit
// jk
str: // not $ terminated
db "ten"
Java 8 (full program), 75 70 bytes
interface M{static void main(String[]a){System.out.print("seventy");}}
-5 bytes thanks to @CommandMaster.
Java 8 (lambda function), 9 bytes
v->"nine"
Java 5/6 (full program), 40 bytes
enum M{A;{System.out.print("forty");}}//
No online compiler, because I don't know any for Java 5 or 6..
The trailing // are no-ops, but outputting forty is shorter.
Japt, 4 bytes
Lucked out that the string compression found anything to compress in one of the smaller numbers.
`f r
` // Decompress compressed string
f r // Compressed string literal for "four"
BRASCA, 5 bytes
`five
Explanation
`five - Push "five" on the stack, char by char
<implicit> - Print the stack, reversed
Pxem, Filename: 6 bytes + Content: 0 bytes = 6 bytes.
- Filename:
six.px - Content is empty.
Sorry for a boring post.
StupidStackLanguage, 55 30 bytes
avvdqvdmdfwwddfifvvdfiifvfaaaa
I found this by generating a list of numbers 1 - 100 as words, and then mapping said array with my StupidStackLanguage printing algorithm to generate an array of number printing programs. I then padded each program in the array with meaningless a characters until the number of characters it had equalled it's position in the array. Then, I just found the first program which had the same length as the number it printed.
VTFF, 1524 600 bytes
-924 bytes thanks to Jo King
New answer:
Readable version:
VVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVFVFVFVVVVVVVVVVVVFVFVFVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVV
For info on how the lang works, I can't be bothered to rewrite it all, so see the old answer:
Those bytes can be seen in the source code of this answer. They could be earlier, but they're apparently gone now. Alternatively, here it is with Vertical Tab characters replaced with Vs and Form Feeds replaced with Fs:
VVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVV
Try it out here by putting the string "ONE THOUSAND FIVE HUNDRED TWENTY FOUR" in "Generate", then copying the output of that into "Interpret".
Explanation: VTFF is a language I found by hitting Random page on the Esolangs wiki a lot. The only characters are the vertical tab (0x0b) and form feed (0x0c), hereafter referred to as just V and F. Each block of V characters separated by F characters represents a number in unary. 32 is then added to that number and it is then converted into a character. This repeats until a string is built. That string is then sent to a JS eval statement, the output of which is the output of the program. Because the positions of out characters on the Unicode code table matter, capital letters are preferable to lowercase ones, because their unary representations are 32 bytes shorter. That said, if it ended up being 32 or 64 low I was happy to sprinkle in some lowercases if need be, but thankfully that didn't turn out to be the case. I obtained this with 15 minutes or so of manual brute forcing, where it quickly became clear that the 1500s would be easiest. If you automated the process, I imagine you could dip into the 1400s. Maybe there's even a really lucky one where you don't need all four digits. "FIVE HUNDRED" comes out at a frustrating 499 characters, for example.
Bonus fact: if you did this in binary VTFF (an imaginary language I just made up where it's just VTFF encoded in binary), you could get this down to just "FOURTY" bytes.
Turing Machine Code, 60 50 bytes
0 _ f r 1
1 _ i r 2
2 _ f r 3
3 _ t r 4
4 _ y r 50
As an added bonus, if that counts for anything, it has the number in the code as well.
Edit: Found a shorter solution which still contains the number of bytes in the code.
C# (.NET Core), 64 bytes
class P{static void Main(){System.Console.Write("sixty four");}}
I had to see what a non-competitive language would score.
Underload, 6 bytes
Try it online!
(six)S
Explanation
(six) Puts the text "six" onto the stack.
S Prints it.
Shakespeare Programming Language, 800 bytes
(Whitespace added for readability)
800 Bytes---- filler.Ajax,.Puck,.Act I:.
Scene I:.[Enter Ajax and Puck]Ajax:
You is the sum ofthe sum ofthe cube ofa big big cat a big big cat a cat.Speak thy.
You is the sum ofyou a big big cat.Speak thy.
You is the sum ofyou a big pig.Speak thy.
You is the sum ofyou a cat.Speak thy.
You is the sum ofyou twice twice the sum ofa big cat a cat.Speak thy.
You big big big big big cat.Speak thy.
You is twice the sum ofyou a big big cat.Remember you.Speak thy.
You is the sum oftwice you the cube ofthe sum ofa big pig a pig.Speak thy.
You is the sum ofyou the sum ofa big big big pig a cat.Speak thy.
Recall.You is the sum ofyou a big big pig.Remember you.Remember you.Speak thy.
You is the sum ofyou twice the sum ofa big big big cat a pig.Speak thy.
Recall.You is the sum ofyou a cat.Speak thy.
Recall.Speak thy.
Prints EIGHT HunDRED. The math to get from one letter to another was very complicated and there was little room for error. This is probably improvable in terms of code, but 700 is most likely impossible. Little improvement saving 2 bytes in the actual code because I missed out on optimizing 2*(4+2) to 2*2*(2+1) for some reason.
W, 5 bytes
five"
Implicitly prepends a quote. In order to specify your input, find prog.py and do this:
read = []
prog = 'five"'
Wren, 26 bytes
Just a method that outputs a string literal.
System.write("twenty six")
APL (Dyalog Unicode), 12 9 6 bytes
Took me a little searching and I don't like requiring the extra spaces, but such are the vagaries of English numbers.
Edit: -3 bytes thanks to Night2. -3 bytes thanks to ngn.
⊢'six'
Try it online! And a slightly different version to get it to work on Try it online!
Hexagony, 6 bytes, 17 cycles
s;i>x@
Now the letters six are in more natural order, and the program finishes one cycle faster.
How it works
For more thorough explanation, see the previous answer below.
A B
C > D
E .
Execution path: ABC>CBAD>ADB.>.CE
^^ ^^ ^^ ^
s; i; x; @
Hexagony, 6 bytes, 18 cycles
x>i;s@
Inspired by boboquack's 9-byte solution. The following quote was a big hint:
I'm slightly disappointed that I couldn't get
sixto work (that would be pushing it with three characters, one output, one redirection and one termination).
How it works (or, How I got to this solution)
A 6-byte program is laid out on a hexagon of side length 2, and the 7th instruction is necessarily a no-op:
? ?
? ? ?
? .
Since I needed at least one mirror, I tried out various mirrors placed at various places, until I found this:
A >
B C D
E .
Assuming the current memory is always positive (and there are no branches/mirrors/IP changers among ABCDE), the IP follows the path
A>ADCB>.CAD>DAC.BE
The cell C is run exactly three times, and the cells right before C are D, B, and A respectively. And the cell E is first run after three runs of C. This is exactly what we want: write one of s, i, or x on the memory and print it, and then terminate!
Now back to the actual source code:
x >
i ; s
@ .
And the execution path, linearized, with significant instructions emphasized:
x>xs;i>.;xs>sx;.i@
^^^ ^ ^^ ^
^^ Print 's'
^ ^ Print 'i'
^^ Print 'x'
^ Terminate
Tcl, 9 bytes
puts nine
prints
nine
Tcl, a lot more bytes (not finished yet) currently 42
this will read the source code counts the characters and convert the number into an actual number word.
content of c.tcl:
puts [string length [read [open c.tcl r]]]
prints:
% 42
Runic Enchantments, 6 bytes
"Six"@
This ended up being both much shorter and much less interesting than I anticipated. 3 bytes are required for syntax, making it impossible to go lower.
Some answers with "production" (i.e. non-golfing) languages still not mentioned here:
C++ (clang), 55 bytes
#include<iostream>
int main(){std::cout<<"fifty five";}
Scala, 23 bytes
println("twenty three")
Haskell, 27 24 bytes
main=putStr"twenty four"
Hexagony, 9 bytes
n;i;@;e\\
I'm slightly disappointed that I couldn't get six to work (that would be pushing it with three characters, one output, one redirection and one termination).
Not How it works
This Hexagony program looks almost like normal code!
n;i;@;e\\
n;i; Pushes n and prints it, then pushes i and prints it
@; Retrieves the bottom of the stack (n) and prints it
e\\ Pushes e and terminates the program, printing implicitly
How it works
Input starts on the blue path, storing the value n then printing it with ;. It picks up the value i, then jumps to the third line where it hits a mirror. This takes it to the diagonal path, reentering the value i then printing it with ;.
From the bottom left corner, since the current value of i is truthy, it jumps to the red stream starting in the top-left corner, taking n then printing it with ;. The two mirrors redirect it and then it jumps to the e. Finally, it jumps from the middle of the bottom edge to the middle of the top edge, printing the e with ; and terminating with @.
Thanks to Timwi for their HexagonyColorer.
Python, 20 bytes
print("twenty")#lol.
hey! that's python code length is actually 20 characters. I know, It's cheating but the comment is still a text.
print("twenty")
prints the number. (15 chars)
#lol.
a useless comment. (5 chars)
so 5+15=20 and 20 is twenty, right?
Whitespace, 151 60 bytes
[S S S T T S N
_Push_6_Y][S S S T N
_Push_1_T][S S S T S T N
_Push_5_X][S S T T S T S N
_Push_-10_I][S S S S S N
_Push_0_S_(with_two_additional_no-op_spaces)[N
S S N
_Create_Label_LOOP][S S S T S T S S T T N
_Push_constant_83][T S S S _Add_top_two][T N
S S _Print_as_character][N
S N
N
_Jump_to_Label_LOOP]
Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try it online (with raw spaces, tabs and new-lines only).
Whopping -91 bytes thanks to @JoKing by using an < instead of == check in my Java program below and adding no-ops.
Shortest program generated with this Java program, which uses the printing approach of this Whitespace tip to output in full uppercase.
Lost, 30 bytes
v<<<<<<<>>>>>>>
>%?"thirt/J"+@
Contains the unprintable character ESC with unicode value 27 after the Thanks to @JoKing getting rid of the unprintable (for the same byte-count).^ on the second line.
Try it online or verify that it's deterministic.
Explanation:
Explanation of the language in general:
Lost is a 2D path-walking language. Most 2D path-walking languages start at the top-left position and travel towards the right by default. Lost is unique however, in that both the start position AND starting direction it travels in is completely random. So making the program deterministic, meaning it will have the same output regardless of where it starts or travels, can be quite tricky.
A Lost program of 2 rows and 5 characters per row can have 40 possible program flows. It can start on any one of the 10 characters in the program, and it can start traveling up/north, down/south, left/west, or right/east.
In Lost you therefore want to lead everything to a starting position, so it'll follow the designed path you want it to. In addition, you'll usually have to clean the stack when it starts somewhere in the middle.
Explanation of the program:
All arrows, including the reflect / in the string, will lead the path towards the leading > on the second line. From there the program flow is as follows:
>: travel in an east/right direction%: Put the safety 'off'. In a Lost program, an@will terminate the program, but only when the safety is 'off'. When the program starts, the safety is always 'on' by default, otherwise a program flow starting at the exit character@would immediately terminate without doing anything. The%will turn this safety 'off', so when we now encounter an@the program will terminate (if the safety is still 'on', the@will be a no-op instead).?: Clean the top value on the stack. In some program flows it's highly likely we have a partial string on the stack, so we use this to wipe the stack clean of that potential string.": Start a string, which means it will push the integer code-points of the characters used.thirt/J: Push the code-points for these characters, being116 104 105 114 116 47 74respectively": We're done pushing code-points of this string+: Add the top two values together: (47+74=)121@: Terminate the program if the safety is 'off' (which it is at this point). After which all the values on the stack will be output implicitly. Using the-Aprogram argument flag, these code-points will be output as characters instead.
Two things to note:
The top part could also have been v<<<<<<<<<<<<<< instead. Lost will wrap around to the other side when moving in a direction. So using v<<<<<<<>>>>>>> could be a slightly shorter path, and since it's the same byte-count anyway, why not use it. :)
Also, the first line contains an additional trailing > to make the byte-count from 29 to 30.
Inform 7, 21 bytes
To q:say 21 in words.
This creates a function which takes no arguments and returns nothing, which prints the word "twenty-one".
Some boilerplate showing how to call the function:
X is a room.
When play begins: q.
Unfortunately, hardcoding the string tends to put me at a number of characters that's harder to print.
T-SQL, 10 bytes
print'ten'
I guess is correct, right? :)
Hexadecimal Stacking Pseudo-Assembly Language, 80 bytes
200079400000200074400000200068400000
200067400000200069400000200045400000
140000
cat, 4 bytes
four
There are plenty of literal "four" answers already, but not one written in cat yet.
Excel, 4 bytes
four
Uninteresting answer, not using a formula.
Excel, 5 bytes
'five
Using a formula, requires at least 3 extra bytes (=, ", ").
Excel, 6 bytes
="six"
Excel, 12 bytes
="tw"&"elve"
=T("twelve")
Excel, 14 bytes
=T("fourteen")
Excel, 16 bytes
=IF(1,"sixteen")
Excel, 18 bytes and upwards
=TRIM(" % ")
Insert required text, padded with required whitespace.
Erlang, 5 bytes
five.
Enter this code at interpreter prompt.
Piet, 90 codels
In pseudo-code:
The characters are pushed onto stack. To save space, their ASCII values minus 100 are stored. When the string is built, a loop pops, adds 100 to, and prints each character to STDOUT.
; Place sentinel 0 on stack
push 1
not
; Place 21 (y) on stack
push 7
push 3
mul
; Place 16 (t) on stack
push 4
dup
mul
; Place 1, 10, 5, 10 (e, n, i, n) on stack
push 1
push 10
push 5
push 10
; Check if top of stack is non-zero
; Place a 1 if it is, a 0 otherwise
dup
not
not
write_loop:
; Turn DP (Direction Pointer) as many steps
; clock-wise as value on top of stack
; If we had a zero on stack, we continue into
; the yellow area and get trapped, ending execution
pointer
; If not, we continue
; Add 100 to top of stack
push 5
push 4
push 5
mul
mul
add
; Pop and print character
outc
; Turn DP one step to the right
push 1
pointer
dup
not
not
; Check if top of stack is non-zero
; Place a 1 if it is, a 0 otherwise
dup
not
not
; We're now back at beginning of the writing loop, sort of like a jmp write_loop
Cubix, 20 bytes
/o;."uytnewT.p^@!<..
This wraps onto the cube as follows
/ o
; .
" u y t n e w T
. p ^ @ ! < . .
. .
. .
"uytnewTopen string and start pushing uytnewT onto the stack"uclose the string and u-turn onto the lower linepbring the bottom of the stack to the top<!beginning of the print loop and test for 0@halt if tested 0^y;/oeredirect up, no-op, pop TOS, reflect right, output character, no-op and then onto the beginning of the print loop
R, 7 6 bytes
"six" #space before the text
Previously:
"seven"
Commodore BASIC (TheC64/Mini, C64/128, VIC-20, PET, C16/+4) 25 tokenised and BASIC bytes
0 print"seventeen
I could use the abbreviated ? but when listed the program will show the full print keyword. In any case it would make no difference to the byte count as ? and print use the same number of BASIC tokens.
Ceylon (Web IDE), 18 bytes
The Ceylon Web IDE allows to omit all the boilerplate which makes up a normal program, so we can use just the actual print statement:
print("eighteen");
Ceylon (with run function), 30 bytes
void run() { print("thirty");}
Brain-Flak, 80 bytes
((((((((()()()())))((({({}){}}()){}){}()))[[]])())[][][])[]){({}<>)<>}<>........
The code to push eighty is 72 bytes and we add an extra 8 bytes to bring it to the correct amount.
Brain-Flak, 80 bytes
(((())()()()())((([]())())[][][])){({}(([]([]<>[])[]{}()){}){})<>}<>............
This version pushes EIGHTY and requires 12 bytes of padding.
MSM, 11 9 6 bytes
xsi/..
The 3 letters are pushed on the stack, / swaps s and i to get the correct (reverse) order and the two 3 dots concatenate them to a single string. There are variants such as '.xis. or ?..xis.
Edit: -3 bytes thanks to @Night2
Google Translate (3 bytes)
一
It's the Chinese character for "one" (matching the number of characters in the source code), though the score's due to the character itself being 3 bytes.
Google Translate (3 bytes)
tre
It's Italian for "three".
Pyth, 5 bytes
"five
I don't think it's possible to get shorter than this. The overhead for compressed strings is 4 bytes already, so it's impossible to also get a 4-byte message in it.
COW, 800 bytes
MoO!!
MoO MoO!!
MoO MoO MoO!!
MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MMM MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO Moo MoO MoO MoO MoO Moo MOo MOo!!
Moo MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO Moo MMM Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MOo MOo!!
MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo Moo MMM!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MMM MoO Moo MOo Moo!
Prints EIGHT HUNDRED
R, 10 bytes
cat("ten")
Prints ten. This simple answer is much shorter than all the other options I could think of.
If a bit of fluff around the answer is allowed, we can go with
R, 6 bytes
"six";
which prints [1] "six".
If a lot of fluff is allowed, we could even go with
R, 4 bytes
four
which prints to STDERR Error: object 'four' not found.
Poetic, 400 bytes
Type fourhundred chars? I say, I think I have an angle.
I say "Gosh, could I just go create some poem? Clearly it comes a long way, writing stuff I say."
I compose the entire written poem, and someone reads a tiny, tiny portion.
"Surely, it all is garbage," cried a big fat crybaby.
Would HE frankly notice how many long, tedious hours I took?
The crybaby whined a lot. I watched, then I ignored him.
Prints Four HunDrED. (I tried to make it print some number in the 300s, but I can't seem to do so in under 400 bytes.)
Poetic is an esolang I made in 2018 for a class project. It's basically brainfuck with word-lengths instead of symbols.
Scheme, 5 bytes
This works in any Scheme implementation, but Chicken Scheme is what I used.
'five
EDIT: Alternative 4-byte solution
four outputs this:
Error: unbound variable: four
I think this counts, but if you don't like errors, the above solution is for you.
Keg, 3 bytes
-1 from Jono2906 for reminding me the string compression
2 can play the 3 byte game!
‘0⅀
Old answer, 4 bytes
You can't get shorter than 4. (Without using string compression of course.) 4 is the smallest English word that is the same length as the number it represents.
Just some good old-fashioned Ascii/auto-pushing Keg golfing!
four
Explanation
four# Push 4 onto the stack
#Implicit Print
CSS, 30 bytes
body::after{content:'thirty';}
CSS (Google Chrome only), 26 bytes
This should be saved in an empty file between <style> and </style> tag, doesn't work on FireFox or Stack Exchange's code snippets. Tested on Windows Chrome 77.
:after{content:'twenty six
JavaScript, 16 10 bytes
-6 each from Night2's suggestion in the comments
Try it online! (alert doesn't work in TIO, so I'm using print)
alert`ten`
Javascript, 26 20 bytes
console.log`twenty`;
brainfuck, 40 bytes
+[+++++>++<]>.+++++++++.+++.++.+++++.+++
The last three characters don't actually do anything useful, but it's easier to output forty than thirty seven.
The ascii code for f is 102, which is 2/5 of 255, found by the initial loop. After that, all the characters in the output just happen to be in ascending alphabetical order.
Brainf***, 90 bytes
+[+[>>+<+<-]>]>[>+>+>+>+>+>+<<<<<<-]>.>-----.>.>---------.>++++++.>+++++++++++.<+><><><><>
Lua, 10 bytes
print"ten"
Also works in many BASIC dialects that don't have a ? shortcut for PRINT
BASIC, 6 bytes
?"SIX"
(Specifically tested in SmileBASIC: should work in most dialects, though ? is often expanded to PRINT, I think it's usually still stored as one byte)
Malbolge, 40 bytes
(CB%#9]~}5:3Wyw/4-Qrqq.'&Jkj(h~%|Bd.-==;
Batch, 10 bytes
@ echo ten
If you think the extra space after the @ is ugly, the next possible answer is:
@echo twelve
Retina 0.8.2, 5 bytes
five
Try it online! Simply substitutes the empty input with the word five, which is the first word to have one fewer letter than its value.
Labyrinth, 10 bytes
84.69.78.@
How?
- initially the main stack contains infinite zeros [0,0,0,...]
8 - multiply the top of the stack by ten and add eight [8,0,0,...]
4 - multiply the top of the stack by ten and add four [84,0,0,...]
. - pop, mod 256, print character T
6 - multiply the top of the stack by ten and add six [6,0,0,...]
9 - multiply the top of the stack by ten and add nine [69,0,0,...]
. - pop, mod 256, print character E
7 - multiply the top of the stack by ten and add seven [7,0,0,...]
8 - multiply the top of the stack by ten and add eight [78,0,0,...]
. - pop, mod 256, print character N
@ - exit
MathGolf, 2 bytes
Well, MathGolf has a string compression library that seems to compress "two" to 1 byte. You need a command to decompress this.
╩_
SOGL V0.12, 3 bytes
Well, SOGL has a string compression library that seems to compress "three" to 3 bytes.
@0‘




