-1
\$\begingroup\$

The challenge today is to write a program that outputs a known proverb, Where there is a will, there is a way., that means if someone is determined to do something, he will find a way to accomplish it regardless of obstacles.

Output

It has to be exactly the same, including the space bar and punctuation and excluding the newline at the end.

Where there is a will, there is a way.

You may not use Where there is a will or way anywhere in the source.

This is , shortest answer per language wins.

\$\endgroup\$
  • \$\begingroup\$ Looks like specific question titles can cause CAPTCHA popups. \$\endgroup\$ – Scratch---Cat Apr 11 at 12:43
  • \$\begingroup\$ @Deusovi Should I use the rosetta-stone tag? \$\endgroup\$ – Scratch---Cat Apr 11 at 12:46
  • 2
    \$\begingroup\$ Welcome to Code Golf! Let's put aside for a moment the fact that this is probably a dupe. Can you confirm that there must be no "a" at all in the source code, since this is a single-character forbidden string? \$\endgroup\$ – Arnauld Apr 11 at 13:04
  • 1
    \$\begingroup\$ We've had a lot of challenges before about printing strings without using them or parts of them, and I think the methods for doing this have been pretty thoroughly mined out. Not something I'd expect a new poster to know, of course. \$\endgroup\$ – xnor Apr 11 at 13:05
  • 1
    \$\begingroup\$ I've rephrased the challenge so it's simpler to understand and shows more effort put into making it. \$\endgroup\$ – Kamila Szewczyk Apr 12 at 12:04

11 Answers 11

4
\$\begingroup\$

JavaScript (ES6), 50 bytes

_=>`W\here${s=' t\here i\s \x61 w'}ill,${s}\x61y.`

Try it online!

| improve this answer | |
\$\endgroup\$
4
\$\begingroup\$

Retina 0.8.2, 38 bytes


Wht8ll,t0y.
t
 th 8s 0 w
h
here
T`d`l

Try it online! Explanation:


Wht8ll,t0y.

Insert Wht1ll,t0y..

t
 th 8s 0 w

Expand to Wh th 8s 0 w8ll, th 8s 0 w0y..

h
here

Expand to Where there 8s 0 w8ll, there 8s 0 w0y..

T`d`l

Transliterate the digits to letters, so as to avoid having the words is or a in the code.

| improve this answer | |
\$\endgroup\$
4
\$\begingroup\$

05AB1E, 23 bytes

-2 thanks to @Kevin Cruijssen

…€Ç€ˆ€…“‚à ÿ€§, ÿƒƒ.“.ª

Try it online!

Older version, 24 bytes

“‚Àǀˆ€…€§,€Ç€ˆ€…ƒƒ.“.ª

-1 thanks to @petStorm

Try it online!

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ You posted exactly when I finished my own 05AB1E solution... it's shorter anyway. \$\endgroup\$ – user92069 Apr 11 at 13:59
  • \$\begingroup\$ Sentence capitalization is a built-in. \$\endgroup\$ – user92069 Apr 11 at 14:03
  • \$\begingroup\$ I tried it, I wonder why it didn't work... \$\endgroup\$ – Command Master Apr 11 at 14:04
  • \$\begingroup\$ Here's mine. \$\endgroup\$ – user92069 Apr 11 at 14:11
  • \$\begingroup\$ Do you have any idea why this doesn't capitalize correctly? \$\endgroup\$ – Command Master Apr 11 at 14:59
2
\$\begingroup\$

C (gcc), 87 78 75 ... 59 bytes

-9 bytes thanks to @my pronoun is monicareinstate!

-3 bytes thanks to @Arnauld!

+1 byte for forgetting the period

-3 bytes thanks to @petStorm!

-3 bytes thanks to @ceilingcat!

f(){printf("W\here%sill,%1$s\x61y."," t\here i\s \x61 w");}

Try it online!

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ 77 and valid: Try it online! \$\endgroup\$ – the default. Apr 11 at 13:03
  • 1
    \$\begingroup\$ 74 bytes \$\endgroup\$ – Arnauld Apr 11 at 13:15
  • 1
    \$\begingroup\$ You can abuse some undefined escape codes (stolen from Arnauld's answer). 64 bytes \$\endgroup\$ – user92069 Apr 11 at 14:30
2
\$\begingroup\$

Brain-Flak, 1170 bytes (by hand)

I wrote this one by averaging the ascii value of every character in the saying. I then pushed the value (87) to the stack. Then on stack 2 I pushed the ascii value of the next character - 87 then added 87. The numbers were all coded by this program

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

Try it online!

Brain-Flak, 640 bytes (using text generator found here)

This was produced using an answer to a challenge I maded a while back.

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

Try it online!

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Python 3, 95 60 59 bytes

exit("W""here%sill,%s\x61y."%((" t""here i""s \x61 w",)*2))

Try it online!

-35 bytes thanks to newbie and petStorm. -1 byte thanks to newbie and petStorm.

I completely forgot that % did string formatting.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ porting my C answer, 60 bytes \$\endgroup\$ – newbie Apr 11 at 14:43
  • \$\begingroup\$ Python has string formatting as well. Same length, 60 bytes \$\endgroup\$ – user92069 Apr 11 at 14:46
  • \$\begingroup\$ On Python 3.8 you can save a single byte using the walrus operator. 59 bytes \$\endgroup\$ – user92069 Apr 11 at 14:47
  • \$\begingroup\$ Aww, I completely forgot % did formatting \$\endgroup\$ – Windmill Cookies Apr 11 at 14:51
  • \$\begingroup\$ No need for walrus operator tho. 59 bytes, python 2 \$\endgroup\$ – newbie Apr 11 at 14:52
1
\$\begingroup\$

Bash + Core utilities, 54 52 51 50 bytes

echo WHERE "THERE IS A w"{ILL\,,Ay}|tr ?-V\\n _-v.

Try it online!



If we're allowed to print a newline at the end, as several other entries appear to be doing, then:

Bash + Core utilities, 47 bytes

echo WHERE "THERE IS A w"{ILL\,,Ay.}|tr ?-V _-v

Try it online!

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

brainfuck, 241 bytes

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

Try it online!

Could use some golfing but it's getting late.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Erlang (escript), 65 bytes

z()->"W\here"++[" t\here i\x73 \x61 w"++X||X<-["ill,","\x61y."]].

Try it online!

Erlang (escript), 65 bytes

This simply employs the almighty hard-coding.

z()->"W\here t\here i\x73 \x61 w\ill, t\here i\x73 \x61 w\x61y.".

Try it online!

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

V (vim), 44 bytes

iWh t wi²l, t w97y.Ót/&h i115 97
Óh/here

Try it online!

Hexdump:

00000000: 6957 6820 7420 7769 b26c 2c20 7420 7716  iWh t wi.l, t w.
00000010: 3937 792e 1bd3 742f 2668 2069 1631 3135  97y...t/&h i.115
00000020: 2016 3937 0dd3 682f 6865 7265             .97..h/here

I suspect this can be shorter, but I'm a bit rusty with V.


Yes it can be shorter!

V (vim), 42 bytes

i.yaw 97 si ereht ,lliw 97 si e erehWæ

Try it online!

Hexdump:

00000000: 692e 7961 7720 1639 3720 7369 2065 7265  i.yaw .97 si ere
00000010: 6874 202c 6c6c 6977 2016 3937 2073 6920  ht ,lliw .97 si 
00000020: 650e 2065 7265 6857 1be6                 e. erehW..

V or vim, either one, 38 bytes

iwHERE THERES A WILL, THERES A WAY.V~

Try it online!

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Jelly, 25 bytes

“ḅṫ!Ḃḃ0ʋŀɼYẆḊỵ2Ƭqɦ⁷-&Y£z»

Try it online!

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.