Drink your morning coffee
JavaScript (ES6), 110 104 bytes
Saved 4 bytes thanks to edc65
let f =
_=>`1o
6o
3o
9
/44\\__
|2J5|1\\
|3A4|1|
|4V3|1|
|5A2|__/
\\9/`.replace(/\d/g,n=>' _'[n>>3].repeat(++n))
console.log(f())
How it works
The compression of the original ASCII art is achieved by replacing all sequences of 2 to 10 consecutive spaces and the two sequences of 10 consecutive underscores with a single digit:
- Each sequence of
N
consecutive spaces is encoded with the digitN-1
. - The underscore sequences are encoded with a
9
.
We use N-1
rather than N
so that we never have to use more than one digit. Hence the need for ++n
when decoding.
The expression n>>3
(bitwise shift to the right) equals 0 for n = 1
to n = 7
and equals 1 for n = 8
(not used) and n = 9
. Therefore, ' _'[n>>3]
gives an underscore for 9
, and a space for all other encountered values.
The only special case is the sequence of 10 consecutive spaces just above "JAVA". Encoding it with a 9
would conflict with the underscore sequences. So we need to split it into two sequences of 5 spaces, encoded as 44
.
Jelly, 67 64 bytes
-2 bytes thanks to Dennis (1. remove redundant ”
, and 2. replace transpose and run-length decode, ZŒṙ
, with reduce by element repetition, x/
.)
“Ñṁ{xGgṭḷVỤɲ8ṿfƬT9Ɱ¹=qṀS“$<(ƇỤ08ØÑḌṃṘX6~cuc8HṗḞ2’Dx/ị“ ¶_/\|JAVo
Try it online!
How?
“...“...’
is a list of two base-250 compressed numbers:
[1021021021332411532617161526181616261916162618163425334, 2117114111551155121131612111415121115141211161312111551]
D
converts to decimal to yield two lists of digits:
[[1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 3, 3, 2, 4, 1, 1, 5, 3, 2, 6, 1, 7, 1, 6, 1, 5, 2, 6, 1, 8, 1, 6, 1, 6, 2, 6, 1, 9, 1, 6, 1, 6, 2, 6, 1, 8, 1, 6, 3, 4, 2, 5, 3, 3, 4], [2, 1, 1, 7, 1, 1, 4, 1, 1, 1, 5, 5, 1, 1, 5, 5, 1, 2, 1, 1, 3, 1, 6, 1, 2, 1, 1, 1, 4, 1, 5, 1, 2, 1, 1, 1, 5, 1, 4, 1, 2, 1, 1, 1, 6, 1, 3, 1, 2, 1, 1, 1, 5, 5, 1]]
x/
reduces by element repetition to give one list of digits (repeating the number from the first list by the corresponding value of the other):
[1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 0, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 3, 3, 2, 6, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 6, 1, 1, 5, 2, 6, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 6, 1, 1, 6, 2, 6, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 6, 1, 1, 6, 2, 6, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 6, 3, 3, 4, 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4]
ị
instructs to index into the list of the right, one based and modularly (0 indexes into the rightmost item). The list on the right, ¶_/\|JAVo
, is simply the character used in the required order where the pilcrow, ¶
, is the same code-point as a linefeed. The closing partner of “
is not required as this is the end of the program:
[' ', ' ', 'o', '\n', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'o', '\n', ' ', ' ', ' ', ' ', 'o', '\n', ' ', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '\n', '/', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\\', '_', '_', '\n', '|', ' ', ' ', ' ', 'J', ' ', ' ', ' ', ' ', ' ', ' ', '|', ' ', ' ', '\\', '\n', '|', ' ', ' ', ' ', ' ', 'A', ' ', ' ', ' ', ' ', ' ', '|', ' ', ' ', '|', '\n', '|', ' ', ' ', ' ', ' ', ' ', 'V', ' ', ' ', ' ', ' ', '|', ' ', ' ', '|', '\n', '|', ' ', ' ', ' ', ' ', ' ', ' ', 'A', ' ', ' ', ' ', '|', '_', '_', '/', '\n', '\\', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '/']
Jelly performs an implicit print of this list, which, since it contains characters, prints as if it were a string:
o
o
o
__________
/ \__
| J | \
| A | |
| V | |
| A |__/
\__________/
CoffeeScript ES6, 214 180 bytes
r="replace";" 1o0n0 6o0n0 3o0n0 _9n0/0 9b0_1n0|0 2J0 5|0 1b0n0|0 3A 4|0 1|0n0|0 4V0 3|0 1|0n0|0 5A0 2|0_1/0n0b0_9/0"[r](/\d/g,(a,b,c)->c[b-1].repeat(a))[r](/n/g,"\n")[r](/b/g,"\\")
CoffeeScript, 135 bytes with hardcoding
f=()->""" o
o
o
__________
/ \__
| J | \\
| A | |
| V | |
| A |__/
\__________/"""