g | x | w | all
Bytes Lang Time Link
055Bespoke250804T102528ZJosiah W
019JavaScript Node.js250507T140218ZSteve Be
009250322T120844ZJoao-3
025SAKO250322T063346ZAcrimori
013Swift 5.9240317T201710ZmacOSist
056Itr230906T104138Zbsoelch
067COBOL230906T100000ZKai Burg
007Pip230702T173222ZThe Thon
009Desmoslang230530T030705ZDadsdy
005Thunno 2230528T190231ZThe Thon
005Python REPL230330T224350ZGuitarPi
041Pascal230330T001557ZKai Burg
025Go230329T153120ZThe Thon
nan230118T195024ZThe Thon
007Knight220802T100444ZBubbler
007Flobnar220712T092119ZBubbler
010Microscript II220524T124105ZGinger
015Python 3220509T170557ZSapherey
003TIBasic220511T222432ZYouserna
009Zsh220509T070436ZQaziquza
007DipDup220509T062421Zalephalp
115Pyramid Scheme220318T230009Zemanresu
013Pari/GP220121T095452Zalephalp
015Lexurgy220121T062954Zbigyihsu
005GNU dc211104T033531ZPedro Ma
009Ly211002T095132Zcnamejj
067Malbolge211002T082415Zuser1004
053FerNANDo211002T080649Zuser1004
067CLCINTERCAL211002T073647Zuser1004
009Java JDK210908T144142Z0xff
015abcn210908T143436ZEternal
004Jelly210908T125116ZBaby_Boy
007Vyxal210908T111047ZSjoerdPe
013Julia 1.0210818T152057ZMarcMush
013Python 3210818T083312ZStephen
005Vyxal D210818T082250Zemanresu
005BRASCA210413T140204ZSjoerdPe
015Racket210413T131630ZMLavrent
023Scratch210413T130431ZNolan
011Grok210413T122748ZAaroneou
007Width201015T090523ZPkmnQ
013Python 3210409T051509ZRachit A
909Pxem210408T135039Zuser1004
005Husk201015T020840ZLegionMa
029Turing Machine Code200615T132221Zouflak
181Brainetry200613T224635ZRGS
nanIt feels cheaty200613T211344ZCloudy7
0117200612T210659ZPizgenal
024naz200130T050936Zsporebal
005W200130T075106Zuser8505
017AWK200130T043336Zrootbeer
075GolfScript190721T041850Zuser8505
013Python 3191004T120028ZDivy
00505AB1E191004T113022ZDorian
17216502190820T195955Zlee
013Python 3190820T162937ZDat
035x8664 Mac OS190820T155659Zmaviek
021Lost190820T154617ZKevin Cr
nan190820T153459ZKamila S
071C#190820T131646Zcanttalk
005ink190726T203205ZSara J
021C gcc190709T135032Zjdt
029Whitespace190709T144231ZKevin Cr
019Haskell190726T084413ZLaikoni
009Cubix190724T205943ZMickyT
026Bitwise Cyclic Tag But Way Worse190723T121348ZEdgex42
00933190717T201930ZTheOnlyM
005Ohm v2190718T165132ZCinaski
015Pip190718T161340ZKenzie
153Shakespeare Programming Language190717T173608ZRobin Ry
013Python 3190709T164903Zmypetlio
013Python 3190710T113218Zjaaq
009Rust closure190717T095553Zruohola
017C++ clang lambda expression190712T164608Zruohola
011Python 2190715T073852Zhe77789
013MATLAB190710T204115Zaaaaa sa
015Octave190714T121658ZSanchise
447Chef190710T162507Zuser2434
021Boolfuck190712T155514ZEdgex42
009Zsh190713T054750ZGammaFun
005Pyth190712T171112ZSok
009Excel190710T173305Zwilluwon
013F#190712T130458Zdumetrul
009DOS/Windows Batch Language190712T112846Zuser8800
011Python 2190709T134127ZTFeld
075Keg190711T135808Zuser8505
009AsciiDots190711T174307ZDaCoolOn
005Stax190709T150340ZKhuldrae
007SmileBASIC190711T131344Z12Me21
009Bash190710T150728ZWilliam
011Perl 5190711T122655ZChris
027LOLCODE190711T070557ZCharlie
005BitCycle190711T065239ZJo King
011Perl 5190709T202012ZXcali
007Underload190710T210402ZEdgex42
065INTERCAL190709T200549ZUnrelate
011PHP190710T190743ZJohn
025Kotlin190709T135105ZQuinn
009Wolfram Language Mathematica190710T155234Zatt
007PowerShell190709T143830ZVeskah
005Japt190710T124334ZOliver
00505AB1E190709T141126ZKevin Cr
008cQuents190710T104738ZStephen
053MarioLANG190710T102605ZCharlie
061ArnoldC190710T101352ZCharlie
017Grass190709T142105ZRobin Ry
009dc190710T081613Zmanatwor
007PowerShell190710T054246Zmazzy
013Lua190709T164757Zouflak
004AppleScript190709T134157Za stone
013Forth gforth190709T174849Zreffu
004HTML190710T025046Ztsh
007JavaScript190710T020608ZOliver
007Japt190709T175712ZShaggy
119Shakespeare Programming Language190709T230746ZUnrelate
007Charcoal190709T203327ZNeil
004APL Dyalog Unicode190709T160919ZAdá
007Brachylog190709T192950ZUnrelate
013Gema190709T194540Zmanatwor
005Gaia190709T193708ZGiuseppe
011Bash190709T193153ZGrzegorz
009Forth gforth190709T191619Zmbomb007
004HQ9+190709T183140ZHelena
007Runic Enchantments190709T142836ZDraco18s
022Dodos190709T173810ZErik the
017brainfuck190709T151104Zovs
007Retina190709T172255ZNeil
007Retina 0.8.2190709T172013ZNeil
011R190709T165827ZRobin Ry
011BrainFlak190709T163439ZWheat Wi
017Haskell190709T164420ZWheat Wi
2340Lenguage190709T153730ZExpired
004MathGolf190709T145324ZKevin Cr
003PowerShell190709T153000Zjimmy230
003RProgN 2190709T151635Zdzaima
005Jelly190709T135456ZErik the
019SNOBOL4 CSNOBOL4190709T144634ZGiuseppe
009APL Dyalog Unicode190709T145142ZJ. Sall&
007Befunge93190709T144356Zovs
006Ruby190709T143752Zhistocra
011Java 8190709T142104ZKevin Cr
011Elm 0.19190709T141808ZO.O.Bala
009Batch190709T140537ZNeil
009Ruby190709T140107ZG B
007CJam190709T134545ZLuis Men
017Haskell190709T135436ZDamien
009PHP190709T135334ZLuis fel
011JavaScript Babel Node190709T134202ZLuis fel

Bespoke, 55 bytes

#with A-SCII 1, I solved it#such a method is messed up#

Note: # stands in for the unprintable ASCII 1 (SOH).

Outputs three copies of ASCII 1 (SOH). (I had wanted to use ASCII 111 (o) as all three characters, but that turned out to be 4 bytes larger.)

JavaScript (Node.js), 19 bytes

console.log('co;');

Try it online!

JavaScript (SpiderMonkey), 13 bytes

alert ('a()')

Try it online!

, 9 chars


    ☾𝘀𝘀 

Try it here!

Prints two spaces and a newline.

SAKO, 25 bytes

1)TEKST
0S1
STOP1
KONIEC0

Just a basic solution. I had to add 0 at the end to make it odd number of characters.

Swift 5.9, 13 bytes


print (") ")

This is basically a Swift version of this Python answer by @TFeld. Prints the last character ")", the middle character " " (a space), and the first character "\n" (a newline, printed thanks to print(_:separator:terminator:)'s default terminator of "\n").

Itr, 5 characters (6 bytes)

×'×3×

online interpeter

Explanation

×'×3×
×     ; call × on the first two arguments (0 by default) and ignore the result
 '×   ; the character ×
   3× ; repeated 3 times

COBOL, 67 B

The OpenCOBOL implementation does not seem to process non-lines (i. e. a character sequence that is not concluded by a newline character). Therefore the COBOL source code contains a newline character. However, I did not achieve printing a leading newline character (there was a space I could not get rid of). So I extended the source code with some syntactically acceptable junk. The 01 is not followed by a newline character.

000000 PROGRAM-ID.P.PROCEDURE DIVISION.DISPLAY"1I0"NO ADVANCING.
01

Output: 1I0

Pip, 7 bytes


R"R " 

Attempt This Online! (Note the trailing space)

Explanation

\nR"R "   ; Full program
\n        ; No-op
   "R "   ; The string "R "
  R       ; Reversed
          ; No-op
          ; Implicit output
          ; (with newline)

Desmoslang, 9 Bytes

1OOO1ETG1

Outputs 111

Thunno 2, 5 bytes


` rr

Attempt This Online!

Port of Kevin Cruijssen's 05AB1E answer. Prints r \n.

Alternative 5 bytes:


12£1

Attempt This Online!

Port of Kevin Cruijssen's alternative 05AB1E answer. Prints 12\n.

Python REPL, 5 bytes

122-1

yields 121.

This probably works with many other interactive environments as well, but this is the shortest I could think of.

Pascal, 41 characters

NB: Despite appearing that way the source code has no trailing newline:

program p(output);begin write('.gp')end .

Go, 25 bytes

func()string{return"}nf"}

Attempt This Online!

Function which returns a string.

Go, 35 bytes

import."fmt"
func f(){Print("} i")}

Attempt This Online!

Function which prints to STDOUT.

Go, 51 bytes

package main
import."fmt"
func main(){Print(`}
p`)}

Attempt This Online!

Full program which prints to STDOUT.

Thunno, \$7\log_{256}(96)\approx\$ 5.76 bytes



Z" rr

Attempt This Online!

Port of Kevin Cruijssen's 05AB1E answer.

Explanation

\n\nZ" rr  
\n\n       # no-ops
    Z" r   # 2-char string: " r"
        r  # reverse to get "r "
           # implicit output with newline 

Knight, 7 bytes


O"OO"O

Try it online!

Prints OO<newline>.

Whitespace is ignored, O is monadic output function which prints the string "OO" without quotes and a trailing newline, and the last O is ignored because the parsing ends at O"OO".

Knight, 7 bytes


O-1 2-

Try it online!

Prints -1<newline>.

Flobnar, 7 bytes

0..0#@0

Try it online!

The character that is easiest to print is the digit 0. 5 bytes is impossible because it mandates three zero digits and a @ at one of the two positions (2nd or 4th), which makes the program print 0 only once. For 7 bytes, we skip a 0 with # and print zero twice using . (explicit decimal output); the third copy of 0 is produced as the value that @ evalautes to.

Microscript II, 10 bytes

Welcome to Backslash Hell

"\"\\\\\""

I suspect that a shorter version is possible.

Python 3, 15 15 bytes

print("  p")   

Try it online!

Previous answer(Incorrect)

print("pp ")

The answer is no longer pp (◞‸◟)

TI-Basic, 3 bytes

i+1

i represents the imaginary number.

Zsh, 9 bytes

print ptp

Attempt This Online!

DipDup, 7 bytes

a[aaa]a

Try it online!

Pyramid Scheme, 115 bytes

   ^     ^
  / \   / \
 /out\ /out\
^-----^-----
-^   ^-
 -^ ^-
  -^-
  / \
 /chr\
^-----
-^
 -^
 / \
/32 \
-----  

Try it online!

The middle character is the space after the ^ on the fifth line. Prints three spaces.

Pari/GP, 13 bytes

print1(")("p)

Try it online!

Lexurgy, 15 bytes

This was surprisingly difficult. Outputs a>=a.

abc:
*=>a\>\=a

GNU dc, 5 bytes

0p
n0

Try it online!

Pushes 0 to the stack, prints 0 with a new line, prints 0 without a new line and again pushes 0 to the stack.

n is a GNU implementation. Might not work with other versions.

Ly, 9 bytes

'o:oo"'"o

Try it online!

I had some more interesting versions (IMO anyway), but they were longer. :)

 'o         - push "o" on the stack
   :        - duplicate top of stack
    oo      - print both "o" chars
      "'"   - load a doublequote on the stack
         o  - print it

Prints output oo"

Malbolge, 67 bytes

Outputs n D. Eventually I thought a space is really necessary.

D'`_$"\\[||98V6Bu@tOq<.'98*ZjE&fe {Ab~,v*)]xZvonsl2ponmfN+cba`ed]#n

Try it online!

FerNANDo, 53 bytes

Outputs aaa, but is it accepted...?

a a a
z a a z z z z a
z a a z z z z a
z a a z z z z a

Try it online!

CLC-INTERCAL, 67 bytes.

Outputs 1#D. It was difficult to adjest program length. Eventually I decided to do \#9; this caused no side effects.

DO;1<-#9\#9DO;1SUB#1<-#100DO;1SUB#2<-#374DO;1SUB#3<-#276DOREADOUT;1

Copy and paste to try it online!

Java (JDK), 9 bytes

$->"  $" 

Try it online!

abcn, 15 bytes

a120gxgxnba98gx

Explanation :

a120                  --> sets stack at 120
gx                    --> convert to ASCII and print (120 ==> x) as you can see x is last char
gx                    --> convert stack 120 again to ASCII and print `x` mid char (7th) is x 
                      --> as well (a120gxg make 7 and nba98gx make 7 so we print x)
b                     --> stack set to -1 (useless just made so we print x twice and 
                      --> not have to add more bytes)
a98                   --> add to stack 98 (giving us 97)
gx                    --> convert to ASCII and print (97 == a) a is first char

prints xxa which is the right answer

Jelly, 4 bytes

5235

Try it online!

pretty simple, no explination needed

Vyxal, 7 bytes

No flags used.

9 99J₴9

Explanation

9        - Push 9
  99     - Push 99
    J₴   - Concatenate and print
      9  - Pushes another 9, but it never gets used.

Try it Online!

Julia 1.0, 13 bytes

most python answers work with julia too, but here are a couple very julian 13-byters

"s" |>show;""
"t|\""|>print

Try it online!

Python 3, 13 bytes

print( ') p')

The last character is ')', the middle is number 7, a space and the first is the letter 'p'.

Vyxal D, 5 bytes


 ‛‛‛

Try it Online!

Note the trailing space and newline.

Simply pushes ‛‛, and prints with trailing newline.

BRASCA, 5 bytes

9C9$9

Try it!

Explanation

9            - Push 9
 C           - Set implicit output to number mode
  9          - Push 9
   $         - Swap the two nines
    9        - Push 9
<implicit>   - Output stack

Racket, 15 bytes

(display "(y)")

Try it online!

Scratch, 23 bytes

when gf clicked
say[wcw

Grok, 11 bytes

iq i`  wwwq        # Prints "q i"

Width, 7 bytes

GAPSfeW

Try it online!

Outputs through STDERR.

I used a G to start the string. The ID of G is 39, which turns into eW. The ID of W is 55, which turns into AP. Then I just used Ai which is 50, and checked how close it was to A, saw it became R, then used Sf, which is 51, and becomes S.

Python 3, 13 bytes

print(")\"p")

Try It Online!

Having " as the middle char is lucky, because then I can balance the parity of the code because it requires an escape sequence.

There's a few more Python 3 13-byters, so I imagine this is the shortest possible solution. I don't there's a shorter solution with exit(), which prints to STDERR.

Pxem, Filename: 9 bytes + Content: 0 bytes = 9 bytes.

Husk, 5 bytes

"¨ ¨"

Try it online! In Husk, ¨ is the escape character for ".

Turing Machine Code, 29 bytes

0 * 2 r 1
1 * 1 r 2
2 * 0 * 2

Try it online!

Prints '210'.

Brainetry, 181 bytes

This program starts and ends with an upper case L and also has it in the middle of its source code. This golfed version is based off of the program that comes after it.

To try this online, follow this repl.it link, paste my source code in the btry/replit.btry file and hit the green "Run" button.

L b
a b c d
a b c d e f g h
a b c d
a b c
a b c d e f g h
a b c d e
a b c
a b c d e f g h L
a b
a b
a b c d
a b c d
a b c d e f g h i
a b c
a b c d e f g
a b c d e f g
a b c d e f L

The verbose version also starts and ends with an uppercase L and has one of those in the exact middle of its source code.

Lo and
behold: this program has
a self referential property! This code prints its
first, middle and last
chars! How nice!
Of course I cheated a little and made
this program in such a
way that all
3 of those chars are the upper case L,
which I
also had
to properly place in
the middle of this
text to make sure they appeared in those positions.
A bit of
luck and a bit of mathematics allowed
me to accomplish this feat. Let me
check it... Woops, missed by one... LOL

It feels cheaty, but

Mornington Crescent, 1005 bytes

Take Northern Line to Euston









Take Victoria Line to Seven Sisters
Take Victoria Line to Victoria
Take Circle Line to Victoria
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take District Line to Gunnersbury
Take District Line to Hammersmith
Take Circle Line to Cannon Street
Take Circle Line to Hammersmith
Take Circle Line to Cannon Street
Take Circle Line to Bank
Take Circle Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Upminster
Take District Line to Gunnersbury
Take District Line to Victoria
Take Victoria Line to Tottenham Hale
Take Victoria Line to Victoria
Take Circle Line to Victoria
Take District Line to Gunnersbury
Take District Line to Acton Town
Take District Line to Acton Town
Take Piccadilly Line to Turnpike Lane
Take Piccadilly Line to Turnpike Lane
Take Piccadilly Line to Leicester Square
Take Northern Line to Leicester Square
Take Northern Line to Mornington Crescent

There are nine deliberately placed newlines after the first instruction to make the middle character the o of Take District Line to Upminster. The code prints out the first three characters of Tottenham Hale reversed to yield toT. Of course, this challenge was made easier by the fact that Mornington Crescent programs always start with the T of Take and end with the t of Mornington Crescent, barring any extra newlines.

Try it online!

7, 11 characters

57125574032

Try it online!

Prints 255.

Explanation:

The program pushes 5|7255|4632 onto the frame (which starts with ||). Then, the last section of the frame (4632) is executed.

4 swaps the last two sections, and adds another bar between them. The frame is now ||5|4632||7255.

6 pacifies the last section of the frame by converting the active commands 7255 (shown in bold) to their passive equivalents 1255, and removing the bar before it. The frame now looks like ||5|4632|1255.

3 outputs the last section of the frame (1255) and discards the last two sections. The initial 1 means "print the rest unchanged", so 255 is printed. Then, the last two sections are discarded, leaving ||5 on the frame.

2 duplicates the last section of the frame, leaving ||5|5. There are no more characters left on the command list, so the last section of the frame (5) is executed.

5 moves the last section of the frame (which is another 5) to the start of the command list to be executed immediately, and then discards it. This leaves ||5 on the frame.

This happens again, leaving 5 on the command list and | on the frame.

The last 5 moves the last section of the frame (i.e. nothing) to the command list, leaving an empty command list and an empty frame. This causes the program to exit successfully.

Notes:

naz, 28 24 bytes

0a9a3a9m3a2o0a0a0a0a0m2o

Explanation

0a9a3a9m3a2o # Output "o" twice
0a0a0a0a     # Padding bytes
0m2o         # Output "0" twice

Original 28-byte solution: 0a9a3a9m3a1o0a0a0a9s5s1o0m2o

W, 5 bytes


'+:+

Explanation

     % Newline (no-op)
'+   % The addition operator
  :+ % Multiply the character twice
     % Print with a newline
```

AWK, 17 bytes

BEGIN{print"}iB"}

Try it online!

GolfScript, 7 5 bytes


".".

Try it online!

Explanation

     # A newline, just to hide the effect of the automatic trailing newline
"."  # The . character: the last and middle character
   . # Copy the character twice

# Implicitly output the whole stack without a delimiter.

# This returns ".." (the . character duplicated) and a trailing newline.

Python 3, 13 bytes

This should suffice. Although it has a new line at the end of the output. There is a space in between print and '(' to make the total count of characters odd.

print (')(p')

Try it online!

05AB1E, 5 bytes

×'×3×

Try it online!

×   push a string of nothing, repeated nothing times (in other words, push an empty string)
'×  push "×"
3×  push "×", repeated 3 times
    implicitly print top of stack

6502, 17/21 bytes

6502: 17 bytes if running in zero page

For initial testing I used Py65, a 6502-based microcomputer simulator written in Python. Starting Py65 with the command-line parameter -o ff moves the character output port to zero page address $FF, shaving three bytes from the code.

The program must be loaded and run at $0000, to guarantee outputing the correct three characters (in order) from the program with values 00 B5 A5.

Here are the program bytes and their respective disassembly view in Py65:

.mem 0000:0010
0000:  a5  10  85  ff  a9  11  4a  aa  b5  00  85  ff  a5  00  85  ff  00

.d 0000:0010
$0000  a5 10     LDA $10
$0002  85 ff     STA $ff
$0004  a9 11     LDA #$11
$0006  4a        LSR A
$0007  aa        TAX
$0008  b5 00     LDA $00,X
$000a  85 ff     STA $ff
$000c  a5 00     LDA $00
$000e  85 ff     STA $ff
$0010  00        BRK

6502: 21 bytes if running outside zero page

Four additional bytes are required to allow the program to run outside of zero page. Three of the those bytes are the change in the LDA (load accumulator) instructions from zero page to absolute addressing. The fourth is the addition of a NOP (no operation) instruction, to maintain an odd number of bytes in the program.

This version of the program must be loaded and run at $0300, to guarantee outputing the correct three characters (in order) from the program with values 00 00 AD.

Here are the program bytes (character values) and their respective disassembly view:

.mem 0300:0314
0300:  ad  14  03  85  ff  a9  15  4a  aa  bd  00  03  85  ff  ad  00  03  85
0312:  ff  ea  00

.d 0300:0314
$0300  ad 14 03  LDA $0314
$0303  85 ff     STA $ff
$0305  a9 15     LDA #$15
$0307  4a        LSR A
$0308  aa        TAX
$0309  bd 00 03  LDA $0300,X
$030c  85 ff     STA $ff
$030e  ad 00 03  LDA $0300
$0311  85 ff     STA $ff
$0313  ea        NOP
$0314  00        BRK

6502: 21 bytes if running on an Apple II

We've come this far, so let's plop this baby on an Apple II. I don't normally tote around my Apple //c anymore, so I used a2ix on my Android phone.

Instead of sending characters to an addressed port, they will go to COUT (character output), a routine in system ROM.

$0300 is the usual spot for small assembly routines, so that's where I'll enter and list it. Running it yields a flashing space (60), inverse N (0E), and a normal " (A2). On the Apple II, ASCII characters are remapped across the 256-character range to achieve different character effects in text mode.

*300: A2 14 20 0E 03 A9 15 4A AA 20 0E 03 A2 00 BD 00 03 20 ED FD 60

*300L

0300-   A2 14       LDX   #$14
0302-   20 0E 03    JSR   $030E
0305-   A9 15       LDA   #$15
0307-   4A          LSR
0308-   AA          TAX
0309-   20 0E 03    JSR   $030E
030C-   A2 00       LDX   #$00
030E-   BD 00 03    LDA   $0300,X
0311-   20 ED FD    JSR   $FDED
0314-   60          RTS

Relocating this to a free area of zero page (good luck!) would not yield any byte savings. While the absolute indexed LDA (load accumulator) at $030E could be switched to its zero page indexed counterpart to save one byte, an NOP (no operation) would have to be added to avoid additional code to support print two middle characters.

Python 3, 13 bytes

print(')\'p')

Try it online!

x86-64 (Mac OS), 35 bytes

b8 04 00 00 02 bf 01 00 00 00 48 be 20 00 00 00
00 00 00 00 ba 03 00 00 00 0f 05 48 31 c0 c3 00
b8 00 b8

can be disassembled to:

[bits 64]

section .text
  global _main

_main:
  mov rax, 0x2000004
  mov rdi, 1
  mov rsi, x
  mov rdx, 3
  syscall
  xor rax, rax
  ret

section .data
  x: db 184, 0, 184

and compiled with:

$ nasm -fmacho64 FILE.asm
$ ld -fSystem FILE.asm

then run

$ ./a.out
<0xb8><0x00><0xb8>

Lost, 21 bytes

v<<<<<>>>>>
>%?"v>@"@

Outputs: v>@.

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 >v in the string, will lead the path towards the leading > on the second line. From there the program flow is as follows:

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 < and >. One of them is to avoid having the newline character as the middle of the program, which is rather difficult to output and would have only increased the byte-count. The second is to make the program length odd again, so we'd only have to output a single middle character instead of two.

DOS COM x86 binary

% xxd test.com
00000000: 31c9 4b88 2f80 ffef 75f8 8007 30b4 028a  1.K./...u...0...
00000010: 17cd 2180 3f00 7503 e905 00fe 0fe9 f3ff  ..!.?.u.........
00000020: b402 8a17 cd21 8007 20b4 028a 17cd 2190  .....!.. .....!.
00000030: cd20 4b53 20                             . KS

C#, 71 bytes

public class P{public static void Main(){System.Console.Write("pa}");}}

Try Online
I don't think I need to explain anything here

ink, 5 bytes


/a//

Prints /a and a newline

Try it online!

C (gcc), 21 bytes


main(){puts("}u");;}

Try it online!

Whitespace, 31 29 bytes

[S aS S T   S S S S S N
_Push_32][S N
S _Duplicate_32][S N
S _Duplicate_32][T  N
S S _Print_as_character][T  N
S S _Print_as_character][T  N
S S _Print_as_character]

-2 bytes thanks to @RobinRyder.

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

Contains a no-op a (can be any non-whitespace character) to make the length odd. It is added before the first halve of the program so the middle character is a space as well, since the middle character would have become a newline if it was at the second halve of the program. All non-whitespace characters are ignored in Whitespace programs.

Haskell, 19 bytes


main=($LT)print--L

Try it online! Outputs LT<newline>.

Cubix, 9 bytes


oN/
@oo

Try it online!

Reasonably boring one. Since the newlines in the first, middle and last positions are ignored by the interpreter the code wraps onto the following cube. Spaces could be used as well. eg oS/ @oo

  o
N / @ o
  o

Watch it run

Bitwise Cyclic Tag But Way Worse, 26 bytes

ÿ1111111122ÿ2000000002ÿ

Outputs ÿ ÿ ÿ. 26 bytes since ÿ is considered 2 bytes in UTF-8.

Try it Online!

33, 9 bytes

a"a\\a"pa

The a's do nothing here, they're essentially NOPs in this code to make it shorter. My original thought was "p\\\""p, but that's 8 bytes, so it needs to print another \, making it 10 bytes "p\\\\\""p

This is a language I did create, but I made it legitimately, so I hope it's within the rules.

Ohm v2, 5 bytes

…Lo…L

Try it online!

Pip, 15 bytes

O"}"xxL1{O"1O"}

Needs more golfing

Try it online!

Pip, 9 bytes


O"nn"x
n

shorter version with newline

Try it online!

Pip, 8 bytes

1x000Oh1

another one

Try it online!

Shakespeare Programming Language, 163 153 bytes

-10 bytes thanks to Jo King.

B,.Ajax,.Page,.Act I:.Scene I:.[Enter Ajax and Page]Ajax:You is
the sum ofa Big Big Big BIG BIG cat a
CAT.Speak thy.You is twice you.Speak thy!SPEAK THY!

Try it online!

My first SPL answer! Outputs !BB.

There is another SPL answer by Unrelated String; in that answer, they output only spaces in 119 bytes, or output non-space characters in 227 bytes. This one comes in between, and also outputs non-space characters.

Two tricks are used here:

  1. An SPL sentence can end with ! rather than ., and ! is easier to get since its ASCII codepoint is 33 (=\$2^5+1\$), whereas the codepoint of . is 46.
  2. Doubling 33 gives 66, the codepoint of B, hence the play title is B and I need the second "big" to be "Big", which works since SPL is case-insensitive.

Since I needed that capital B and an exclamation mark at the end, I decided to have Ajax shout louder and louder through the scene.

Python 3 12 13 bytes

input(r')ri')

Python 3, 19 bytes 13 bytes


print( ')(')

The print function appends a newline by default so the code starts with a newline. The last character of the code is a ")" so that's printed first. To make the number of characters uneven, a space in inserted before the argument of the print function. Please excuse the salaciousness of the code.

Outputs: )(\n

Try it online.

Rust (closure), 9 bytes

|| ";;|";

Try it online!


Rust (full program), 25 bytes

fn main(){print!("}}if")}

Try it online!

C++ (clang) (lambda expression), 17 bytes

[]{return "}n[";}

Try it online!


C++ (clang) (full program), 47 43 bytes


#import<ios>
int main() {std::puts("}n");}

Try it online!

 

Unfortunately had to leave an extra space in both of the solutions, to make them have an odd number of characters.

Python 2, 12 bytes 11 bytes

Placeholder to make the leading newline visible

print"\"t"

MATLAB, 1315 bytes

disp(  ') d')

Outputs ) d

Previous version (15 bytes, less strict output):

'''';1;''''''''

Outputs '''

Octave, 15 bytes

fprintf(')(f' )

Try it online!

As far as I know, using fprintf is the only method of out that doesn't come with extraneous output.

Chef, 447 bytes

Last Middle First Milkshake.

This recipe prints its last, middle and first character.
You could also use it to make a milkshake. 

Ingredients.
76 ml milk
32 ml chocolate syrup
46 teaspoons vanilla ice cream

Method.
Liquefy vanilla ice cream.
Put the milk into 1st mixing bowl.
Put the chocolate syrup into 1st mixing bowl.
Put the vanilla ice cream into 1st mixing bowl.
Pour contents of the 1st mixing bowl into the 1st baking dish.

Serves 1.

Try it online!

A serious submission, 196 177 bytes

thanks to A__

R.

Ingredients.
82 l a
103 l b
46 l c

Method.
Put a into mixing bowl.
Put b into mixing bowl.
Put c into mixing bowl.
Pour contents of mixing bowl into baking dish.

Serves 1.

Try it online!

Boolfuck, 29 21 bytes

;;;;;;;;;;;;;;;;;+

Outputs 3 null characters

Thanks to Jo King for the improved solution!

Try it online!

BitChanger, 23 bytes

<<<<<<<<<<}<<<}<}<}<

Very similar to the Boolfuck one: uses the fact the null characters require no bit changing to output with tape-based bit output

How it works:

           Used as it is simple to output
<<<<<<<<<< Moves over to one left of the I/O bit
}           Sets the I/O bit to one, for output
<<<         Moves over to the bit that performs I/O
}<}<}       Sets it to one 3 times, to output 3 null characters
<          I used < to waste one byte so it could be an odd number of bytes

Try it Online!

Zsh, 9 bytes



<<<\<\<

Try it online!

Hexdump, with first/middle/last bytes highlighted:

00000000: 0a0a 3c3c 3c5c 3c5c 3c                   ..<<<\<\<
          F^        M^        L^                   ^   ^   ^

Output is <<[newline].

Pyth, 5 bytes


10 1

Prints 10 followed by a newline. Try it online!

Newlines normally print the next result followed by a newline, but at the start of a program it is essentially a no-op. 10 is the literal value, which is printed followed by a newline. The space before the 1 suppresses the usual implicit printing, so the final 1 is ignored.

Excel, 9 bytes

=("))=" )

So many Parentheses.

Note: The returned middle character can actually be any character since it's the middle of the code.

F#, 13 bytes (characters)

So many esoteric languages that seem to be made specifically for code golfing… let's try a terse but 'normal' language like F#, where the following line (without a trailing newline) has 13 characters (13 bytes if the source file is saved as ANSI text):

printf"\"\"p"

Output:

""p

DOS/Windows Batch Language, 9 bytes

@echo @o@

Python 2, 13 11 bytes


print' t' 

To make the whitespace clear:

$ xxd solution.py
0000000: 0a70 7269 6e74 2720 7427 20           .print' t'
$ python2 solution.py | xxd
0000000: 2074 0a                                t.

Try it online!

-2 bytes, thanks to wastl !

Keg, 7 5 bytes

1\':'

This prints ''1, which are the respective characters.

No Try It Online available for Keg.

Here is an uninteresting 4-byte answer:

1231

AsciiDots - 9 bytes

.---$'.$.

Output: .$.

The code starts with a ., ends with a ., and the middle character is a $. The single quote in the middle sets the dot print mode to simply read characters straight into the output stream.

It is possible that this could be made smaller, but I'm starting to doubt that it can. In order to print three characters, the single quote must be used, as the double quote would require an end to the string in order to output. However, this means that the single quote has to a) be followed by three characters and b) cannot be the center character. In order to crunch this down to seven bytes, I was considering trying to reuse the dot's start as one of the printed characters (sort of like AsciiDot's quine program). However, I found that the shortest sequence available for printing was ($' which would have had to print four characters in the space of three, or three characters in the space of four. I also tried some hacky alternative methods like trying to print the dot's value (which is 0) as one of the characters. While there may be some system that works, I've found these to be rather complex and large. Thus, I think that the above is the smallest solution. (I will update if I find something smaller)

Stax, 5 bytes


.PPP

Run and debug it at staxlang.xyz!

The leading linefeed does nothing. .PP pushes the string PP, and the final P prints it with a trailing newline. The last character is P, the middle character is the first P, and the first character is a linefeed.

The implicit print's trailing linefeed invalidates the 4-byte solutions 1231 and .S.S (adapted from Weijun Zhou's quine).

SmileBASIC, 7 bytes

?":b?":

Output: :b?

(Probably works in most BASIC dialects) The middle character can be anything except ", LF, and CR.

Bash, 9 11 9 bytes

First attempt:

echo e\ o

Output

e o

Second attempt:

echo -n e-e

Output:

e-e

Third attempt

    
echo  oo

Note the leading newline and the double space

Output:

oo

Perl 5, 11 bytes


 say '; ';

Try it online!

Note the initial newline and the trailing space. Outputs

; 

LOLCODE, 27 bytes

HAI 1
VISIBLE "E H"
KTHXBYE

Try it online!

Trivial answer in LOLCODE. The 14th character is the space just before the string literal.

BitCycle, 5 bytes


11!1

Try it online!

Outputs 11 with a trailing newline. Only the first pair of 1s is actually printed.

Perl 5, 11 bytes

say "\"\\s"

Try it online!

Underload, 9 bytes 7 bytes

Thanks to Khuldraeseth na'Barya for the improved solution!

W(SSW)S

As for as I can tell, this is now unimprovable since:

Try it online!

INTERCAL, 65 bytes

PLEASE,1<-#3DO,1SUB#1<-#246DON'TPARSE!!
DO READ OUT ,1
DO GIVE UP

Try it online!

Padding the second half of the program to make the output PPP seems to be shorter than printing multiple distinct characters.

PLEASE ,1 <- #3         Declare that the length of the uint16 array ,1 is 3.
DO ,1 SUB #1 <- #246    Make the first element of ,1 246. (The other elements are 0.)
DON'T PARSE!!           This statement is ignored and nonsense.
DO READ OUT ,1          Print ,1 using C-INTERCAL's "Turing Tape" I/O.
DO GIVE UP              End the program.

This one almost works for 35 bytes, but it prints a space before the first newline:


PLEASE       READ OUT#500DOGIVEUP

PHP, 11 bytes

<?=';\\<';;

Try it online!

Kotlin, 39 25 bytes

fun main(){print("}rf")
}

Try it online!

Edit: -14 bytes thanks to @daniero

Wolfram Language (Mathematica), 9 bytes


Print@nn

Try it online!

PowerShell, 8 7 bytes


' D'  

Try it online!

Notice the two spaces after the last quote. Forgot that using implicit output puts a newline afterwards. Fixing that saved a byte though.

Alternative 7 byte solution with 3 unique chars by mazzy


"`"`""

Try it online!

Japt, 5 bytes

Inspired by my JavaScript solution.

N'a*N

Try it

05AB1E, 7 5 bytes


„ RR

Outputs R \n.

-2 bytes by taking inspiration from @Neil's Batch answer, so make sure to upvote him as well!

Try it online.

5 bytes alternative by @Grimy:


12,1

Outputs 12\n.

Try it online.

Initial 7 bytes answer:

'?„«'«?

Outputs ?«'.

Try it online.

Explanation:

          # No-op newline
„ R       # Push 2-char string " R"
   R      # Reverse this string to "R "
          # (output the result implicitly with trailing newline)

          # No-op newline
12,       # Print 12 with trailing newline
   1      # Push a 1 (no implicit printing, since we already did an explicit print)

'?       '# Push 1-char string "?"
  „«'    '# Push 2-char string "«'"
     «    # Concatenate them both together
      ?   # Output without trailing newline

cQuents, 8 bytes

1#11,2&1

Try it online!

Outputs 11,1.

Explanation

1             Prepend 1 to the output
 #11,2        Default input is `11, 2`
      &       Output as many terms as the last input, comma seperated
       1      Each term equals 1

So first 1 is prepended, then the input becomes 11,2. Then, we output 2 terms comma separated, which is 1,1, so the final output is 11,1.

MarioLANG, 53 bytes

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

Try it online!

Output: +++. The 27th character is one of the + characters in the second column of the code.

ArnoldC, 61 bytes

IT'S SHOWTIME
TALK TO THE HAND "D I"
YOU HAVE BEEN TERMINATED

Try it online!

Trivial answer in ArnoldC. The 31st byte is the space just before the string literal.

Grass, 17 bytes

wWWwwwVVwWWwWWWww

Try it online!

-2 bytes thanks to jimmy23013.

Outputs www. Grass ignores all characters apart from w, W and v. The two Vs are thus ignored; they are there to ensure the middle character is a w – I have no idea how to output v or W in Grass… I could have used another character instead of V, but V preserves the aesthetic of the code.

dc, 9 characters

[PP]P91aP

Sample run:

bash-5.0$ dc -e '[PP]P91aP'
PP[

Try it online!

PowerShell, 7 bytes

Another trivial solution. The first and the last lines contains LF.


"`nn"

Try it online!


PowerShell, 9 bytes

non-trivial, no byte sequence hacks. The first line contains LF only. The second line starts with a space.


 echo hh

Try it online!

Lua, 31 13 bytes

print (')(p')

Prints )(p

Try it online!

AppleScript, 4

1021

Outputs the last char (1), the middle chars (02), and the first char (1).

Any four-digit number with the same first and last digits and different middle digits works.

Forth (gforth), 13 bytes

: f ." ; :" ;

Try it online!

Code Explanation

: f         \ start a new word definition
  ." ; :" ; \ print "; :"
;           \ end the word definition

HTML, 4 bytes

^db^

^<X>_<X>^

I'm not sure if this is cheating... Really.

First one also worked as PHP or Text.

JavaScript, 9 7 bytes

N=>a=-N

Outputs: NaN

Try it online!

Japt, 7 bytes

''ixi''

Try it

''ixi''
''          :Literal "'"
  i         :Prepend
   x        :  Literal "x" (any lowercase letter would work. Except i, of course)
    i       :  Prepend
     ''     :    Literal "'"

Alternatives

"\"ww"w

Try it


Riii'R

Try it

"Q\""+Q

Try it

Shakespeare Programming Language, 119 bytes

 ,.Ajax,.Page,.Act I:.Scene I:.[Enter Ajax and Page]
Ajax:  You big big big big big cat.Speak thy.Speak thy.Speak thy. 

Try it online!

Prints three spaces. Without printing spaces:

Shakespeare Programming Language, 227 bytes

,.Ajax,.Page,.Act I:.Scene I:.[Enter Ajax and Page]Ajax:You is the sum of a big big big big big big cat a big pig.
You is the sum of you a large huge large big pig.
Speak thy.Speak thy.You is the sum of you a big pig.Speak thy.

Try it online!

Like my newline-free INTERCAL answer, this is constructed to make the last character of the program the same as the middle character (although in this case it is not also the first), by un-golfing the second half of the code until they match. (I'm not sure if I could have constructed 46 in fewer bytes or not, or if I could have golfed other parts of the first half more.)

Charcoal, 7 bytes

←´←´´´X

Try it online! The final X could be any byte in the Charcoal code page except 0xFF and the two already in use. Works by printing the desired characters leftwards. Alternative approach, also 7 bytes:

←”y←←”y

Try it online! The final y could be any ASCII character but I picked y because of the symmetry. Works by printing two s leftwards so that the final character gets printed at the start of the output.

APL (Dyalog Unicode), 5 4 bytes

Full programs.

Boring solution from J.Sallé:

1231

Prints that number. A much more interesting solution:

010E1

Try it online!

APL ignores leading zeros, so this is simply scaled format for 10×10¹=100.

Brachylog, 7 bytes

"w\\""w

Try it online!

Thanks to Shaggy for correcting this to comply with the challenge specification.

Boring string literal, except thanks to the weird way Brachylog string literals work, the escaped backslash also still escapes the quote afterwards, so it's not actually that boring.

Gema, 13 characters

\A=l\\\\@fail

Try it online!

Gaia, 5 bytes


⌋ ”⌋

Try it online!

The is just there as a no-op.

            % helper function
⌋ ”⌋         % main function: push "⌋ " and convert to lowercase
            % then implicitly print with trailing newline

Bash (15 11 characters)

echo -n e-e

which prints out

e-e

Forth (gforth), 9 bytes

Prints an escape-supporting string.

.\"   ." 

Try it online


Also 9 bytes:

Prints three spaces.

 ."    " 

Try it online


9 bytes with Stack Underflow:

 ." .. ".

Try it online


The 2nd and 3rd solutions also work if you replace first quotations with ( and last quotes with ). Essentially, plenty of ways to do it in 9 bytes, but probably not any shorter.

Documentation

HQ9+ 4 characters

+AQ+

Explanation:

+ ; increment accumulator
A ; nop
Q ; print itself
+ ; increment accumulator

Runic Enchantments, 9 7 bytes

'@'':r@

Try it online!

-2 bytes by just using char literals. Outputs @''

Dodos, 22 bytes


	dot
	dot
0         0

Try it online!

brainfuck, 17 bytes

U-[>+<-UU--]>...U

Try it online!

With unprintables this can be reduced to 7 bytes: ␀..␀_.␀

Retina, 7 bytes

((K`(`(

Try it online! Retina 1 does not output a trailing newline by default, but fortunately it has the K command which allows us to specify a constant string output. The grouping construct ( is used to increase the number of distinct characters to meet the minimum requirement.

Retina 0.8.2, 7 bytes


01$*$$

Try it online! Retina 0.8.2 outputs a trailing newline by default, so the code starts with that. Conveniently, this also matches the default empty input, allowing the replace stage to get to work. It then suffices to come up with a string of even length > 2 that outputs the other 2 characters.

R, 11 bytes

cat("))c" )

Try it online!

Outputs ))c. Space added to make the number of characters odd: otherwise we would need to output 4 characters, and that would make the code longer anyway.

Brain-Flak, 11 bytes

(((())))

Try it online!

Explanation

We need to put 3 things on the stack. The fastest way to do that is to put 3 1s (or zeros) on the stack. Now since  (code point 1) does nothing in Brain-Flak we can add these to the program at the first middle and last places. Now this feels a bit cheaty so here are two more answers that are less cheaty in my opinion.

Prints braces, 31 bytes

( (((((()()()()()){}){}){}))())

Try it online!

This answer prints braces so that the characters printed are actually relevant to the code, it does have one padding character to make the length odd so we only have to print 1 middle character.

Contains only braces, 32 bytes

(((()((((()(()()){}){}){}){}))))

Try it online!

This is a braces only program both the source and (consequently) the output are made up entirely of braces (character Brain-Flak actually cares about).

Haskell, 17 bytes

main=putStr"\"Sm"

Try it online!

Lenguage, 292 2340 bytes

Thanks to Jimmy23013 for pointing out I need another 2048 bytes

2340 bytes of any character with the first, middle two and last characters being a null byte.

Prints 4 null characters.

Try it online in brainfuck

MathGolf, 5 4 bytes

1231

-1 byte by using the trivial solution presented by @ErikTheOutgolfer in his Jelly answer, which works for any language with implicit output without trailing newline.

Try it online.

Original 5 bytes answer:

ùù xx

Outputs x ù.

Try it online.

Explanation:

ùù x   # Push 3-char string "ù x"
    x  # Reverse it to "x ù"
       # (output the entire string joined together implicitly without trailing newline)

PowerShell, 3 bytes

00000000: 0a0d 31                                  ..1

Works only in Microsoft Windows.

The output is unfortunately 8 bytes in UTF-16. But the question says output the characters, and not the bytes. Arguably UTF-16 is just one of the supported ways to represent the characters in PowerShell. They are not interpreted differently from an ASCII file.

RProgN 2, 3 bytes

1
0

Try it online!

I think this is valid?

Jelly, 5 bytes

001 0

Try it online!

The output has two distinct characters, but the code also has a third one.

Trivial 4-byte version:

1231

SNOBOL4 (CSNOBOL4), 19 bytes


	OUTPUT = 'D='
END

Try it online!

Prints D=<newline>, using SNOBOL's trailing newline in OUTPUT.

D=

APL (Dyalog Unicode), 9 bytes

⎕←'''''⎕'

Try it online!

Both the last and middle characters are ', while the first is .

Befunge-93, 7 bytes

.",  @0

Try it online!

Explanation

Output is 0 .

.       pop value (0) from stack, output as number with a trailing space
 "      toggle string mode, wraps around and pushes every char to the stack
  ,     pop value (".") from stack, output as character 
        spaces are no-ops
     @  end the program
      0 trailing 0 to match the output

Ruby, 6 bytes


p " "

Try it online!

This outputs " " plus a newline. The code ends with a ", the middle two characters are and ", and it starts with a newline.

Java 8, 11 bytes (as lambda function)

v->'"'+"'v"

Outputs "'v.

Try it online.

Java 8, 67 bytes (as full program)

interface M{static void main(String[]ar){System.out.print("}ni");}}

Outputs }ni.

Note the ar instead of a as argument. Otherwise the middle part had to be in, but printing that would make the size odd again, which would cause a paradox-loop..

Try it online.

Elm 0.19, 11 bytes

f()="\"\\f"

Prints "\f. See it working here.

Batch, 9 characters


@echo hh

The middle and last character are both h, and then the echo prints a newline by default, which is the first character of the script.

Ruby, 11 9 bytes

print:ptp

Try it online!

CJam, 7 bytes

'@'' _@

Try it online!

Haskell, 17 bytes

main=putStr"\"Sm"

Try it online!

PHP, 9 bytes

<?=";;<";

Try it online!

JavaScript (Babel Node), 11 bytes

_=>(')\)_')

Try it online!