38
\$\begingroup\$

Using the following length-separated lists of words:

https://github.com/Magic Octopus Urn/wordListsByLength

Print 1 word from each list of length n from 1 all the way up to 20, here's a valid example:

a
an
and
hand
hands
handle
handles
abandons
abandoned
understand
outstanding
newfoundland
understanding
characteristic
characteristics
characterization
characterizations
characteristically
characterologically
chemotherapeutically

Alternatively (array):

['a', 'an', 'and', 'hand', 'hands', 'handle', 'handles', 'abandons', 'abandoned', 'understand', 'outstanding', 'newfoundland', 'understanding', 'characteristic', 'characteristics', 'characterization', 'characterizations', 'characteristically', 'characterologically', 'chemotherapeutically']

Alternatively (any printable non-alphabetic separator other than \n):

a:an:and:hand:hands:handle:handles:abandons:abandoned:understand:outstanding:newfoundland:understanding:characteristic:characteristics:characterization:characterizations:characteristically:characterologically:chemotherapeutically

Rules

  • You may choose your own 20 words.
  • The words must be from the github page provided, more specifically:
    • 1 from 1.txt, 1 from 2.txt, etc...
    • Note, files above 20.txt exist, but you do not need any words above 20 characters.
  • Valid separators are ASCII-printable non-alphabetical characters (even numbers, don't care).
  • Lowercase or uppercase only, pick one, stick with it; no title-case allowed.
  • Please don't use a 100% copy of my example 20 words...
    • You can, but that's no fun.
    • They are likely suboptimal anyways...
  • If you DON'T want to use the separated files, and need a full list:
    • Use unsorted.txt, this is all n.txt files in one, sorted alphabetically.
  • Note, you CANNOT directly read from the URL, it is a common loophole.
  • This is , lowest byte-count will be the winner.

For reference, the output is 229 bytes, so anything that gets under that beats hardcoding.


Possible meta-tag-discussion:

where the user gets to customize their outputs from a list of possibilities?

\$\endgroup\$
13
  • 4
    \$\begingroup\$ As someone from Newfoundland, I appreciate the shoutout. :) \$\endgroup\$ Commented Jul 20, 2017 at 15:46
  • 6
    \$\begingroup\$ @Christian You could say I... ( •_•)>⌐■-■ understand outstanding newfoundland (⌐■_■) \$\endgroup\$ Commented Jul 20, 2017 at 15:48
  • 1
    \$\begingroup\$ @Riley that's stretching it, 1 delimiter inbetween each word, though I can see many situations where that'd help :P. \$\endgroup\$ Commented Jul 20, 2017 at 16:29
  • 1
    \$\begingroup\$ @JonathanAllan just did :). \$\endgroup\$ Commented Jul 21, 2017 at 0:59
  • 1
    \$\begingroup\$ Utility for choosing the words. \$\endgroup\$
    – Jim
    Commented Jul 21, 2017 at 10:18

15 Answers 15

27
\$\begingroup\$

Python 2, 145 bytes

print'i am now tiny @ @s##s#ed#act#acts#@#@s#@ed#@ing#arguments#accusation#accusations#advertisings'.replace('#',' counter').replace('@','check')

Try it online!

Prints these words, separated by spaces:

i
am
now
tiny
check
checks
counter
counters
countered
counteract
counteracts
countercheck
counterchecks
counterchecked
counterchecking
counterarguments
counteraccusation
counteraccusations
counteradvertisings
\$\endgroup\$
1
  • 18
    \$\begingroup\$ "i am now tiny" - I like the self-descriptive code... \$\endgroup\$ Commented Jul 20, 2017 at 18:43
19
\$\begingroup\$

Jelly,  49 35 31  30 bytes

ṫ3,⁸Ṗ,$€ẎK
“¤ƈȮⱮ⁴⁷ọḤƁŒ|⁾Ė»ḲÇ€K

A niladic link returning a list of characters, or a full program printing that list as a string (the words delimited by spaces).

Try it online!

How?

ṫ3,⁸Ṗ,$€ẎK - Helper link: list of characters, word    e.g. "abreacts"
ṫ3         - tail word from index 3                          "reacts"
   ⁸       - chain's left argument, word
  ,        - pair                               ["reacts","abreacts"]
      $€   - last two links as a monad for €ach of the two words:
    Ṗ      -   pop (all but last character)      "react" / "abreact"
     ,     -   pair       ["react","reacts"] / ["abreact","abreacts"]
        Ẏ  - tighten          ["react","reacts","abreact","abreacts"]
         K - join with spaces         "react reacts abreact abreacts"

“¤ƈȮⱮ⁴⁷ọḤƁŒ|⁾Ė»ḲÇ€K - Link: no arguments
“¤ƈȮⱮ⁴⁷ọḤƁŒ|⁾Ė»     - a compressed string using dictionary indexes:
                    -   "agar abreacts acknowledges codeterminations deindustrializations"
               Ḳ    - split at spaces
                Ç€  - call the last link (Helper) as a monad for €ach
                  K - join with spaces

...which yields:

a ar aga agar react reacts abreact abreacts knowledge knowledges acknowledge acknowledges determination determinations codetermination codeterminations industrialization industrializations deindustrialization deindustrializations

Previous:

@35:

“¡Ụıƭz Xj]"Ɱ*AJƤʂạ5ƬṚṪð^ƥỤ»ḲṖ,$€K€K

Using 10 words and their length-1 prefixes.

@49

“ḊAḥTz¹ỴH¡ṛYẈDƤNŀt#ñ²ĿĊḤlṪnð⁻U+ɦỴĊypṆQ0⁴ṄẉṂi⁻d¤&»

Simply 20 compressed words.

\$\endgroup\$
4
  • \$\begingroup\$ Darn Jelly dictionary! +1 \$\endgroup\$ Commented Jul 20, 2017 at 17:31
  • \$\begingroup\$ I didn't know Jelly had a dictionary, to be honest. \$\endgroup\$ Commented Jul 21, 2017 at 0:20
  • 3
    \$\begingroup\$ 30 BYTES!??!!??! I just went to sleep and woke up and it's as low as 30 BYTES?!!??!?!11 O_O_O \$\endgroup\$ Commented Jul 21, 2017 at 8:17
  • \$\begingroup\$ 30 BYTES!?!?!??! I FORGOT ABOUT THIS CHALLENGE FOR A MONTH AND HE WON WITH 30 BYTES!?!?! \$\endgroup\$ Commented Aug 17, 2017 at 21:43
15
\$\begingroup\$

PowerShell, 166 163 bytes

'a
an
and'
'','s','le','ler','lers'|%{"hand$_"}
($a="character")
($x=-split"s ed ful ized istic istics ization izations istically ologically"|%{"$a$_"})
"un"+$x[8]

Try it online!

Hand-optimized, no algorithms. The two loops |%{ } tack on the appropriate ending to the appropriate beginning. I'm searching for a way to get them down into one loop.

\$\endgroup\$
1
  • \$\begingroup\$ Wow, my example looks even dumber now xD! characterful > newfoundland \$\endgroup\$ Commented Jul 20, 2017 at 15:42
10
\$\begingroup\$

Python, 169 bytes

z='odahs princesses acclimatizers cyanocobalamines aerothermodynamics underrepresentations'.split()
print([y[:i+1]for x,y in zip(['']+z,z)for i in range(len(x),len(y))])

Prints a list of the words.

Try it online!

Words gained by scanning sequences of matching words, by start or end of the word and starting from length 1 upwards or from length 20 downwords.

Here is the script I used to get it. (the upward-start-matching one)

\$\endgroup\$
1
  • \$\begingroup\$ 171 bytes (it feels like it should be shorter, but it isn't): Try it online! \$\endgroup\$
    – Stephen
    Commented Jul 20, 2017 at 17:19
8
\$\begingroup\$

Python 2,  126 120  112 bytes

-8 bytes thanks to Anders Kaseorg (I thought I'd migrated this from Python 3, but turns out I'd forgotten!)

A port of my Jelly answer works well in Python too...

for w in"agar abreacts acknowledges codeterminations deindustrializations".split():print w[2:-1],w[2:],w[:-1],w,

Try it online!

Prints:

a ar aga agar react reacts abreact abreacts knowledge knowledges acknowledge acknowledges determination determinations codetermination codeterminations industrialization industrializations deindustrialization deindustrializations 
\$\endgroup\$
3
  • \$\begingroup\$ Python 2 lets you end with print w[2:-1],w[2:],w[:-1],w, for −8 bytes. \$\endgroup\$ Commented Jul 28, 2017 at 23:03
  • \$\begingroup\$ Oh, oops I forgot about this or thought I'd done it - I have a TIO page open somewhere with that! \$\endgroup\$ Commented Jul 28, 2017 at 23:05
  • \$\begingroup\$ Thanks for that though! \$\endgroup\$ Commented Jul 28, 2017 at 23:09
6
\$\begingroup\$

JavaScript, 159 bytes

_='a1an1and}}swwrwrs~~s~ed~ful~ized{{s~|~|s{ally~ologically1misx|s~1x}1hand|ization{~isticxcharacterw}le';for(i of'wx{|}~')with(_.split(i))_=join(pop());f=f=>_

Try it online!

Thanks @HyperNeutrino for edit. But, I am reverting back to old post (removing "Node.js" flag) because it has nothing to do with Node.js. It perfectly works in browsers too.

\$\endgroup\$
3
  • \$\begingroup\$ f=f=>_ threw me off, I was like "won't that override the function" (it would just prevent recursion) \$\endgroup\$
    – Stephen
    Commented Jul 20, 2017 at 16:07
  • \$\begingroup\$ @StepHen. I'm not sure if leaving a plain string is allowed. As I understood, the code should represent a function (or whole program), thats why I added it to the end. Variable _ already contains the string. \$\endgroup\$
    – user72349
    Commented Jul 20, 2017 at 16:09
  • \$\begingroup\$ You're correct, I was just really confused as to what it did, since you reused the variable name (f as both function name and (ignored) parameter name) \$\endgroup\$
    – Stephen
    Commented Jul 20, 2017 at 16:15
6
\$\begingroup\$

05AB1E, 51 bytes

’¯Óa‚‡’D“€…€¤Þ¨íʃé¢Ã¥£žÜ¶ß´ç…àçî×Ü»‡ÛೌçÓs²® ÿ ÿs

Try it online!

Separator:

List of words: a, an, ana, anal, house, houses, amazing, criminal, seriously, apparently, accessories, disciplinary, distributions, discrimination, congratulations, responsibilities, characterizations, telecommunications, representationalist, representationalists

\$\endgroup\$
7
  • 1
    \$\begingroup\$ want to participate in own challenge intensifies \$\endgroup\$ Commented Jul 21, 2017 at 0:19
  • \$\begingroup\$ I'm guessing 05AB1E has no 20-length words in the dictionary :P? Have yet to actually check myself. \$\endgroup\$ Commented Jul 21, 2017 at 0:29
  • \$\begingroup\$ @MagicOctopusUrn Nope. \$\endgroup\$
    – Adnan
    Commented Jul 21, 2017 at 1:06
  • \$\begingroup\$ @adnan wow, that approach... may actually be a good idea if you can find a way to generate all dictionary code-points in like 1-10 bytes... \$\endgroup\$ Commented Jul 21, 2017 at 1:12
  • 1
    \$\begingroup\$ @adnan that was my first attempt, I'm sure you could knock it outta the park. \$\endgroup\$ Commented Jul 21, 2017 at 1:48
5
\$\begingroup\$

Ruby, 120 bytes

j=3
$><<?a
"  5  T &  }   <    ".bytes{|i|puts
8.times{|k|$><<%w{dehydro chlori ge n at ion e s}[k]*(j>>7-k&1)}
j+=i-31}

Prints the following. Each word is built from the 8 strings above, using the binary digits of j to select. On each iteration of the loop, j is incremented by the ASCII value of the characters in the string in quotes, minus 31.

a
es
ion
ions
nates
nation
nations
chlorine
chlorines
chlorinate
chlorinates
chlorination
dehydrogenate
dehydrogenates
dehydrogenation
dehydrogenations
dehydrochlorinate
dehydrochlorinates
dehydrochlorination
dehydrochlorinations
\$\endgroup\$
4
\$\begingroup\$

Pyth, 74 bytes

Psychopathologically adventuresomenesses

.e:"psychopathologicallyadventuresomenesses"b+bhkiR36"GGGGBKMMKKM6K6M0K0K0

Try it online! It outputs:

['a', 'al', 'all', 'ally', 'logic', 'advent', 'venture', 'ventures', 'adventure', 'adventures', 'venturesome', 'pathological', 'adventuresome', 'pathologically', 'venturesomeness', 'psychopathologic', 'adventuresomeness', 'psychopathological', 'adventuresomenesses', 'psychopathologically']

Which, once formatted yields:

a
al
all
ally
logic
advent
venture
ventures
adventure
adventures
venturesome
pathological
adventuresome
pathologically
venturesomeness
psychopathologic
adventuresomeness
psychopathological
adventuresomenesses
psychopathologically

Explanation

The key was to choose two words that complement each other. I chose "psychopathologically" and "adventuresomenesses" thanks to a little tool I wrote. Using these two words, for any length we can find substrings which are actual words of the provided list. All the possible decompositions are demonstrated by:

a al all ally logic psycho logical          logically pathologic             pathological               pathologically                 psychopathologic                   psychopathological                     psychopathologically
a ad ess ness esses advent venture ventures adventure adventures venturesome              adventuresome                venturesomeness                  adventuresomeness                    adventuresomenesses

The next step is just to get the list of the indexes for a given decomposition. For my decomposition, I chose: 16 16 16 16 11 20 22 22 20 20 22 6 20 6 22 0 20 0 20 0, which are indexes in the concatenated strings: psychopathologicallyadventuresomenesses.

Finally, write a program which just loops over the indexes and display the substring at each given index with increasing length.

For saving bytes, I stored the indexes in a base 36 string. Indeed, GGGGBKMMKKM6K6M0K0K0 is the list of my indexes in base 36 (because my highest index is 22, I could have used base 23).

Program explanation

.e:"psychopathologicallyadventuresomenesses"b+bhkiR36"GGGGBKMMKKM6K6M0K0K0

                                                 iR36"GGGGBKMMKKM6K6M0K0K0    # For each character in the string, convert from base 36 to base 10
.e                                                                            # Loop over indexes: b are the indexes, h their position
  :"psychopathologicallyadventuresomenesses"b+bhk                             # In "psy...ses", select the substring at index b and of length k + 1
\$\endgroup\$
1
  • \$\begingroup\$ psychopathologically - "In terms of the scientific study of mental disorders." Interesting. \$\endgroup\$ Commented Jul 25, 2017 at 19:17
4
\$\begingroup\$

Bubblegum, 66 bytes

00000000: 6d8b 410a 0020 0804 bf6a 4407 a134 5aff  m.A.. ...jD..4Z.
00000010: 4fe6 29ac 93ce b0a3 543a ad06 3f6c e769  O.).....T:..?l.i
00000020: 46f3 3ae2 b218 abc4 2cab d389 a805 82aa  F.:.....,.......
00000030: fee1 6e43 2444 62df 0f46 4a1e f356 8cf1  ..nC$Db..FJ..V..
00000040: 73d8                                     s.

Output:

o`al`res`alit`reset`preset`present`rational`represent`rationales`annotations`connotations`connotational`representation`representations`representational`misrepresentation`misrepresentations`representationalism`representationalisms

Try it online!

The words and separator were selected by simulated annealing:

from __future__ import print_function
import math
import random
import zlib

wordlists = \
    [[chr(x).encode() for x in [9, 10] + list(range(32, 127)) if not chr(x).encode().isalpha()]] + \
    [open('wordListsByLength/{}.txt'.format(n), 'rb').read().splitlines() for n in range(1, 21)]

words = [random.choice(wordlist) for wordlist in wordlists]

temperature = 10.
score = 9999
best = score

while True:
    old_score = score
    n = random.randrange(len(wordlists))
    old_word = words[n]
    words[n] = random.choice(wordlists[n])
    z = zlib.compressobj(9, zlib.DEFLATED, -zlib.MAX_WBITS, 9)
    score = len(z.compress(words[0].join(words[1:])) + z.flush())
    if score > old_score and random.random() >= math.exp((old_score - score) / temperature):
        words[n] = old_word
        score = old_score
    else:
        temperature *= .99999
        if score < best:
            best = score
            print(best, repr(words[0].join(words[1:])))
\$\endgroup\$
3
\$\begingroup\$

C#, 259 bytes

_=>{var a=new int[7].Select((n,i)=>"abasers".Substring(0,i+1)).ToList();a.Add("abacuses");a.AddRange(new int[12].Select((n,i)=>(i>10?"un":"")+"character"+"|s|ed|ful|ised|istic|istics|isation|isations|istically|ologically|istically|".Split('|')[i]));return a;}

Some obvious room for golfing still but I've run out of time now. I know it's longer than hard coding so will fix it when I get some time later on.

\$\endgroup\$
3
  • \$\begingroup\$ Woops is actually even longer because I need to include using System.Linq; \$\endgroup\$ Commented Jul 20, 2017 at 16:02
  • 4
    \$\begingroup\$ Just returning them in a string split by spaces is like 245. \$\endgroup\$ Commented Jul 20, 2017 at 16:29
  • \$\begingroup\$ @MagicOctopusUrn I know that's what I said in my answer... \$\endgroup\$ Commented Jul 20, 2017 at 19:20
3
\$\begingroup\$

05AB1E, 130 68 bytes

-62 bytes thanks to Erik the Outgolfer

743222’€Ü†š ƒ´aî³eros €‡a•¿f²Ñns …¿en®íizers ‚ÀÙŠs ‡åØŽ’#‚øε`ηRs£R}˜

Try it online!

Takes as many prefixes as needed from each of the following words:

amusers
carabinero
foraminiferans
photosensitizers
videoconferencings
radiopharmaceuticals

Prints these words in an array:

a
am
amu
amus
amuse
amuser
amusers
carabine
carabiner
carabinero
carabineros
foraminifera
foraminiferan
foraminiferans
photosensitizer
photosensitizers
videoconferencing
videoconferencings
radiopharmaceutical
radiopharmaceuticals 
\$\endgroup\$
7
2
\$\begingroup\$

Bubblegum, 78 bytes

00000000: 654b c301 4431 10bd a7cb d876 9a5f efe7  eK..D1.....v._..
00000010: 781e 2080 ee55 0488 ffc8 9f69 e86f a5ff  x. ..U.....i.o..
00000020: ce00 0b98 202e 34ed d701 a464 bf59 35fb  .... .4....d.Y5.
00000030: 23d7 9192 b948 7c79 f351 0c8b f4ee 06e4  #....H|y.Q......
00000040: 8b05 1a33 77c8 1bcf 7f58 7577 e113       ...3w....Xuw..

Try it online!

\$\endgroup\$
2
\$\begingroup\$

Ruby, 107 bytes

p(z=%w{o or for form ultra})+[z[3],c="centrifug",z[4]+c].product(%w{ed ing ally ation ations}).map{|i|i*""}

Prints the following array.

["o", "or", "for", "form", "ultra", "formed", "forming", "formally", "formation", "formations", "centrifuged", "centrifuging", "centrifugally", "centrifugation", "centrifugations", "ultracentrifuged", "ultracentrifuging", "ultracentrifugally", "ultracentrifugation", "ultracentrifugations"

Changing the p for puts (with trailing space) gives the following at a cost of an additional 4 bytes.

o
or
for
form
ultra
formed
forming
formally
formation
formations
centrifuged
centrifuging
centrifugally
centrifugation
centrifugations
ultracentrifuged
ultracentrifuging
ultracentrifugally
ultracentrifugation
ultracentrifugations
\$\endgroup\$
1
\$\begingroup\$

Japt, 119 bytes

`av„v„dvjvjsvj¤vj¤svfœejvqvqsvq‚vqˆgvqizƒvqÄKcvqÄKcsvqizÂ\nvqizÂ\nsvq‰tkvqologkv·sqizÂ\ns`d'j`Ê@`'k`Åœ§`'q`Ö‹a×` q'v ·

Try it online!

Prints:

a
an
and
hand
hands
handle
handles
freehand
character
characters
charactered
charactering
characterizes
characteristic
characteristics
characterization
characterizations
characteristically
characterologically
mischaracterizations
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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