# Introduction

You started to write a "Hello, World!" program, but after you wrote the part to print the hello, you forgot what your program should actually print. So now, you somehow managed it to write a program which can check if the entered word is what you search.

Your task is to write a program or function, which first prints Hello... eh, whom should I greet?, then asks for input, and if the input equals world ignoring capitalization, the program should print Ah, yes. World., else it should print No. That isn't what I meant..

But you are not allowed to use any of the bytes equivalent to the ASCII values of:
worldWORLD
- that is, for those using code-pages not aligned with ASCII, bytes:
0x...: 77, 6f, 72, 6c, 64, 57, 4f, 52, 4c, 44.

# Compact rules

• No substring of the byte-string worldWORLD may appear in your program or in the file name of the program on any way

• print "Hello... eh, whom should I greet?"; if input.lower == "world" print "Ah, yes. World."; else print "No. That isn't what I meant.";

• Leading or trailing spaces are ignored.

• This is a challenge, so the program with the lowest amount of chars wins!

• @CartManagerXD Why shouldn't you? Just write a function which does the task. In most languages, it isn't of any use, but in C, for example, you can save three bytes by naming your function different then main – Mega Man Apr 23 '17 at 18:30
• @CartManagerXD Unless the function takes input from STDIN. – Erik the Outgolfer Apr 23 '17 at 18:34
• @JonathanAllan Oh sorry. I live in Germany, so sometimes I forget those simple things XD – Mega Man Apr 23 '17 at 18:36
• @CartManagerXD Yeah, that's what I mean. The code doesn't have to be runnable, if it's a valid function definition. – Mega Man Apr 23 '17 at 18:38
• I've downvoted this challenge, because I don't think it's very easily golfable. There's not really more than 1 way to do this, which is print string; input(); isequal? string1 : string2. It panders to golfing languages with those builtins not assigned to world and with short names. – Rɪᴋᴇʀ Apr 23 '17 at 19:25

# SOGL, 67 bytes

P5√~!9!j┌⁰‚V{7Χ←½χķ²‘q"A6‘,u=?"ΤΞ¦▲ξ⌠²ō⅞Σ↔─╚‘p}"⁽∙šžøp⅔…ļ4∑Ν…ZH]└»‘


Explanation:

...‘                        push "Hello... eh, whom should I greet?"
q                       output, without disabling implicit output
"A6‘                   push "world"
,u=?       }       if equal to lowercased input
"....‘           push "Ah, yes. World."
p          output, disabling implicit output
"...‘  push "No. That isn't what I meant."
implicitly output that if that hasn't been disabled by the if.

• FYI - I know you answered before the hold, but I made an edit to make the challenge a little more language-agnostic. If that holds this would no longer be valid (it contains one P and two ps, 0x4f and 0x6f respectively, I believe). – Jonathan Allan Apr 23 '17 at 20:08
• @JonathanAllan Oh. Never noticed that the byte table of SOGL is not ASCII-aligned, trough it's supposed to be. The problem with fixing that is that (almost) all my previous answers would not work with that being fixed. – dzaima Apr 23 '17 at 21:06
• Oh, I thought it might have been on purpose. You could change your / make a second code page - languages can change, although I agree it could confuse. I am surprised, once again, by how short the compressions are. Would you mind adding an answer to the tips question I just asked?! – Jonathan Allan Apr 23 '17 at 21:23

# Jelly, 70 bytes

“¡Kịy<⁷ẊṘṘsṁñAỵḋẇ,ẇʂI»Ṅø“¢ƈṫ(Ɲ¬÷Ø“¡ṣƓ»µɠŒteḊȧKȯ“TḲj/Ẇi¤cecṡĿt⁺ƘNƁ⁻»;”.


Jelly's code-page is equal to ASCII in the range ' ', 0x20, through to '~', 0x7e, inclusive so the lack of any of worldWORLD in the code above suffices (note: ẇȯṘĿḊ are not woRLD or equivalent bytes.)

Try it online!

This took a little fiddling to avoid the forbidden bytes:
all the naive string compressions contained illegal characters;
finding the first index of a sublist within another is performed with the w atom;
finding the length of a list (for chopping and measuring to replace w) uses L - something I considered was summing the indices with JS (triangle(9)=45), I ended up using a list of strings and a separate trailing period to kill three birds with one stone [sic], allowing a dequeue-flatten-dequeue chain, ḊFḊ, to pick out the word World, this can be further shortened by post-joining the list with the space using Ḳ, allowing for a simple dequeue, Ḋ to be used instead saving another byte.

Adding the trailing period to whichever response is output as a single action also allowed compression without illegal bytes.

For some reason, the word yes is not in Jelly's dictionary, yet even though compressing Ah, yes. is the same length as the raw string, having the compression as a list of strings ['Ah, yes.',' World'] (“¢ƈṫ(Ɲ¬÷Ø“¥ḄḞ») is shorter by two bytes than concatenating (“Ah, yes.”;“¥ḄḞ»), the third bird.

For the first message I compressed Hell as a word and prepended the string '...' with an 'o' to avoid the forbidden bytes.

Commented code:

W: “¡Kịy<⁷ẊṘṘsṁñAỵḋẇ,ẇʂI» - compressed string "Hello... eh, whom should I greet?"

R: “¢ƈṫ(Ɲ¬÷Ø“¡ṣƓ» - compressed list of strings ["Ah, yes.","World"]

D: “TḲj/Ẇi¤cecṡĿt⁺ƘNƁ⁻» - compressed string "No. That isn't what I meant"

WṄøRµɠŒteḊȧKȯD;”. - Main link: no arguments
W                 - "Hello... eh, whom should I greet?"
Ṅ                - print and yield
ø               - niladic chain separation, no input to the following
R              - ["Ah, yes.","World"]
µ             - monadic chain separation, call that L
ɠ            - read a line from STDIN
Œt          - title-case it (e.g. "wOrLd" -> "World")
Ḋ        - dequeue L: ["World"]
e         - exists in?       (0 or 1)
ȧ       - and L            (0 or ["Ah, yes.","World"])
K      - join with spaces (0 or "Ah, yes. World")
D    - "No. That isn't what I meant"
ȯ     - or               ("No. That isn't what I meant" or "Ah, yes. World")
”. - literal '.'
;   - concatenate      ("No. That isn't what I meant." or "Ah, yes. World.")


# JavaScript (ES6), 215 247 bytes

If I've understood correctly, the challenge is to not use any of the following chracters: 0, 2, 4, 5, 6, 7, c, d, f, l, o, r, w, x, D, L, O, R, W.

(t=this,T=""+t,A=T[8],a=T[13],b=T[1],e=(""+!!1)[1],g=(""+!1)[3-1],h=T[11])=>t[p${e+b}mpt](He${g+g+b}... eh, ${a}h${b}m sh${b}u${g+h} I g${e}eet?)[t${b}L${b+a}e${e}Case]()==a+(z=b+e+g+h)?Ah, yes. ${A+z}.:N${b}. That isn't ${a}hat I meant.  ## Try It y= (t=this,T=""+t,A=T[8],a=T[13],b=T[1],e=(""+!!1)[1],g=(""+!1)[3-1],h=T[11])=>t[p${e+b}mpt](He${g+g+b}... eh,${a}h${b}m sh${b}u${g+h} I g${e}eet?)[t${b}L${b+a}e${e}Case]()==a+(z=b+e+g+h)?Ah, yes.${A+z}.:N${b}. That isn't${a}hat I meant.
alert(y())

## Explanation

t=this         // assigns the window object to variable t
T=""+t         // converts t to a string ("[object Window]") and assigns it to variable T
A=T[8]         // assigns the 9th character of T ("W") to variable A
a=T[13]        // assigns the 14th character of T ("w") to variable a
b=T[1]         // assigns the 2nd character of T ("o") to variable b
e=(""+!!1)[1]  // converts true to a string and assigns the 2nd character ("r") to variable e
g=(""+!1)[3-1] // converts false to a string and assigns the 3rd character ("l") to variable g
// (1 is a truthy value in JS, so !1=false and !!1=true)
h=T[11]        // assigns the 12th character of T ("d") to variable h

// The rest then uses template literals and the above variables to construct the following:

window["prompt"]("Hello... eh, whom should I greet?")["toLowerCase"]()=="w"+(z="orld")?
"Ah, yes. W"+z:
"No. That isn't what I meant."


# APL (Dyalog), 171 bytes

No compression here!

Requires ⎕IO←0 which is default on many systems. All characters are in the character set.

c←{⎕AV[¯25+⎕AV⍳⍵]}
c'Á.558GGGm.1´m∆186m¥18£5¯mÂm0⊢..$⍒' c'Ë8GmÒ1z$m2¥7v$m∆1z$mÂm6.z7$G' 'Z1mB.¥GmÕ8⊢5¯G'⊃⍨(c'∆8⊢5¯')≡819⌶⍞  Try it online! Works by first defining a custom decoding function c which decodes from a simple shifted encoding which was carefully chosen to be able to represent all the required strings while avoiding the ten forbidden characters. c←{} a function: ⎕AV[] the Atomic Vector indexed by ¯25+ the downshifted-by-25 ⎕AV⍳ indices into the Atomic Vector for ⍵ the argument c'Á.558GGGm.1´m∆186m¥18£5¯mÂm0⊢..$⍒' implicitly print the decoded Hello... eh, whom should I greet?

⍞ get character input
819⌶ lowercase it
()≡ compare it to
c'∆8⊢5¯'  the decoded world
'Ë8GmÒ1z$m2¥7v$m∆1z$mÂm6.z7$G' 'Z1mB.¥GmÕ8⊢5¯G'⊃⍨ use that Boolean to pick from the encoded No. That isn't what I meant. (if false) and Ah yes. World. (if true)
c decode that

# Java 7, 376 bytes

v\u006Fi\u0064 c(){System.\u006Fut.p\u0072int\u006Cn("He\u006C\u006C\u006F... eh, \u0077h\u006Fm sh\u006Fu\u006C\u0064 I g\u0072eet?");System.\u006Fut.p\u0072int\u006Cn(ne\u0077 java.uti\u006C.Scanne\u0072(System.in).next().equa\u006CsIgn\u006F\u0072eCase("\u0077\u006F\u0072\u006C\u0064")?"Ah, yes. \u0057\u006F\u0072\u006C\u0064.":"N\u006F. That isn't \u0077hat I meant.");}


Explanation:

In Java you can use unicode escapes in the form of \u####. Fortunately, u wasn't one of the disallowed characters, so I've used these unicode escapes for the characters that are.

The method above, without unicode escapes:

void c(){System.out.println("Hello... eh, whom should I greet?");System.out.println(new java.util.Scanner(System.in).next().equalsIgnoreCase("world")?"Ah, yes. World.":"No. That isn't what I meant.");}


Which don't need any further explanation I think.

Test code:

Try it here.

class M{
v\u006Fi\u0064 c(){System.\u006Fut.p\u0072int\u006Cn("He\u006C\u006C\u006F... eh, \u0077h\u006Fm sh\u006Fu\u006C\u0064 I g\u0072eet?");System.\u006Fut.p\u0072int\u006Cn(ne\u0077 java.uti\u006C.Scanne\u0072(System.in).next().equa\u006CsIgn\u006F\u0072eCase("\u0077\u006F\u0072\u006C\u0064")?"Ah, yes. \u0057\u006F\u0072\u006C\u0064.":"N\u006F. That isn't \u0077hat I meant.");}

public static void main(String[] a){
new M().c();
}
}

• You could use Java 8 and turn it into a lambda by replacing v\u006Fi\u0064 c() with ()->. – Okx Apr 26 '17 at 11:38

# JavaScript, 484 347 bytes

This is horrible and could most likely be golfed more. Just seeing if I could answer in JavaScript with the restrictions.

z=({}+[]+{})[-~[]]
y=(!![]+[])[+!+[]]
x=([][[]]+[])[!+[]+!+[]]
v=this
c=n=>v[St${y}ing][f${y}${z}mCha${y}C${z}${x}e](n*9)
u=c(12)
t=c(13.3)
v[s=a${u}e${y}t](He${u+u+z}... eh,${t}h${z}m sh${z}u${u+x} I g${y}eet?)
v[s](v[p${y+z}mpt]()[t${z+c(8.5)+z+t}e${y+c(7.5)}ase]()==t+(s=z+y+u+x)?Ah, yes.${c(9.7)+s}.:N${z}. That isn't${t}hat I meant.)


### Try it online!

z=({}+[]+{})[-~[]]
y=(!![]+[])[+!+[]]
x=([][[]]+[])[!+[]+!+[]]
v=this
c=n=>v[St${y}ing][f${y}${z}mCha${y}C${z}${x}e](n*9)
u=c(12)
t=c(13.3)
v[s=a${u}e${y}t](He${u+u+z}... eh,${t}h${z}m sh${z}u${u+x} I g${y}eet?)
v[s](v[p${y+z}mpt]()[t${z+c(8.5)+z+t}e${y+c(7.5)}ase]()==t+(s=z+y+u+x)?Ah, yes.${c(9.7)+s}.:N${z}. That isn't${t}hat I meant.)

• z,y and x are JSF*ck, right? – Mega Man May 13 '17 at 16:00
• @MegaMan sort of but not quite. -~{} are not in the allowed characters. – powelles May 13 '17 at 16:25
• Oh. Of course :P But x and y are. – Mega Man May 13 '17 at 16:32
• @MegaMan definitely. – powelles May 13 '17 at 16:36

# Retina, 211 194 bytes

Ta-zA-Z
TA-ZA-C\E-KMNPQS-VX-Z(%[]{
^(?!%SVNE$).* Qs. Yiay jxq'y =iay J pfaqy. %SVNE Ai, *fx. %svne. ^ Ifnns... fi, =isp xiszne J hvffy?¶ TA-C\E-KMNPQS-VX-Z(%[]{a-ce-kmn\pqs-vx-z}=+*&A-Za-z  Explanation: Ta-zA-Z - Stage one (uppercasing input) T Configuration - Transliterate; a-z Lowercase letters of the alphabet  ...into... A-Z Uppercase letters of the alphabet TA-ZA-C\E-KMNPQS-VX-Z(%[]{ - Stage two (encoding input) T Configuration - Transliterate: A-Z Uppercase letters of the alphabet  ...into... A-C\E-KMNPQS-VX-Z All uppercase characters, excluding "WORLD" (%[]{ And these characters to make up for the missing 5 characters ^(?!%SVNE$).*
Qs. Yiay jxq'y =iay J pfaqy. - Stage three (check whether input is not "world")
Implicit Configuration - Replace:
^(?!%SVNE\$).*                  Anything except "%SVNE" (the encoded version of "WORLD") with
Qs. Yiay jxq'y =iay J pfaqy.   This line (encoded version of "No. That isn't what I meant.").

%SVNE
Ai, *fx. %svne.    - Stage four (check whether input is "world")
Implicit Configuration - Replace:
%SVNE                %SVNE with
Ai, *fx. %svne.      This line (the encoded version of "Ah, yes. World.")

^
Ifnns... fi, =isp xiszne J hvffy?¶ - Stage five (append message to start)
Implicit Configuration - Replace:
Ifnns... fi, =isp xiszne J hvffy?¶   This line (the encoded version of ("Hello... eh, whom should I greet?"). The ¶ represents a newline

TA-C\E-KMNPQS-VX-Z(%[]{a-ce-kmn\pqs-vx-z}=+*&A-Za-z - Stage six (decode)
T                                                      Configuration - Transliterate:
A-C\E-KMNPQS-VX-Z                                       All uppercase characters, excluding "WORLD"
(%[]{                                  And these characters to make up for the missing 5 characters
A-C\E-KMNPQS-VX-Z                                       All lowercase characters, excluding "world"
}=+*&                                  And these characters to make up for the missing 5 characters
...with...
A-Za-z                                                  All the uppercase characters followed by the lowercase characters.


Try it online!

I used this program to encode the strings, and this one to decode them.