;“ẉbẊWS»,⁸K;;”t
“¤ṁp}œḊṄæ®’b6ị“ʠȷ»ØAç"Y
TryItOnline!
Based on the 56 byte version (two below), but changed words to remove all middle letter "u"
s so it can index into the dictionary word "anisole"
*, which has the convenience of having the letters we need all at indexes less than six: 1:a, 2:n 3:i, 4:s, 5:o (6:l), 0:e
(note the "e"
on the right is at index zero [also 7 and -7 and any other number congruent to 0 mod 7]). It's also early in the dictionary so has only a two rather than the much more common three byte lookup index ("anisogamete"
would also work for 2).
* The old-school name for the aromatic ether methoxybenzene, often used in perfumes.
A is for Ant
B is for Bit
C is for Cot
D is for Dot
E is for Eat
F is for Fat
G is for Got
H is for Hat
I is for Ist
J is for Jot
K is for Kit
L is for Lot
M is for Mat
N is for Nit
O is for Oat
P is for Pat
Q is for Qat
R is for Rot
S is for Sit
T is for Tit
U is for Unt
V is for Vet
W is for Wet
X is for Xat
Y is for Yet
Z is for Zit
How?
“¤ṁp}œḊṄæ®’b6ị“ʠȷ»ØAç"Y - Main link: no arguments
“¤ṁp}œḊṄæ®’ - base 250 compressed number -> 75711304811637630759
b6 - convert to base 6 list -----------> [ 2, 3, 5, 5, 1, 1, 5, 1, 4, 5, 3, 5, 1, 3, 1, 1, 1, 5, 3, 3, 2, 0, 0, 1, 0, 3]
“ʠȷ» - word from Jelly's dictionary, "anisole"
ị - index into that ------------------> [ "n" , "i" , "o" , "o" , "a" , "a" , "o" , "a" , "s" , "o" , "i" , "o" , "a" , "i" , "a" , "a" , "a" , "o" , "i" , "i" , "n" , "e" , "e" , "a" , "e" , "i"]
ØA - get the uppercase alphabet
ç" - zip with last link (1) as a dyad -> ["Ant","Bit","Cot","Dot","Eat","Fat","Got","Hat","Ist","Jot","Kit","Lot","Mat","Nit","Oat","Pat","Qat","Rot","Sit","Tit","Unt","Vet","Wet","Xat","Yet","Zit"]
Y - join with line feeds
- implicit print
;“ẉbẊWS»,⁸K;;”t - Link 1, join up the parts: Character, Two-Character-Word-Ending
; - concatenate Character (e.g. "A") with
“ẉbẊWS» - the compressed string " is for" ---> "A is for"
, - pair that with
⁸ - the left argument (Character) -----> ["A is for","A"]
K - join with spaces ------------------> "A is for A"
; - concatenate with right argument ---> "A is for An"
; - concatenate with
”t - "t" ---------------------------> "A is for Ant"
Previous, 46
“¤ṪŻIð^ƥ’b4ị⁾sap⁾pt¤ØAż,@K¥€“ẉbẊWS»ØAżYF”e272¦
Words all have second letter "s" or "a" and last letter "p" or "t" using a base four lookup in a Cartesian product of "sa" and "pt". Except the "U" word, which the code changes to "Use" (using the relatively bulky F”e272¦
on the end) - if I could find a word list like this that does not have such an exception we'd be looking at 39 bytes.
Word list:
Asp, Bat, Cat, Dap, Eat, Fat, Gap, Hat, Ist, Jat, Kat, Lap, Mat, Nap, Oat, Pat, Qat, Rat, Sat, Tap, Use, Vat, Wat, Xat, Yap, Zap
try this one
Previous 56 bytes
”tṁØA⁺,j“niooaauusoioaiuaaoiineeaei”œs3Z,@K¥€“ẉbẊWS»ØAżY
Word list:
Ant, Bit, Cot, Dot, Eat, Fat, Gut, Hut, Ist, Jot, Kit, Lot, Mat, Nit, Out, Pat, Qat, Rot, Sit, Tit, Unt, Vet, Wet, Xat, Yet, Zit
It is formatted, give it a go
Previous, 83 bytes
“ẉbẊWS»WṁØA⁺żż“¦ịfe$ɲVPġþ¹Øt@ƑƊŀqṁŒƑOɦ⁴ḍẊḤṁr}Ƭ¢b⁻?q&øIụNẎ9eƲi⁸'ıB.;%V,¦İ⁷ẓk½»s5¤K€Y
...let's play "Spot which letter does not have an animal!" there is one, and only one - watch out for the red herring (a lie, the red herring was xenon, which is an element, obviously not an animal), are two five letter words here that are not animals (xenon being one):
Aphid, Bison, Camel, Dingo, Eagle, Finch, Gecko, Heron, Indri, Jabot, Koala, Lemur, Mouse, Nyala, Otter, Panda, Quail, Raven, Sloth, Tapir, Urial, Viper, Whale, Xenon, Yapok, Zebra
(of course this is formatted correctly, try it - I just thought I'd save space)
I am guessing slang is not allowed, even if listed in proper dictionaries? (e.g. "When she realised she was headed towards the outback again she just pulled a uey!")
– Jonathan Allan – 2017-02-08T19:06:17.4331
Given some of the answers, this song by Barenaked Ladies seems relevant.
– AdmBorkBork – 2017-02-08T19:21:30.4371@JonathanAllan No slang. Dictionaries contain a lot of things that aren't technically words. Abbreviations is one, slang is another. – mbomb007 – 2017-02-08T19:34:41.867
@AdmBorkBork This challenge was inspired by this video.
– mbomb007 – 2017-02-08T19:36:05.2304It's too bad that this devolved into finding 3 letter words that end in the same letter. – 12Me21 – 2017-02-09T00:33:52.940
@12Me21 how is that devolution, is this not code-golf?! If you can find a way to access longer words with fewer bytes just do it! Edit - Find a list of 3-letter words using a set of two middle letters and a set of two end letters and you can beat the single enders (which use a set of seven middles). – Jonathan Allan – 2017-02-09T12:32:03.803
@12Me21 Just because other people are copying each other's methods doesn't mean that there isn't a better one yet to be found. – mbomb007 – 2017-02-09T14:36:13.187
1There's a couple of answers using an external dictionary. Shouldn't they have to add the size of that file to their code? – pipe – 2017-02-09T15:30:35.697
@pipe Like which? The ones using the Linux words file? I'm not sure. What's the meta consensus? Idk, because if you think about Python modules, each one is really a different file, but the Linux file is OS dependent, so that might be an external source, not part of the language. – mbomb007 – 2017-02-09T19:53:41.407
If
X is for X-ray
is allowed (whereX
is not a word, but just represents the common letter for an unknown in algebra) andS is for Something smells fishy...
is also allowed, wouldX is for X is a letter
be allowed? – hmakholm left over Monica – 2017-02-11T19:03:07.857No. X-ray is a single word, just like twenty-two is a word. Learn your English. – mbomb007 – 2017-02-11T20:07:30.820
Relevant? – HyperNeutrino – 2017-04-10T20:10:05.387